From b4a1714d15f75730ed401462e72c800466182ac6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:14:28 -0500 Subject: [PATCH 0001/1744] Create pacsat.sh --- groundstation/pacsat.sh | 193 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100644 groundstation/pacsat.sh diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh new file mode 100644 index 00000000..6e710b25 --- /dev/null +++ b/groundstation/pacsat.sh @@ -0,0 +1,193 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +sudo modprobe snd-aloop + +sudo systemctl stop openwebrx + +sudo systemctl stop rtl_tcp + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +sudo killall -9 direwolf &>/dev/null + +sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 java &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +sudo killall -9 zenity &>/dev/null + +echo + +frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +if [ -z "$frequency" ]; then + +echo "No choice made. Exiting." + +sleep 3 + +exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +echo + +echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + + echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat + +sleep 5 From f42d21a74dfe4ed1314494fbb3e4e46fb29c9850 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:17:44 -0500 Subject: [PATCH 0002/1744] Create direwolf-pacsat.conf --- groundstation/direwolf/direwolf-pacsat.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 groundstation/direwolf/direwolf-pacsat.conf diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf new file mode 100644 index 00000000..9fe8960b --- /dev/null +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -0,0 +1,3 @@ +CALLSIGN AMSAT +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +PTT GPIO 20 From 27b4ffe54b4027cac0b17cee54dc3311f3e2e660 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:22:36 -0500 Subject: [PATCH 0003/1744] changed permission of pacsat script --- groundstation/pacsat.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/pacsat.sh diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh old mode 100644 new mode 100755 From 234c9d747dca1bbf2857a1381abe18bb857ca838 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:27:59 -0500 Subject: [PATCH 0004/1744] added --- pacsatsim.sh | 193 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 193 insertions(+) create mode 100755 pacsatsim.sh diff --git a/pacsatsim.sh b/pacsatsim.sh new file mode 100755 index 00000000..6e710b25 --- /dev/null +++ b/pacsatsim.sh @@ -0,0 +1,193 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +sudo modprobe snd-aloop + +sudo systemctl stop openwebrx + +sudo systemctl stop rtl_tcp + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +sudo killall -9 direwolf &>/dev/null + +sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 java &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +sudo killall -9 zenity &>/dev/null + +echo + +frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +if [ -z "$frequency" ]; then + +echo "No choice made. Exiting." + +sleep 3 + +exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +echo + +echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + + echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat + +sleep 5 From 07b96c781b59d7589a4bbb388c69d28835afd8cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:34:06 -0500 Subject: [PATCH 0005/1744] Update pacsatsim.sh changed for sim --- pacsatsim.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6e710b25..4483d771 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,11 +4,11 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +#sudo systemctl stop openwebrx sudo systemctl stop rtl_tcp -pkill -o chromium &>/dev/null +#pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null @@ -16,44 +16,44 @@ sudo killall -9 direwolf &>/dev/null sudo killall -9 aplay &>/dev/null -sudo killall -9 qsstv &>/dev/null +#sudo killall -9 qsstv &>/dev/null -sudo killall -9 rtl_tcp &>/dev/null +#sudo killall -9 rtl_tcp &>/dev/null -sudo killall -9 java &>/dev/null +#sudo killall -9 java &>/dev/null -sudo killall -9 CubicSDR &>/dev/null +#sudo killall -9 CubicSDR &>/dev/null -sudo killall -9 zenity &>/dev/null +#sudo killall -9 zenity &>/dev/null echo -frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") +#frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") #echo $frequency -if [ -z "$frequency" ]; then +#if [ -z "$frequency" ]; then -echo "No choice made. Exiting." +#echo "No choice made. Exiting." -sleep 3 +#sleep 3 -exit +#exit -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo +echo "Choose the number for the packet decoding option:" +echo +echo "1. APRS US 2m (144390 kHz)" +echo "2. CubeSatSim (434900 kHz)" +echo "3. APRS European 2m (144800 kHz)" +echo "4. APRS Australian 2m (145175 kHz)" +echo "5. APRS on another frequency" +echo "6. APRS on ISS (145825 kHz)" +echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +echo "8. Test Serenity CubeSat decoding with WAV file" +echo "9. Test APRS decoding with CubeSatSim WAV file" +echo -#read -r choice +read -r choice fi From a97e2f8ed8a228ac2d25d40d984648e2be0b73b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:34:49 -0500 Subject: [PATCH 0006/1744] Update pacsatsim.sh typo --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 4483d771..40d5f809 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -55,7 +55,7 @@ echo read -r choice -fi +#fi if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then From 45372ed484368c34022f49b79f6617e77aa3b2c6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:36:41 -0500 Subject: [PATCH 0007/1744] Update direwolf-pacsat.conf changed to MYCALL --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 9fe8960b..03c6a5c4 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ -CALLSIGN AMSAT +MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 PTT GPIO 20 From b6cd13087a77f0df6f8c242888c9165a3f1ad863 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:38:23 -0500 Subject: [PATCH 0008/1744] Update direwolf-pacsat.conf added USB Card --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 03c6a5c4..7beb9432 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Device,DEV=0 PTT GPIO 20 From 78cb684ae3f07fdded48579842396e995c75641f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:42:44 -0500 Subject: [PATCH 0009/1744] Create direwolf-pacsatsim.conf --- direwolf/direwolf-pacsatsim.conf | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim.conf diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf new file mode 100644 index 00000000..c335760a --- /dev/null +++ b/direwolf/direwolf-pacsatsim.conf @@ -0,0 +1,3 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 +PTT GPIO 20 From ede7922fa7ff9dc29efb052207c0503f5191ec4d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 12:43:38 -0500 Subject: [PATCH 0010/1744] Update pacsatsim.sh commented out rtl-sdr --- pacsatsim.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 40d5f809..2ea4707b 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -175,7 +175,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & fi @@ -185,8 +185,7 @@ value=`aplay -l | grep "Loopback"` echo "$value" > /dev/null set -- $value -#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & /home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat From ae07d74c873e56b2cf0264070c728c4ad552422b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:47:18 -0500 Subject: [PATCH 0011/1744] Update direwolf-pacsat.conf change to loopback for now --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 7beb9432..455a31b1 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 PTT GPIO 20 From aaf292db23de9441c7e1af76dde5166a6d4b8677 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:49:42 -0500 Subject: [PATCH 0012/1744] Update pacsat.sh change to passat ground station --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 6e710b25..70cf51fa 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -188,6 +188,6 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat +sudo setsid java -Xmx512M -jar PacSatGround.jar sleep 5 From e8e08ef8e460fb1e9f87960ff0f6de79390e1b6a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:51:02 -0500 Subject: [PATCH 0013/1744] Update pacsat.sh fix path --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 70cf51fa..bfaf7235 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -188,6 +188,6 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -sudo setsid java -Xmx512M -jar PacSatGround.jar +sudo setsid java -Xmx512M -jar /home/pi/Desktop/PacSatGround_0.46m_linux/PacSatGround.jar sleep 5 From 8348d51484f3272b3908356348eb275f4ff18523 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:54:15 -0500 Subject: [PATCH 0014/1744] Update pacsat.sh added cd --- groundstation/pacsat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index bfaf7235..2cca3cef 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -188,6 +188,8 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -sudo setsid java -Xmx512M -jar /home/pi/Desktop/PacSatGround_0.46m_linux/PacSatGround.jar +cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +sudo setsid java -Xmx512M -jar PacSatGround.jar sleep 5 From 87f8b2e25adb4ec76b675c1305e4fe3b2a01a102 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 13:56:18 -0500 Subject: [PATCH 0015/1744] Update direwolf-pacsat.conf changed to Headphones --- groundstation/direwolf/direwolf-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 455a31b1..c335760a 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,3 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 From 2acdcc69e2e61e2e03e3d27277e45555ce740116 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:11:29 -0500 Subject: [PATCH 0016/1744] Update config add dtmf to -A --- config | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/config b/config index 104a17e3..cee78881 100755 --- a/config +++ b/config @@ -1300,37 +1300,42 @@ elif [ "$1" = "-A" ]; then 1) echo "Mode 1 is APRS" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" + transmit_command_aprs +# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" ;; 2) echo "Mode 2 is FSK" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f" + transmit_command_fsk +# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f" ;; 3) echo "Mode 3 is BPSK" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b" + transmit_command_bpsk +# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b" ;; 4) echo "Mode 4 is SSTV" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=s" + transmit_command_sstv +# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=s" ;; 5) echo "Mode 5 is CW" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" + transmit_command_cw +# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" ;; *) echo "Unknown mode" - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?" +# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?" ;; - esac - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - echo $STRING > /home/pi/CubeSatSim/t.txt - echo - echo -n "Sending APRS packet " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 5 - sudo touch /home/pi/CubeSatSim/ready +# esac +# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 +# echo $STRING > /home/pi/CubeSatSim/t.txt +# echo +# echo -n "Sending APRS packet " +# echo $STRING +# sudo touch /home/pi/CubeSatSim/ready +# sleep 5 +# sudo touch /home/pi/CubeSatSim/ready echo echo "Do you want to send another APRS command packet (y/n) " From 0365075e0080524e0a37c85e717b2247e6d58a55 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:12:22 -0500 Subject: [PATCH 0017/1744] Update config added back in missing esac --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index cee78881..000213f8 100755 --- a/config +++ b/config @@ -1327,7 +1327,7 @@ elif [ "$1" = "-A" ]; then echo "Unknown mode" # STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?" ;; -# esac + esac # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 # echo $STRING > /home/pi/CubeSatSim/t.txt # echo From b4c6a34f9214e176b573ed21a71df136ccba4cba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:14:17 -0500 Subject: [PATCH 0018/1744] Update config don't force aprs mode --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 000213f8..3d6107e0 100755 --- a/config +++ b/config @@ -1285,7 +1285,7 @@ elif [ "$1" = "-A" ]; then sudo systemctl stop transmit # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - sudo python3 -u /home/pi/CubeSatSim/transmit.py x > /dev/null 2>&1 & # Force APRS mode +# sudo python3 -u /home/pi/CubeSatSim/transmit.py x > /dev/null 2>&1 & # Force APRS mode fi sim="y" From 5d6e93b9818bf2061f49f7e4710ecfe3a130af8a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:16:28 -0500 Subject: [PATCH 0019/1744] Update config don't do ptt here --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 3d6107e0..eea64a4e 100755 --- a/config +++ b/config @@ -9,11 +9,11 @@ function transmit_command_aprs { sudo systemctl stop command echo "Transmit DTMF start" - gpio write 28 0 # ptt +# gpio write 28 0 # ptt gpio write 2 1 # tx LED timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-aprs.conf -t 0l gpio write 2 0 # tx LED - gpio write 28 1 #ptt +# gpio write 28 1 #ptt echo "Transmit stop" echo "Resuming command and control" From c8468e2df52724213dda01b5eb658b5913b362de Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 14:17:13 -0500 Subject: [PATCH 0020/1744] Update direwolf-transmit-dtmf-aprs.conf add ptt --- direwolf/direwolf-transmit-dtmf-aprs.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-transmit-dtmf-aprs.conf b/direwolf/direwolf-transmit-dtmf-aprs.conf index 786102cd..37ddbe97 100644 --- a/direwolf/direwolf-transmit-dtmf-aprs.conf +++ b/direwolf/direwolf-transmit-dtmf-aprs.conf @@ -1,4 +1,5 @@ ADEVICE hw:CARD=Loopback,DEV=0 hw:CARD=Headphones,DEV=0 +PTT GPIO 20 MYCALL AMSAT CHANNEL 0 MODEM 1200 From 828939a54e0f2ecaaefa3003e8177409f803f6ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 Nov 2024 22:17:24 -0500 Subject: [PATCH 0021/1744] Update direwolf-pacsatsim.conf added channel and modem to config --- direwolf/direwolf-pacsatsim.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index c335760a..27b58eab 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,3 +1,5 @@ -MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 From 184a65da56a98147236dcac42c63d39a65db874f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 10:01:43 -0500 Subject: [PATCH 0022/1744] Update install add Pacsat installation --- install | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/install b/install index 046ab3c8..e32bdd1d 100755 --- a/install +++ b/install @@ -122,9 +122,30 @@ cd rpitx ./install.sh +cd + +git clone https://github.com/ac2cz/iors_common.git + +cd iors_common/Debug/ + +make all + +sudo ./install.sh cd +git clone https://github.com/ac2cz/pi_pacsat.git + +cd pi_pacsat/Debug + +make all + +mkdir /home/pi/PacSat +mkdir /home/pi/PacSat/pacsat +mkdir /home/pi/PacSat/pacsat/dir + +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + cd sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service From e5a04b3397c438516446d622100899bd0c87ce26 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 10:21:42 -0500 Subject: [PATCH 0023/1744] Update pacsatsim.sh added export --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2ea4707b..68ae50da 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,6 +2,8 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + sudo modprobe snd-aloop #sudo systemctl stop openwebrx From 9ae6394219c65b0c1444d3b10bc7c0a2e2583fa5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 13:41:50 -0500 Subject: [PATCH 0024/1744] Update install dire wolf invert branch --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index e32bdd1d..2001b3a3 100755 --- a/install +++ b/install @@ -82,6 +82,8 @@ git clone https://github.com/alanbjohnston/direwolf.git cd direwolf +git checkout invert + make -j sudo make install From a7f1928c7c69480cc5b9a1089a4210ada1799808 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 13:48:00 -0500 Subject: [PATCH 0025/1744] Update pacsatsim.sh turn off cubesat and transmit --- pacsatsim.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 68ae50da..62f78088 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,6 +4,10 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +sudo systemctl stop cubesatsim + +sudo systemctl stop transmit + sudo modprobe snd-aloop #sudo systemctl stop openwebrx From 26a816212fa2cc1c438143234b736cdaf7a8d0ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 14:12:43 -0500 Subject: [PATCH 0026/1744] Update direwolf-pacsatsim.conf changed to USB card --- direwolf/direwolf-pacsatsim.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 27b58eab..62d1be3d 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From 47b1d3b6a2de772bf429686ec52513efa1ed3a3b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:01:41 -0500 Subject: [PATCH 0027/1744] Update install add passat.config creation --- install | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install b/install index 2001b3a3..688155ac 100755 --- a/install +++ b/install @@ -150,6 +150,18 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LI cd +cd PacSat + +echo "bit_rate=9600" > pacsat.config +echo "bbs_callsign=XY2ZZ-12" >> pacsat.config +echo "broadcast_callsign=XY2ZZ-11" >> pacsat.config +echo "digi_callsign=XY2ZZ-1" >> pacsat.config +echo "max_frames_in_tx_buffer=5" >> pacsat.config +echo "pb_open=1" >> pacsat.config +echo "uplink_open=1" >> pacsat.config + +cd + sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service sudo systemctl enable cubesatsim From 8029ce4c55f83448fce8fcee444c7743251534cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:02:10 -0500 Subject: [PATCH 0028/1744] Update direwolf-pacsat.conf added KISS port --- groundstation/direwolf/direwolf-pacsat.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index c335760a..fd4983eb 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,3 +1,4 @@ MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 +KISSPORT 8100 From 58177965b926838b845457acab9277db133a1fc4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:03:57 -0500 Subject: [PATCH 0029/1744] Update pacsat.sh add /home/pi/PacSat to script --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 2cca3cef..f063c3eb 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -190,6 +190,6 @@ rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t r cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar +sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSat" & sleep 5 From 379bc2c232668fdf8960a2fe87a12761db409218 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:11:17 -0500 Subject: [PATCH 0030/1744] Create direwolf-fm-pacsat.config --- groundstation/direwolf/direwolf-fm-pacsat.config | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat.config diff --git a/groundstation/direwolf/direwolf-fm-pacsat.config b/groundstation/direwolf/direwolf-fm-pacsat.config new file mode 100644 index 00000000..770b5422 --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat.config @@ -0,0 +1,4 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=1 plughw:CARD=Headphones,DEV=0 +PTT GPIO 20 +KISSPORT 8100 From 7dc04505f5661d06a1b6b4113678c81af25ee718 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:17:04 -0500 Subject: [PATCH 0031/1744] Update pacsat.sh check for USB sound card --- groundstation/pacsat.sh | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f063c3eb..07de1642 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -173,23 +173,33 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] else - echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" -fi + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & -sleep 5 + else + + echo -e "Direwolf using RTL-SDR on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & -value=`aplay -l | grep "Loopback"` -echo "$value" > /dev/null -set -- $value + sleep 5 + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + + fi cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSat" & sleep 5 + +fi From 3d01785a0096c49a2189e8ebd3948887fff820bf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:18:53 -0500 Subject: [PATCH 0032/1744] Rename direwolf-fm-pacsat.config to direwolf-fm-pacsat.conf --- .../{direwolf-fm-pacsat.config => direwolf-fm-pacsat.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename groundstation/direwolf/{direwolf-fm-pacsat.config => direwolf-fm-pacsat.conf} (100%) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.config b/groundstation/direwolf/direwolf-fm-pacsat.conf similarity index 100% rename from groundstation/direwolf/direwolf-fm-pacsat.config rename to groundstation/direwolf/direwolf-fm-pacsat.conf From c10894e28d5e4abe5fddd24adec62a4988d7f029 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:20:36 -0500 Subject: [PATCH 0033/1744] Update direwolf-fm-pacsat.conf dev 0 --- groundstation/direwolf/direwolf-fm-pacsat.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf index 770b5422..dab844ae 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat.conf @@ -1,4 +1,4 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=1 plughw:CARD=Headphones,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 From 5a284b9938fdf89860a62950a9dbfc6806dc40c4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:51:00 -0500 Subject: [PATCH 0034/1744] Create PacSatSim.dat --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46m/PacSatSim.dat diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat new file mode 100644 index 00000000..d526f51d --- /dev/null +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -0,0 +1,15 @@ +Pacsat Telemetry Decoder Properties +#Sat Nov 26 18:12:20 EST 2016 +numberOfLookupTables=0 +measurementsFileName=measurements.csv +model=1 +layout0.filename=PACSATSIM_rttelemetry.csv +layout0.name=TLMI_LAYOUT +passMeasurementsFileName=passmeasurements.csv +name=Pacsat +description=PacSatSim +numberOfLayouts=1 +satId=3 +catalogNumber=0 +conversionCoefficients=pacsat-coef.csv +layoutsUseBits=True From a19b591fc8e9e74897b511407097cdba965fa004 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:53:13 -0500 Subject: [PATCH 0035/1744] Create PacSatSim.properties --- .../PacSatGround_0.46m/PacSatSim.properties | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46m/PacSatSim.properties diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.properties b/spacecraft/PacSatGround_0.46m/PacSatSim.properties new file mode 100644 index 00000000..d18ebe5c --- /dev/null +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.properties @@ -0,0 +1,20 @@ +#PacSat Ground Station Properties +#Sun Feb 17 18:25:06 EST 2019 +sequence_num=3 +name=PacSatSim +digiCallsign=W3ZM-1 +description=PacSatSim +broadcastCallsign=W3ZM-11 +DIR_AGE=10 +bbsCallsign=W3ZM-12 +telemLayoutFile=PacSatSim.dat +telem_server=tlm.amsatfox.org +web_site_url=http://CubeSatSim.org +show_system_files_on_dir_tab=false +show_user_files=true +supports_file_upload=true +norad_id=30776 +psf_header_check_sums=false +commandsFile=pacsat.commands +is_command_station=true +secret_key=ScKQLp2ZMvCaCTK5jAmOmKmA0JiSyJ6Y15+Yfg\=\= From ffe5f107ad7ad4891d32a52d633a1a45aa50938a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 16:53:41 -0500 Subject: [PATCH 0036/1744] Update PacSatSim.dat --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat index d526f51d..92ae8f93 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -3,10 +3,10 @@ Pacsat Telemetry Decoder Properties numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PACSATSIM_rttelemetry.csv +layout0.filename=PACSAT_rttelemetry.csv layout0.name=TLMI_LAYOUT passMeasurementsFileName=passmeasurements.csv -name=Pacsat +name=PacSatSim description=PacSatSim numberOfLayouts=1 satId=3 From 21e723d18c03191125d6340569b21c56804b628e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:39:54 -0500 Subject: [PATCH 0037/1744] Update config add -G change to Pacsat --- config | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config b/config index eea64a4e..086b3874 100755 --- a/config +++ b/config @@ -1409,6 +1409,15 @@ elif [ "$1" = "-g" ]; then fi +elif [ "$1" = "-G" ]; then + + echo "Changing to Pacsat mode" + echo + sudo systemctl stop cubesatsim + sudo systemctl stop transmit + + /home/pi/CubeSatSim/pacsat.sh + elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -1445,6 +1454,7 @@ elif [ "$1" = "-h" ]; then echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings" + echo " -G Change to Pacsat mode" echo exit From 84b8b81f2acc4764152f591e0564aa91b55cf1ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:46:29 -0500 Subject: [PATCH 0038/1744] Update install download passat ground station --- install | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/install b/install index 688155ac..c29ba505 100755 --- a/install +++ b/install @@ -162,6 +162,16 @@ echo "uplink_open=1" >> pacsat.config cd +cd /tmp + +wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz + +unzip PacSatGround_0.46m_linux.tar.gz -d /home/pi/Desktop + +rm PacSatGround_0.46m_linux.tar.gz + +cd + sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service sudo systemctl enable cubesatsim From d4d0fb542c87fb604bd290a9abe76cce6eeb07c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:48:41 -0500 Subject: [PATCH 0039/1744] Update pacsatsim.sh add -qd to dire wolf --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 62f78088..5d3713b5 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -175,13 +175,13 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & fi From fd7dd67663a705f3cb7ef423c773f69d6216283d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:53:02 -0500 Subject: [PATCH 0040/1744] Update pacsat.sh dire wolf -qd and PacSatGround --- groundstation/pacsat.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 07de1642..4695519e 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,9 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null @@ -169,7 +169,7 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & else @@ -177,13 +177,13 @@ else echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & else echo -e "Direwolf using RTL-SDR on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & sleep 5 @@ -198,7 +198,7 @@ else cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSat" & +sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & sleep 5 From 22e20ab6bbfdef5a8373dfe0514b2a15ea4bfd2d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:54:08 -0500 Subject: [PATCH 0041/1744] Update install PacSatGround --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index c29ba505..edea60f8 100755 --- a/install +++ b/install @@ -170,6 +170,8 @@ unzip PacSatGround_0.46m_linux.tar.gz -d /home/pi/Desktop rm PacSatGround_0.46m_linux.tar.gz +mkdir /home/pi/PacSatGround + cd sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service From b97e08cab31b7a61f138c8cf698e1c3cbc28ae0c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 22:59:37 -0500 Subject: [PATCH 0042/1744] Update install set callsign in pacsat.config --- install | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/install b/install index edea60f8..51509ee5 100755 --- a/install +++ b/install @@ -152,10 +152,14 @@ cd cd PacSat +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=XY2ZZ-12" >> pacsat.config -echo "broadcast_callsign=XY2ZZ-11" >> pacsat.config -echo "digi_callsign=XY2ZZ-1" >> pacsat.config +echo "bbs_callsign=$1" >> pacsat.config +echo "broadcast_callsign=$1-11" >> pacsat.config +echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" >> pacsat.config echo "uplink_open=1" >> pacsat.config From b81492ba32f299742218b83200246ae6ed9e0c42 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 Nov 2024 23:05:58 -0500 Subject: [PATCH 0043/1744] Update config change callsign in pacsat config --- config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config b/config index 086b3874..89727f2c 100755 --- a/config +++ b/config @@ -525,14 +525,16 @@ elif [ "$1" = "-c" ]; then echo "$value" > /dev/null set -- $value + callsign="$1" + echo "Current value of CALLSIGN is" - echo $1 + echo $oldcallsign echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} echo "Enter callsign in all capitals: " - read callsign + read $oldcallsign if [ -z $callsign ] ; then @@ -545,6 +547,8 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config fi if [ "$norestart" = "1" ]; then From 81cc1c7348d420e83a07b77be9a3e851fc139f7d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 08:36:26 -0500 Subject: [PATCH 0044/1744] Update pacsat.sh stop CubeSatSim and transmit --- groundstation/pacsat.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 07de1642..aafc69d0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,13 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +sudo systemctl stop cubesatsim &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop transmit &>/dev/null + +sudo systemctl stop openwebrx &>/dev/null + +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null From 46dfb90bd96c2522cc3ce0bb6de848c567e6dcf8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 11:24:11 -0500 Subject: [PATCH 0045/1744] Update pacsatsim.sh cd to Debug, don't prompt frequency --- pacsatsim.sh | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5d3713b5..b1c20612 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -46,20 +46,22 @@ echo #exit -echo "Choose the number for the packet decoding option:" -echo -echo "1. APRS US 2m (144390 kHz)" -echo "2. CubeSatSim (434900 kHz)" -echo "3. APRS European 2m (144800 kHz)" -echo "4. APRS Australian 2m (145175 kHz)" -echo "5. APRS on another frequency" -echo "6. APRS on ISS (145825 kHz)" -echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -echo "8. Test Serenity CubeSat decoding with WAV file" -echo "9. Test APRS decoding with CubeSatSim WAV file" -echo - -read -r choice +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +choice=2 #fi @@ -193,6 +195,8 @@ set -- $value #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & -/home/pi/pi_pacsat/Debug/pi_pacsat -c /home/pi/pi_pacsat/Debug/pacsat.config -d /home/pi/PacSat +cd /home/pi/pi_pacsat/Debug + +./pi_pacsat -c pacsat.config -d /home/pi/PacSat sleep 5 From d726d004eb9a44c1e0e2cdcaa243b4d415f6f423 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 14:36:39 -0500 Subject: [PATCH 0046/1744] Update install config.txt changes --- install | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/install b/install index 51509ee5..69380167 100755 --- a/install +++ b/install @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\ninstallation script for CubeSatSim v2.0\n" +echo -e "\ninstallation script for CubeSatSim v2.1\n" FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then @@ -161,11 +161,18 @@ echo "bbs_callsign=$1" >> pacsat.config echo "broadcast_callsign=$1-11" >> pacsat.config echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config -echo "pb_open=1" >> pacsat.config -echo "uplink_open=1" >> pacsat.config + +echo "pb_open=1" > pacsat.state +echo "uplink_open=1" >> pacsat.state cd +sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt +sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt +sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt + +sudo raspi-config nonint do_vnc 0 + cd /tmp wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz @@ -206,11 +213,10 @@ sudo raspi-config nonint do_legacy 0 ## sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 - + #sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then From d74b8b7f862c8ad79d14451b4119812de4005a12 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 14:47:53 -0500 Subject: [PATCH 0047/1744] Update config don't update pacsat callsign --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 89727f2c..db0100c2 100755 --- a/config +++ b/config @@ -548,7 +548,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config +# sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config fi if [ "$norestart" = "1" ]; then From 4afd9bba1cd1bf5e74bd472dc34934fdeb272ab1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 14:53:53 -0500 Subject: [PATCH 0048/1744] Update config don't look at output of sed on callsign --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index db0100c2..ed62d2d3 100755 --- a/config +++ b/config @@ -548,7 +548,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg -# sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config > /dev/null 2>&1 fi if [ "$norestart" = "1" ]; then From 384086003796ef6f7885ba2cdfa17168f2a09015 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 15:05:38 -0500 Subject: [PATCH 0049/1744] Update config fix -c bug --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index ed62d2d3..9c2d5671 100755 --- a/config +++ b/config @@ -525,7 +525,7 @@ elif [ "$1" = "-c" ]; then echo "$value" > /dev/null set -- $value - callsign="$1" + oldcallsign="$1" echo "Current value of CALLSIGN is" echo $oldcallsign @@ -534,7 +534,7 @@ elif [ "$1" = "-c" ]; then # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} echo "Enter callsign in all capitals: " - read $oldcallsign + read $callsign if [ -z $callsign ] ; then From 1de4e6535869c996897813a04493a4bbd9d47802 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 15:07:56 -0500 Subject: [PATCH 0050/1744] Update config typo in -c --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 9c2d5671..e4c41243 100755 --- a/config +++ b/config @@ -534,7 +534,7 @@ elif [ "$1" = "-c" ]; then # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} echo "Enter callsign in all capitals: " - read $callsign + read callsign if [ -z $callsign ] ; then From c0c23db6b1b51febe02fe2d50762eb7e513dce36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 15:38:57 -0500 Subject: [PATCH 0051/1744] Update install --- install | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/install b/install index 69380167..559351ca 100755 --- a/install +++ b/install @@ -148,10 +148,6 @@ mkdir /home/pi/PacSat/pacsat/dir export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH -cd - -cd PacSat - value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value @@ -165,8 +161,6 @@ echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" > pacsat.state echo "uplink_open=1" >> pacsat.state -cd - sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt @@ -177,7 +171,7 @@ cd /tmp wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz -unzip PacSatGround_0.46m_linux.tar.gz -d /home/pi/Desktop +tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop rm PacSatGround_0.46m_linux.tar.gz From 776aba9511527bde727d48cacd293c3968976750 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 16:22:06 -0500 Subject: [PATCH 0052/1744] Update install add java install --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 559351ca..62160b9d 100755 --- a/install +++ b/install @@ -177,6 +177,8 @@ rm PacSatGround_0.46m_linux.tar.gz mkdir /home/pi/PacSatGround +sudo apt-get install default-jdk -y + cd sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service From ac61e44c09be5bb9ea1a1181d556f620ec9e94c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 16:35:59 -0500 Subject: [PATCH 0053/1744] Update install copy spacecraft files --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 62160b9d..2b4048d6 100755 --- a/install +++ b/install @@ -175,6 +175,8 @@ tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop rm PacSatGround_0.46m_linux.tar.gz +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ + mkdir /home/pi/PacSatGround sudo apt-get install default-jdk -y From a64c34c41a5f7179550a4d3543c73d71cdb0eb52 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:39:28 -0500 Subject: [PATCH 0054/1744] Update config Pacsat mode "p" in .mode --- config | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/config b/config index e4c41243..ea596d16 100755 --- a/config +++ b/config @@ -1416,11 +1416,22 @@ elif [ "$1" = "-g" ]; then elif [ "$1" = "-G" ]; then echo "Changing to Pacsat mode" - echo - sudo systemctl stop cubesatsim - sudo systemctl stop transmit + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value - /home/pi/CubeSatSim/pacsat.sh + echo "changing CubeSatSim to Pacsat mode" + sudo echo "p" > /home/pi/CubeSatSim/.mode + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + restart=1 + else + reboot=1 + fi + else + restart=1 + fi elif [ "$1" = "-h" ]; then From 3422b197723e075bbeaaf09ba9cb386456f2f835 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:42:56 -0500 Subject: [PATCH 0055/1744] Update main.c added PACSAT mode --- main.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 36dfce4c..b529a619 100644 --- a/main.c +++ b/main.c @@ -233,7 +233,10 @@ int main(int argc, char * argv[]) { printf("Mode is Repeater\n"); } else if ( mode_string == 'n') { mode = TXCOMMAND; - printf("Mode is Transmit Command\n"); + printf("Mode is Transmit Command\n"); + } else if ( mode_string == 'p') { + mode = PACSAT; + printf("Mode is Pacsat\n"); } else { printf("Mode is BPSK\n"); } @@ -869,7 +872,7 @@ int main(int argc, char * argv[]) { } else if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV + } else { // SSTV or PACSAT // fprintf(stderr, "Sleeping\n"); sleep(30); } @@ -2205,7 +2208,7 @@ if (setting == ON) { pclose(command); fprintf(stderr,"Turning Safe Mode ON\n"); fprintf(stderr,"Turning Battery saver mode ON\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { command = popen("echo 'reboot due to turning ON Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); @@ -2221,7 +2224,7 @@ if (setting == ON) { FILE *command = popen("rm /home/pi/CubeSatSim/battery_saver", "r"); pclose(command); fprintf(stderr,"Turning Battery saver mode OFF\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); From e4c2f5f99701ae5e6b9eff1c84d051ab4e242550 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:43:39 -0500 Subject: [PATCH 0056/1744] Update main.h add PACSAT mode 6 --- main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main.h b/main.h index 6708d1af..0b794df2 100644 --- a/main.h +++ b/main.h @@ -108,6 +108,7 @@ FILE *telem_file; #define BPSK 3 #define SSTV 4 #define CW 5 +#define PACSAT 6 #define REPEATER 11 #define TXCOMMAND 12 From 739e9706a01fb57502919e2b961c2a84d71be745 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:48:21 -0500 Subject: [PATCH 0057/1744] Update transmit.py added Pacsat mode --- transmit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 859892f9..f04d8cd7 100644 --- a/transmit.py +++ b/transmit.py @@ -381,7 +381,7 @@ if __name__ == "__main__": # if (mode != ) and (command_tx == True): # if (command_tx == True): - if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's')) and (command_tx == True) and (skip == False): + if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p')) and (command_tx == True) and (skip == False): # battery_saver_mode GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 GPIO.setup(txLed, GPIO.OUT) @@ -415,12 +415,15 @@ if __name__ == "__main__": # if (len(sys.argv)) > 1: # print("There are arguments!") - if (mode == 'a') or (mode == 'x') or (mode == 'n'): + if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p'): # command_control_check() output(pd, 1) output(ptt, 1) if (mode == 'a'): print("AFSK") + elif (mode == 'p'): + print("Pacsat") + system('/home/pi/CubeSatSim/pacsat.sh') else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From a66ebedff922e18ed08349f8d8c0690a31760ed2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:49:46 -0500 Subject: [PATCH 0058/1744] Update config v2.1 --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index ea596d16..ec62cf75 100755 --- a/config +++ b/config @@ -210,7 +210,7 @@ function transmit_command_beacon { exit } -echo "CubeSatSim v2.0 configuration tool" +echo "CubeSatSim v2.1 configuration tool" echo # echo $1 # echo $2 From fe0791ec6f33860b59ca93d0b557e9a9fcf731bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:50:08 -0500 Subject: [PATCH 0059/1744] Update main.c v2.1 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index b529a619..f642a907 100644 --- a/main.c +++ b/main.c @@ -25,7 +25,7 @@ int main(int argc, char * argv[]) { - printf("\n\nCubeSatSim v2.0 starting...\n\n"); + printf("\n\nCubeSatSim v2.1 starting...\n\n"); wiringPiSetup(); From 7eaf1e284a79379fc79d52a8c939c6d0d122e352 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:50:30 -0500 Subject: [PATCH 0060/1744] Update transmit.py v2.1 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f04d8cd7..a047695b 100644 --- a/transmit.py +++ b/transmit.py @@ -136,7 +136,7 @@ def increment_mode(): print("can't write to .mode file") -print("CubeSatSim v2.0 transmit.py starting...") +print("CubeSatSim v2.1 transmit.py starting...") pd = 21 ptt = 20 From 263fd869813ad8304cc960e451f57be7b0aba036 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:54:18 -0500 Subject: [PATCH 0061/1744] Update transmit.py fixed pacsat call --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index a047695b..05c4b071 100644 --- a/transmit.py +++ b/transmit.py @@ -423,7 +423,7 @@ if __name__ == "__main__": print("AFSK") elif (mode == 'p'): print("Pacsat") - system('/home/pi/CubeSatSim/pacsat.sh') + system('/home/pi/CubeSatSim/pacsatsim.sh') else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From d064598d300d0902d938bea0c866d9a83444196d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:55:35 -0500 Subject: [PATCH 0062/1744] Update config display pacsat --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index ec62cf75..b7c4d3f6 100755 --- a/config +++ b/config @@ -257,6 +257,8 @@ if [ "$1" = "" ]; then else echo -n "APRS" fi + elif [ "$1" = "p" ]; then + echo "Mode is Pacsat" else echo fi From dabca2d79464d73fb84aa8422767e63e2793767e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 21:57:46 -0500 Subject: [PATCH 0063/1744] Update pacsatsim.sh don't stop CubeSatSim or transmit --- pacsatsim.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index b1c20612..ffe823bf 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,15 +4,17 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH -sudo systemctl stop cubesatsim +#sudo systemctl stop cubesatsim -sudo systemctl stop transmit +#sudo systemctl stop transmit + +sudo systemctl stop command &>/dev/null sudo modprobe snd-aloop #sudo systemctl stop openwebrx -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null #pkill -o chromium &>/dev/null From b729af95f16ba3bde036483888678718a99a24ff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 30 Nov 2024 22:17:38 -0500 Subject: [PATCH 0064/1744] Update pacsat.sh stop command --- groundstation/pacsat.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 95c71877..57ebeb58 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,11 +4,12 @@ sudo modprobe snd-aloop - sudo systemctl stop cubesatsim &>/dev/null sudo systemctl stop transmit &>/dev/null +sudo systemctl stop command &>/dev/null + sudo systemctl stop openwebrx &>/dev/null sudo systemctl stop rtl_tcp &>/dev/null From 57ddc39f4e9c68a9a15cd6bc3fe96a9953007eef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 07:33:24 -0500 Subject: [PATCH 0065/1744] Update update to install pacsat software --- update | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 2 deletions(-) diff --git a/update b/update index fcef1749..f612f69e 100755 --- a/update +++ b/update @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nupdate script for CubeSatSim v2.0\n" +echo -e "\nupdate script for CubeSatSim v2.1\n" if [ "$1" = "n" ] ; then # if [ -z "$2" ] ; then @@ -33,7 +33,7 @@ sudo sed -i 's/more information/more\ninformation/g' /etc/motd sudo sed -i 's/update to/update\nto/g' /etc/motd -sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +#sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 cd /home/pi/CubeSatSim @@ -300,6 +300,81 @@ git checkout master #fi +if [ ! -d "/home/pi/pi_pacsat" ]; then + + cd + + git clone https://github.com/ac2cz/iors_common.git + + cd iors_common/Debug/ + + make all + + sudo ./install.sh + + cd + + git clone https://github.com/ac2cz/pi_pacsat.git + + cd pi_pacsat/Debug + + make all + + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + + export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo "bit_rate=9600" > pacsat.config + echo "bbs_callsign=$1" >> pacsat.config + echo "broadcast_callsign=$1-11" >> pacsat.config + echo "digi_callsign=$1-1" >> pacsat.config + echo "max_frames_in_tx_buffer=5" >> pacsat.config + + echo "pb_open=1" > pacsat.state + echo "uplink_open=1" >> pacsat.state + + sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt + sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt + sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt + + sudo raspi-config nonint do_vnc 0 + + cd /tmp + + wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz + + tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop + + rm PacSatGround_0.46m_linux.tar.gz + + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ + + mkdir /home/pi/PacSatGround + + sudo apt-get install default-jdk -y + +cd + +fi + +cd rpitx + +if [[ ! $(git status | grep 'invert') ]]; then + + echo "updating rpitx to ptt invert branch" + git pull + git checkout invert + ./update.sh + cd + +fi + changed=0 value=`cat /home/pi/CubeSatSim/sim.cfg` # echo "$value" From 55b6bb66a15710f22662faebeaaf064997c24c3d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:22:28 -0500 Subject: [PATCH 0066/1744] Update update fixed direwolf update --- update | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/update b/update index f612f69e..8bfed65e 100755 --- a/update +++ b/update @@ -363,14 +363,18 @@ cd fi -cd rpitx +cd direwolf if [[ ! $(git status | grep 'invert') ]]; then - echo "updating rpitx to ptt invert branch" + echo "updating direwolf to ptt invert version" + git pull git checkout invert - ./update.sh + make clean + make -j + sudo make install + make install-rpi cd fi From e90a0821490b12af2a4cc42a761d5dd7b2d2f711 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:25:32 -0500 Subject: [PATCH 0067/1744] Update update fixed cd --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index 8bfed65e..d1c6eefd 100755 --- a/update +++ b/update @@ -363,7 +363,7 @@ cd fi -cd direwolf +cd /home/pi/direwolf if [[ ! $(git status | grep 'invert') ]]; then From 7fa7aaff6731a608aeed6002677979c99ba330fc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:31:23 -0500 Subject: [PATCH 0068/1744] Update update --- update | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/update b/update index d1c6eefd..16e51b01 100755 --- a/update +++ b/update @@ -365,11 +365,15 @@ fi cd /home/pi/direwolf +git status + +git status | grep 'invert' + if [[ ! $(git status | grep 'invert') ]]; then echo "updating direwolf to ptt invert version" - git pull + git pull --no-rebase git checkout invert make clean make -j From 71d11c64882071fd70da167c0362b940561d4e08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:35:39 -0500 Subject: [PATCH 0069/1744] Update update remove extra git --- update | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update b/update index 16e51b01..4f47510e 100755 --- a/update +++ b/update @@ -365,9 +365,9 @@ fi cd /home/pi/direwolf -git status +#git status -git status | grep 'invert' +#git status | grep 'invert' if [[ ! $(git status | grep 'invert') ]]; then From cd5a39846bf76da6835c5f3c6bec0e5297e10b08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 10:54:44 -0500 Subject: [PATCH 0070/1744] Update update remove single cpu --- update | 1 + 1 file changed, 1 insertion(+) diff --git a/update b/update index 4f47510e..4dbbf79f 100755 --- a/update +++ b/update @@ -34,6 +34,7 @@ sudo sed -i 's/more information/more\ninformation/g' /etc/motd sudo sed -i 's/update to/update\nto/g' /etc/motd #sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt # remove single core cd /home/pi/CubeSatSim From 24c54e6380b776395113d5e1848c769146796738 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 11:35:10 -0500 Subject: [PATCH 0071/1744] Update update reboot if adding pacsat code --- update | 2 ++ 1 file changed, 2 insertions(+) diff --git a/update b/update index 4dbbf79f..6d74a557 100755 --- a/update +++ b/update @@ -302,6 +302,8 @@ git checkout master #fi if [ ! -d "/home/pi/pi_pacsat" ]; then + + FLAG=1 cd From fa89f12a2f8fa649561e83f633a4bd5c65736f5b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 13:09:34 -0500 Subject: [PATCH 0072/1744] Update direwolf-pacsatsim.conf set fullduplex off --- direwolf/direwolf-pacsatsim.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 62d1be3d..370e54b0 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -3,3 +3,4 @@ PTT GPIO 20 MYCALL AMSAT CHANNEL 0 MODEM 1200 +FULLDUP OFF From 9a658b02ed990bfc6752bf2ce47be1f7e798a6ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 13:10:15 -0500 Subject: [PATCH 0073/1744] Update direwolf-fm-pacsat.conf full duplex off --- groundstation/direwolf/direwolf-fm-pacsat.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf index dab844ae..fba77b7e 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat.conf @@ -2,3 +2,4 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 +FULLDUP OFF From 2fb339fd8b6c107c5a1a9e11d6f333470a9724fb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 13:10:32 -0500 Subject: [PATCH 0074/1744] Update direwolf-pacsat.conf full duplex off --- groundstation/direwolf/direwolf-pacsat.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index fd4983eb..e526e272 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -2,3 +2,4 @@ MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 +FULLDUP OFF From 7c4c344b0dcb329ec8d67b1af1baa940106f899f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:02:17 -0500 Subject: [PATCH 0075/1744] Update config .mode P is pacsat ground station --- config | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/config b/config index b7c4d3f6..ab80445b 100755 --- a/config +++ b/config @@ -1435,6 +1435,28 @@ elif [ "$1" = "-G" ]; then restart=1 fi +elif [ "$1" = "-H" ]; then + + echo "Changing to Pacsat Ground Station mode" + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + echo "changing CubeSatSim to Pacsat mode" + sudo echo "P" > /home/pi/CubeSatSim/.mode + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + restart=1 + else + reboot=1 + fi + else + restart=1 + fi + + + elif [ "$1" = "-h" ]; then echo "config OPTION" From 621bcb0fd068d7aed50e952a3e1cebed57e54add Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:04:13 -0500 Subject: [PATCH 0076/1744] Update main.c added PACSATGND --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index f642a907..f520add1 100644 --- a/main.c +++ b/main.c @@ -237,7 +237,10 @@ int main(int argc, char * argv[]) { } else if ( mode_string == 'p') { mode = PACSAT; printf("Mode is Pacsat\n"); - } else { + } else if ( mode_string == 'P') { + mode = PACSATGND; + printf("Mode is Pacsat Ground Station\n"); + } else { printf("Mode is BPSK\n"); } } @@ -872,7 +875,7 @@ int main(int argc, char * argv[]) { } else if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV or PACSAT + } else { // SSTV or PACSAT or PACSATGND // fprintf(stderr, "Sleeping\n"); sleep(30); } From ccc5c4ff9733ff974c84378734a903e567bb0030 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:04:52 -0500 Subject: [PATCH 0077/1744] Update main.h added PACSATGND --- main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main.h b/main.h index 0b794df2..83f993ae 100644 --- a/main.h +++ b/main.h @@ -111,6 +111,7 @@ FILE *telem_file; #define PACSAT 6 #define REPEATER 11 #define TXCOMMAND 12 +#define PACSATGND 13 int transmitStatus = -1; From 042670a2316597b94beaa93ff3fbe54ca69ee89a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:07:25 -0500 Subject: [PATCH 0078/1744] Update transmit.py added mode P for Pacsat Gnd Station --- transmit.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 05c4b071..87a616ad 100644 --- a/transmit.py +++ b/transmit.py @@ -415,7 +415,7 @@ if __name__ == "__main__": # if (len(sys.argv)) > 1: # print("There are arguments!") - if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p'): + if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p') or (mode == 'P': # command_control_check() output(pd, 1) output(ptt, 1) @@ -424,6 +424,10 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") system('/home/pi/CubeSatSim/pacsatsim.sh') + elif (mode == 'p'): + print("Pacsat Ground Station") + while True: + sleep(30) else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From 79bd5a787dcbd3898e8ab2d3f2332a4917b79771 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:11:02 -0500 Subject: [PATCH 0079/1744] Update transmit.py typo --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 87a616ad..ba826051 100644 --- a/transmit.py +++ b/transmit.py @@ -381,7 +381,7 @@ if __name__ == "__main__": # if (mode != ) and (command_tx == True): # if (command_tx == True): - if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p')) and (command_tx == True) and (skip == False): + if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False): # battery_saver_mode GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 GPIO.setup(txLed, GPIO.OUT) @@ -415,7 +415,7 @@ if __name__ == "__main__": # if (len(sys.argv)) > 1: # print("There are arguments!") - if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p') or (mode == 'P': + if (mode == 'a') or (mode == 'x') or (mode == 'n') or (mode == 'p') or (mode == 'P'): # command_control_check() output(pd, 1) output(ptt, 1) From 2e1f2024e7b4d29290f0a37e61fa7b160ab91afa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:13:57 -0500 Subject: [PATCH 0080/1744] Update config changed to -I --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index ab80445b..800352de 100755 --- a/config +++ b/config @@ -1435,7 +1435,7 @@ elif [ "$1" = "-G" ]; then restart=1 fi -elif [ "$1" = "-H" ]; then +elif [ "$1" = "-I" ]; then echo "Changing to Pacsat Ground Station mode" value=`cat /home/pi/CubeSatSim/.mode` @@ -1494,6 +1494,7 @@ elif [ "$1" = "-h" ]; then echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings" echo " -G Change to Pacsat mode" + echo " -I Changing to Pacsat Ground Station mode" echo exit From 2077bfe7f7238a22a2fd8d0cf8e8ddc1cbfc7b37 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:16:51 -0500 Subject: [PATCH 0081/1744] Update pacsat.sh run Config -I --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 57ebeb58..e2b3d1ad 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,11 @@ sudo modprobe snd-aloop -sudo systemctl stop cubesatsim &>/dev/null +#sudo systemctl stop cubesatsim &>/dev/null -sudo systemctl stop transmit &>/dev/null +#sudo systemctl stop transmit &>/dev/null + +/home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null From 8ede3a5c9ef1ab7f47b3452f090b30d6288a5be2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:26:41 -0500 Subject: [PATCH 0082/1744] Update transmit.py don't turn on c2c for p or P mode --- transmit.py | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/transmit.py b/transmit.py index ba826051..a1250e44 100644 --- a/transmit.py +++ b/transmit.py @@ -326,23 +326,24 @@ if __name__ == "__main__": print("Can't read callsign from sim.cfg file, defaulting to AMSAT") file.close() - try: - f = open("/home/pi/CubeSatSim/command_control", "r") - f.close() - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected - if GPIO.input(squelch) == False: - print("squelch not set correctly, no command input!") + if (mode != 'p') and (mode != 'P'): + try: + f = open("/home/pi/CubeSatSim/command_control", "r") + f.close() + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected + if GPIO.input(squelch) == False: + print("squelch not set correctly, no command input!") + no_command = True + else: + print("command and control is activated") + no_command = False + # system("/home/pi/CubeSatSim/command &") + system("sudo systemctl start command") + except: + print("command and control not activated") no_command = True - else: - print("command and control is activated") - no_command = False -# system("/home/pi/CubeSatSim/command &") - system("sudo systemctl start command") - except: - print("command and control not activated") - no_command = True print(callsign) GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 From 64a11849355b7898a30c3f1494f1182f787e8d0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 15:28:57 -0500 Subject: [PATCH 0083/1744] Update config add print Pacsat ground station mode --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 800352de..3764aa86 100755 --- a/config +++ b/config @@ -259,6 +259,8 @@ if [ "$1" = "" ]; then fi elif [ "$1" = "p" ]; then echo "Mode is Pacsat" + elif [ "$1" = "P" ]; then + echo "Mode is Pacsat Ground Station" else echo fi From b00a99649c900c86842b85b37a99506e435e8d27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 16:29:33 -0500 Subject: [PATCH 0084/1744] Update pacsat.sh --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e2b3d1ad..ee56972d 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -206,7 +206,7 @@ else cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & +sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" sleep 5 From 8433067061fdf11c809cb78f70def84b7d165174 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Dec 2024 16:39:48 -0500 Subject: [PATCH 0085/1744] Update pacsat.sh no frequency prompt --- groundstation/pacsat.sh | 188 ++++++---------------------------------- 1 file changed, 27 insertions(+), 161 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index ee56972d..8e728541 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,10 +4,6 @@ sudo modprobe snd-aloop -#sudo systemctl stop cubesatsim &>/dev/null - -#sudo systemctl stop transmit &>/dev/null - /home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null @@ -36,178 +32,48 @@ sudo killall -9 zenity &>/dev/null echo -frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") - -#echo $frequency - -if [ -z "$frequency" ]; then - -echo "No choice made. Exiting." - -sleep 3 - -exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -fi - -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 - echo - echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." - echo - -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value +echo "Receive frequency is $8 MHz" +echo "Transmit frequency is $7 MHz" +echo +echo "To change, quit and type CubeSatSim/config -F" echo +frequency="$8e6" + echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." echo -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then +if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" + + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & else - if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - - echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & - - else - - echo -e "Direwolf using RTL-SDR on $frequency Hz" - - direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + echo -e "Direwolf using RTL-SDR on $frequency Hz" + + direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + + sleep 5 + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 + rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - sleep 5 - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -#rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - - fi +fi cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -sleep 5 -fi + From 7c9b16a3a99c1f0d384ebdc59b938c8e39d80fc6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 17:42:35 -0500 Subject: [PATCH 0086/1744] added for JP14 audio out --- direwolf/direwolf-pacsatsim-jp14.conf | 6 ++++++ groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 5 +++++ groundstation/pacsat.sh | 2 +- pacsatsim.sh | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 direwolf/direwolf-pacsatsim-jp14.conf create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14.conf diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf new file mode 100644 index 00000000..6b28d029 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -0,0 +1,6 @@ +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO 20 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +FULLDUP OFF diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf new file mode 100644 index 00000000..b698b1ca --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -0,0 +1,5 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO 20 +KISSPORT 8100 +FULLDUP OFF diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 8e728541..f3ff484f 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -52,7 +52,7 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & else diff --git a/pacsatsim.sh b/pacsatsim.sh index ffe823bf..71d45328 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf -t 0 & + direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From 22917da1812f923a303d146acd262e360e67bec1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:24:02 -0500 Subject: [PATCH 0087/1744] Update direwolf-fm-pacsat-jp14.conf added TXDELAY --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index b698b1ca..bcf67f4a 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -3,3 +3,4 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF +TXDELAY 30 From bfa12ec67197e568930a0357c980466b26204d69 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:24:24 -0500 Subject: [PATCH 0088/1744] Update direwolf-pacsatsim-jp14.conf added TXDELAY --- direwolf/direwolf-pacsatsim-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 6b28d029..94862393 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,3 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF +TXDELAY 30 From 06917939ae4017da6fef7f49f4e1818b052228c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:43:53 -0500 Subject: [PATCH 0089/1744] Update direwolf-pacsatsim-jp14.conf TXDELAY 1 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 94862393..4a3b0e55 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 30 +TXDELAY 1 From 94c56d5a238db245a9be27774c187218d49b2f7d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:44:17 -0500 Subject: [PATCH 0090/1744] Update direwolf-fm-pacsat-jp14.conf TXDELAY 1 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index bcf67f4a..c480ee60 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -3,4 +3,4 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF -TXDELAY 30 +TXDELAY 1 From 390b6fecc7e5aa610ea7b180840f45604c52f036 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:52:03 -0500 Subject: [PATCH 0091/1744] Update direwolf-fm-pacsat-jp14.conf try 5 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index c480ee60..ac342354 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -3,4 +3,4 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF -TXDELAY 1 +TXDELAY 5 From 1492df7d1b7e8190957d32d7f1f9d263156bd8a4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 19:52:18 -0500 Subject: [PATCH 0092/1744] Update direwolf-pacsatsim-jp14.conf --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 4a3b0e55..475a8453 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 1 +TXDELAY 5 From 58da647eeac517f7c436ef26afdbff36cea3fbe7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:07:29 -0500 Subject: [PATCH 0093/1744] Update direwolf-pacsatsim-jp14.conf try 2400 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 475a8453..b75fc802 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -2,6 +2,6 @@ ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 -MODEM 1200 +MODEM 2400 FULLDUP OFF TXDELAY 5 From caab43c884ea44dda98058d919113b278f278b4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:08:30 -0500 Subject: [PATCH 0094/1744] Update direwolf-fm-pacsat-jp14.conf try 2400, added MODEM and CHANNEL --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index ac342354..a6ee92cd 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,6 +1,8 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 +PTT GPIO 20 +CHANNEL 0 +MODEM 2400 KISSPORT 8100 FULLDUP OFF TXDELAY 5 From 4e3e6421a21ea8ce89b629e2a2e2d1460549ce3f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:08:55 -0500 Subject: [PATCH 0095/1744] Update direwolf-fm-pacsat.conf added CHANNEL and MODEM --- groundstation/direwolf/direwolf-fm-pacsat.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf index fba77b7e..53524acb 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat.conf @@ -3,3 +3,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 KISSPORT 8100 FULLDUP OFF +CHANNEL 0 +MODEM 1200 From 5983fe4a55c1aefc39be79bd3addb399db6736b7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:10:40 -0500 Subject: [PATCH 0096/1744] Update direwolf-pacsatsim-jp14.conf change to plight --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index b75fc802..9f8e1ea5 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,4 +1,4 @@ -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From b00f8d69b29c321ae02c4bb983adf4cb96cacc18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:11:03 -0500 Subject: [PATCH 0097/1744] Update direwolf-pacsatsim.conf change to plight --- direwolf/direwolf-pacsatsim.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 370e54b0..87f09de1 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,4 +1,4 @@ -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From cebe77c634d16d8fa878cec7f19fdfbd34fe1ed4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:16:32 -0500 Subject: [PATCH 0098/1744] Update direwolf-pacsatsim-jp14.conf try 9600 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 9f8e1ea5..30829ad6 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -2,6 +2,6 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 -MODEM 2400 +MODEM 9600 FULLDUP OFF TXDELAY 5 From ad4a68f8384d364ce5949710b76b4975e8835b0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:16:54 -0500 Subject: [PATCH 0099/1744] Update direwolf-fm-pacsat-jp14.conf try 9600 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index a6ee92cd..4fd24b6f 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -2,7 +2,7 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 CHANNEL 0 -MODEM 2400 +MODEM 9600 KISSPORT 8100 FULLDUP OFF TXDELAY 5 From 60e99a36a491f5bd803b45e1850d360fd9cae15f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:25:16 -0500 Subject: [PATCH 0100/1744] Update direwolf-fm-pacsat-jp14.conf back to 1200 and delay 10 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 4fd24b6f..d7ed9a00 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -2,7 +2,7 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 CHANNEL 0 -MODEM 9600 +MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 5 +TXDELAY 10 From 763a84b5aeef38e9bd37c8c714585d0987a9de7c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Dec 2024 20:25:38 -0500 Subject: [PATCH 0101/1744] Update direwolf-pacsatsim-jp14.conf 1200 and delay 10 --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 30829ad6..10e28f6b 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -2,6 +2,6 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO 20 MYCALL AMSAT CHANNEL 0 -MODEM 9600 +MODEM 1200 FULLDUP OFF -TXDELAY 5 +TXDELAY 10 From a463f6fe062116f5c79f64e04e0b9f8a27fd8319 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Dec 2024 09:54:04 -0500 Subject: [PATCH 0102/1744] Update install added GPIO to user pi --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 2b4048d6..450f10a1 100755 --- a/install +++ b/install @@ -179,6 +179,8 @@ cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGr mkdir /home/pi/PacSatGround +sudo usermod -a -G gpio pi + sudo apt-get install default-jdk -y cd From 98e56c286fd8335d599a067146879cefe5f48194 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Dec 2024 09:54:32 -0500 Subject: [PATCH 0103/1744] Update update add GPIO to pi user --- update | 2 ++ 1 file changed, 2 insertions(+) diff --git a/update b/update index 6d74a557..f15dcf4c 100755 --- a/update +++ b/update @@ -359,6 +359,8 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ mkdir /home/pi/PacSatGround + + sudo usermod -a -G gpio pi sudo apt-get install default-jdk -y From 742b5bd2055b6315ca907d3b19e540e9c25a545d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Dec 2024 17:18:08 -0500 Subject: [PATCH 0104/1744] Update transmit.py change to USB Soundcard instead of Headphones (PWM) --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index a1250e44..b82cbf6c 100644 --- a/transmit.py +++ b/transmit.py @@ -351,8 +351,8 @@ if __name__ == "__main__": print(txLedOn) GPIO.setup(txLed, GPIO.OUT) - card = "Headphones" # default using pcm audio output of Pi Zero -# card = "Device" # using USB sound card for audio output +# card = "Headphones" # default using pcm audio output of Pi Zero + card = "Device" # using USB sound card for audio output print("Programming FM module!\n"); output(pd, 1) From 0a71470ce697d65660123d44e3ba1bd8d6a2d4b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Dec 2024 17:40:50 -0500 Subject: [PATCH 0105/1744] Update direwolf-pacsatsim-jp14.conf --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 10e28f6b..88d20bb6 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 10 +TXDELAY 0 From e222728e840edc6dc7d3ad57e286718d9119c124 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 17:06:29 -0500 Subject: [PATCH 0106/1744] Update direwolf-cc.conf add other params --- direwolf-cc.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index 8419355f..00eddffa 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -1,2 +1,7 @@ ADEVICE hw:CARD=Device,DEV=0 default DTMF +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +FULLDUP OFF +TXDELAY 0 From 4b0126a97559e93562c27e143239fed6afe20131 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 17:07:41 -0500 Subject: [PATCH 0107/1744] Update command add -r 48000 --- command | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command b/command index 1349f45a..50460c30 100755 --- a/command +++ b/command @@ -48,11 +48,11 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "debug mode" - direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d + direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d else - direwolf -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py + direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py fi else From c564eb494f103b6bafdcbe29188d54acfacbdb34 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 17:13:16 -0500 Subject: [PATCH 0108/1744] Update command add -P+ -D1 --- command | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command b/command index 50460c30..989c71f5 100755 --- a/command +++ b/command @@ -48,11 +48,11 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "debug mode" - direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d else - direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py fi else From 4e003ebe144d221bf2fba5b2474ca8723d281a5e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 22:36:39 -0500 Subject: [PATCH 0109/1744] Update transmit.py rx sq off if pacsat mode --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index b82cbf6c..fbf2f309 100644 --- a/transmit.py +++ b/transmit.py @@ -285,6 +285,8 @@ if __name__ == "__main__": callsign = config[0] if len(config) > 5: sq = config[5] + if (mode == 'p') or (mode == 'P'): + sq = 0 # turn off squelch for Pacsat print(sq) if len(config) > 6: txf = float(config[6]) From 39319af6e86568e4b6e7b1a731875d2cb60d1b85 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Dec 2024 22:38:02 -0500 Subject: [PATCH 0110/1744] Update direwolf-fm-pacsat-jp14.conf tx delay 0 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index d7ed9a00..7b4d87d8 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 10 +TXDELAY 0 From 53515b0839660e417e1461cd2d44de1703b85c04 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 07:46:08 -0500 Subject: [PATCH 0111/1744] Update transmit.py fix zero squelch for pacsat --- transmit.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/transmit.py b/transmit.py index fbf2f309..f765bcd5 100644 --- a/transmit.py +++ b/transmit.py @@ -274,7 +274,7 @@ if __name__ == "__main__": tx_value = '0' rx_value = '0' - sq = '0' + '0' tx = '434.9000' rx = '435.0000' @@ -283,11 +283,10 @@ if __name__ == "__main__": # callsign = file.readline().split(" ")[0] config = file.readline().split() callsign = config[0] - if len(config) > 5: - sq = config[5] - if (mode == 'p') or (mode == 'P'): - sq = 0 # turn off squelch for Pacsat - print(sq) + if len(config) > 5: + if (mode != 'p') and (mode != 'P'): # squelch off for Pacsat + sq = config[5] + print(f'squelch: {sq}') if len(config) > 6: txf = float(config[6]) # print(txf) From ba35790cb27c0dfd4eb8141cd6ba5019df0249dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 07:49:08 -0500 Subject: [PATCH 0112/1744] Update transmit.py typo --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f765bcd5..76e3c40d 100644 --- a/transmit.py +++ b/transmit.py @@ -274,7 +274,7 @@ if __name__ == "__main__": tx_value = '0' rx_value = '0' - '0' + sq = '0' tx = '434.9000' rx = '435.0000' From 41171daade779ee4edadb5c0dc5aba82bd3f00a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:12:00 -0500 Subject: [PATCH 0113/1744] Update direwolf-pacsatsim-jp14.conf tx delay 10 needed --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 88d20bb6..10e28f6b 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 0 +TXDELAY 10 From 3ec34c2f739d74b62a979872e529a5f5f6a3575e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:12:24 -0500 Subject: [PATCH 0114/1744] Update direwolf-fm-pacsat-jp14.conf txdelay 10 needed --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 7b4d87d8..d7ed9a00 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 0 +TXDELAY 10 From 87b0404c39b358e006d5e5a4669144a34d03e1ad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:18:07 -0500 Subject: [PATCH 0115/1744] Update direwolf-fm-pacsat-jp14.conf try delay 20 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index d7ed9a00..6c0c65b9 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 10 +TXDELAY 20 From 241031396ad51b7a4f1d751f04f0012c0b73c55d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 08:18:26 -0500 Subject: [PATCH 0116/1744] Update direwolf-pacsatsim-jp14.conf try 20 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 10e28f6b..52b5cfd6 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 10 +TXDELAY 20 From 73dafbedecd8b6e73cc3a63168670764c6004133 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:03:59 -0500 Subject: [PATCH 0117/1744] Update direwolf-pacsatsim-jp14.conf try delay 30 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 52b5cfd6..6a8b1a46 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,4 +4,4 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 20 +TXDELAY 30 From f67036ca017e2e1fa03bc76503b8b340abd0a37a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:04:26 -0500 Subject: [PATCH 0118/1744] Update direwolf-fm-pacsat-jp14.conf try 30 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 6c0c65b9..9c1d1b5f 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 20 +TXDELAY 30 From 631a6912052cd4ebc005799338ac624ffe239efc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:09:25 -0500 Subject: [PATCH 0119/1744] Update pacsat.sh added -P+ -D3 --- groundstation/pacsat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f3ff484f..e12d15f4 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -44,21 +44,21 @@ echo frequency="$8e6" -echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." -echo +#echo if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & else echo -e "Direwolf using RTL-SDR on $frequency Hz" - direwolf -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & + direwolf -P+ -D3 -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & sleep 5 From 4b1b5326e8ebc56629475b525f446ce4d7ef46e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:11:26 -0500 Subject: [PATCH 0120/1744] Update pacsatsim.sh added -P+ -D3 --- pacsatsim.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 71d45328..8fb23c12 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -75,7 +75,7 @@ elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then frequency=434900000 echo - echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." + echo "If your Pacsat Ground Station is transmitting packets, you will see them here" echo elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then @@ -169,9 +169,9 @@ elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then fi -echo +#echo -echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." echo @@ -179,13 +179,13 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From d37729eb711f4ec25f08158fb47b9193faece78d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:16:01 -0500 Subject: [PATCH 0121/1744] Update pacsatsim.sh D1 --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8fb23c12..6588240e 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From 030e194c4e6c6ec37dce6ffa2df4ffe61660d3e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 09:16:31 -0500 Subject: [PATCH 0122/1744] Update pacsat.sh D1 --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e12d15f4..6cd4ab0d 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -52,7 +52,7 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - direwolf -P+ -D3 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & else From 21368acaf3626ea0149b3efce48f1b9acccd62ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 16:38:39 -0500 Subject: [PATCH 0123/1744] Update direwolf-pacsatsim-jp14.conf added FIX_BITS --- direwolf/direwolf-pacsatsim-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 6a8b1a46..045b64d1 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -5,3 +5,4 @@ CHANNEL 0 MODEM 1200 FULLDUP OFF TXDELAY 30 +FIX_BITS 1 AX25 From 6d99ed98f5576fa1e6999e17f1cd7d17c85b132e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 16:38:58 -0500 Subject: [PATCH 0124/1744] Update direwolf-fm-pacsat-jp14.conf FIX_BITS --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 9c1d1b5f..f13c3ced 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -6,3 +6,4 @@ MODEM 1200 KISSPORT 8100 FULLDUP OFF TXDELAY 30 +FIX_BITS 1 AX25 From 03cc387dc0796cf5e7ef43063b824dc4738e9721 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:33:52 -0500 Subject: [PATCH 0125/1744] Create pacsatsim.service --- systemd/pacsatsim.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 systemd/pacsatsim.service diff --git a/systemd/pacsatsim.service b/systemd/pacsatsim.service new file mode 100644 index 00000000..e65044af --- /dev/null +++ b/systemd/pacsatsim.service @@ -0,0 +1,14 @@ +[Unit] +Description=PacsatSim + +[Service] +TimeoutStopSec=5 +ExecStart=/home/pi/CubeSatSim/pacsatsim.sh +WorkingDirectory=/home/pi/CubeSatSim +StandardOutput=inherit +StandardError=inherit +Restart=always +User=root + +[Install] +WantedBy=default.target From e4e9ef04cabf6d417a36fb90d50cbec7b4048eef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:36:32 -0500 Subject: [PATCH 0126/1744] Update transmit.py start pacsatsim.service --- transmit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 76e3c40d..c85d10aa 100644 --- a/transmit.py +++ b/transmit.py @@ -425,7 +425,10 @@ if __name__ == "__main__": print("AFSK") elif (mode == 'p'): print("Pacsat") - system('/home/pi/CubeSatSim/pacsatsim.sh') +# system('/home/pi/CubeSatSim/pacsatsim.sh') + system('sudo systectl start pacsatsim') + While True: + sleep(30) elif (mode == 'p'): print("Pacsat Ground Station") while True: From ec415ab928f2d0ba1dde4ddf949f896ecb8a9238 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:38:12 -0500 Subject: [PATCH 0127/1744] Update transmit.py lowercase --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c85d10aa..0c4137e4 100644 --- a/transmit.py +++ b/transmit.py @@ -427,7 +427,7 @@ if __name__ == "__main__": print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') system('sudo systectl start pacsatsim') - While True: + while True: sleep(30) elif (mode == 'p'): print("Pacsat Ground Station") From 7f5e890fda663f35cdda2bd1e818ffbc9dd275c4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:39:11 -0500 Subject: [PATCH 0128/1744] Update transmit.py typo systemctl --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 0c4137e4..0ab0c67d 100644 --- a/transmit.py +++ b/transmit.py @@ -426,7 +426,7 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') - system('sudo systectl start pacsatsim') + system('sudo systemctl start pacsatsim') while True: sleep(30) elif (mode == 'p'): From 7a94bdf6ab5fe493a265ec15c356357f03477b14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:41:40 -0500 Subject: [PATCH 0129/1744] Update log added -p for pacsatsim --- log | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/log b/log index 2a3ce9d7..9c69874c 100755 --- a/log +++ b/log @@ -10,6 +10,10 @@ elif [ "$1" = "-c" ]; then sudo journalctl -a -u command > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" +elif [ "$1" = "-p" ]; then + sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt + cat /home/pi/CubeSatSim/logp.txt + echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt From b5c9caf3d32bae7494ead99dcc5f47a1d151b587 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Dec 2024 17:51:08 -0500 Subject: [PATCH 0130/1744] Update transmit.py restart pacsatsim --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 0ab0c67d..32d970b3 100644 --- a/transmit.py +++ b/transmit.py @@ -426,7 +426,7 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') - system('sudo systemctl start pacsatsim') + system('sudo systemctl restart pacsatsim') while True: sleep(30) elif (mode == 'p'): From e85a6f52c58d847a47b6f854edd5d14eab4a5af0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Dec 2024 08:46:00 -0500 Subject: [PATCH 0131/1744] Update log journalctl -af for real-time log --- log | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/log b/log index 9c69874c..f5b301c5 100755 --- a/log +++ b/log @@ -2,20 +2,26 @@ echo -e "\nLog file script for CubeSatSim\n" +echo "To exit, type Control-C" + +echo + +sleep 2 + if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then - sudo journalctl -a -u transmit > /home/pi/CubeSatSim/logt.txt - cat /home/pi/CubeSatSim/logt.txt - echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" + sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt +# cat /home/pi/CubeSatSim/logt.txt +# echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then - sudo journalctl -a -u command > /home/pi/CubeSatSim/logc.txt + sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt - echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" +# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then - sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt + sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt - echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" +# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else - sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt - cat /home/pi/CubeSatSim/log.txt - echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt +# cat /home/pi/CubeSatSim/log.txt +# echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" fi From 6265b59dc4e0c39193f6895691fcb0de56750f96 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Dec 2024 16:17:31 -0500 Subject: [PATCH 0132/1744] Update direwolf-fm-pacsat-jp14.conf comment out TXDELAY and FIX_BITS --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index f13c3ced..9bff5e66 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,5 +5,5 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -TXDELAY 30 -FIX_BITS 1 AX25 +#TXDELAY 30 +#FIX_BITS 1 AX25 From 8e086e02e8d79cb537a84ef1b2866567f7871995 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Dec 2024 22:38:06 -0500 Subject: [PATCH 0133/1744] Update direwolf-pacsatsim-jp14.conf remove TXDELAY and FIX_BITS --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 045b64d1..fecf24f1 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 30 -FIX_BITS 1 AX25 +#TXDELAY 30 +#FIX_BITS 1 AX25 From 8c66982e2298ba9165d0b07434e843dde0c34fd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 10 Dec 2024 16:08:00 -0500 Subject: [PATCH 0134/1744] Update install add pacsatsim.service --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 450f10a1..b2c06ecc 100755 --- a/install +++ b/install @@ -197,6 +197,8 @@ sudo cp ~/CubeSatSim/systemd/command.service /etc/systemd/system/command.service sudo systemctl enable command +sudo cp ~/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo cp /boot/config.txt /boot/config.txt.0 sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 From f7631d9ab91271eeaf105ab38a602bfa023f3358 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:31:52 -0500 Subject: [PATCH 0135/1744] Update direwolf-pacsatsim-jp14.conf turn off PTT no tx --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index fecf24f1..cd88c58e 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 +#PTT GPIO 20 MYCALL AMSAT CHANNEL 0 MODEM 1200 From 263093feba5a87247e4359a304b50827608da10c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:32:19 -0500 Subject: [PATCH 0136/1744] Update direwolf-fm-pacsat-jp14.conf no PTT no tx --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 9bff5e66..2903fc24 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,6 +1,6 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 +#PTT GPIO 20 CHANNEL 0 MODEM 1200 KISSPORT 8100 From ff0dc0079a2a53c2cc5983c41d231a89883d4441 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:55:47 -0500 Subject: [PATCH 0137/1744] Update direwolf-pacsatsim-jp14.conf txdelay and fix bits --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index cd88c58e..59009a53 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 +TXDELAY 30 +FIX_BITS 1 AX25 From 735245e14821b1b5110e387242dde7a2babb9967 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 13:56:12 -0500 Subject: [PATCH 0138/1744] Update direwolf-fm-pacsat-jp14.conf txdelay and fix bits --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 2903fc24..2419285d 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -5,5 +5,5 @@ CHANNEL 0 MODEM 1200 KISSPORT 8100 FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 +TXDELAY 30 +FIX_BITS 1 AX25 From 3a5d23767a5e2f48ec0c59ea58beb7255e3afdec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 20:39:19 -0500 Subject: [PATCH 0139/1744] Update direwolf-pacsatsim-jp14.conf remove ax25 fix bits --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 59009a53..51ab8c9f 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -5,4 +5,4 @@ CHANNEL 0 MODEM 1200 FULLDUP OFF TXDELAY 30 -FIX_BITS 1 AX25 +#FIX_BITS 1 AX25 From ba05da8f37613abe408c956a1b29e3dc744b07e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 20:39:42 -0500 Subject: [PATCH 0140/1744] Update direwolf-fm-pacsat-jp14.conf remove ax25 fix bits --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 2419285d..ad591599 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -6,4 +6,4 @@ MODEM 1200 KISSPORT 8100 FULLDUP OFF TXDELAY 30 -FIX_BITS 1 AX25 +#FIX_BITS 1 AX25 From ab446d1b714581518dea8c251ea66e4c213a0570 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Dec 2024 20:41:24 -0500 Subject: [PATCH 0141/1744] Update install added missing -12 --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b2c06ecc..ecb3f1d8 100755 --- a/install +++ b/install @@ -153,7 +153,7 @@ echo "$value" > /dev/null set -- $value echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=$1" >> pacsat.config +echo "bbs_callsign=$1-12" >> pacsat.config echo "broadcast_callsign=$1-11" >> pacsat.config echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config From 5fcc3e11001d3d8285e03b0c9971e21ab1606493 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 04:53:46 -0500 Subject: [PATCH 0142/1744] Create direwolf-pacsat-loopback.conf with Loopback --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 groundstation/direwolf/direwolf-pacsat-loopback.conf diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf new file mode 100644 index 00000000..74a7fb1e --- /dev/null +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -0,0 +1,9 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 +#PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 From 9c179c55234f8131969ced77f7336317621bd8f4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 04:58:42 -0500 Subject: [PATCH 0143/1744] Update direwolf-pacsatsim-jp14.conf change to Loopback 1 0 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 51ab8c9f..f30407cc 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 #PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From 08420193dadc08ec428b901f5df9b07fc7d16cc4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 04:59:26 -0500 Subject: [PATCH 0144/1744] Update direwolf-fm-pacsat-jp14.conf change to Loopback 0 1 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index ad591599..c815b866 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 CHANNEL 0 MODEM 1200 From 00354d02df42b715be335484e0b971753631b8cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 05:01:35 -0500 Subject: [PATCH 0145/1744] Update pacsat.sh restart pacsatsim in ground station --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 6cd4ab0d..d2197312 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -32,6 +32,8 @@ sudo killall -9 zenity &>/dev/null echo +sudo systemctl restart pacsatsim + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value From 862c0812997e1710aea62f20cd67fa63a3de60a4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 05:09:08 -0500 Subject: [PATCH 0146/1744] Update direwolf-fm-pacsat-jp14.conf add KISSPORT 8001 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index c815b866..6e4fc073 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -7,3 +7,4 @@ KISSPORT 8100 FULLDUP OFF TXDELAY 30 #FIX_BITS 1 AX25 +KISSPORT 8001 From c8b73f9f90ed16caffcd5e2d85f4c7a39f6eede3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 05:17:41 -0500 Subject: [PATCH 0147/1744] Update direwolf-pacsatsim-jp14.conf TXDELAY 75 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index f30407cc..803920ff 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 30 +TXDELAY 75 #FIX_BITS 1 AX25 From 49bf55484c0e2010eb7bef7644a83f8210ec8b28 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:00:24 -0500 Subject: [PATCH 0148/1744] Update pacsat.sh stop CubeSatSim, transmit, command --- groundstation/pacsat.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d2197312..3846ea26 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,6 +4,12 @@ sudo modprobe snd-aloop +sudo systemctl stop cubesatsim + +sudo systemctl stop transmit + +sudo systemctl stop command + /home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null From d4d6b37829c05901dfd72dbcefa104ee96429ac8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:02:31 -0500 Subject: [PATCH 0149/1744] Update install my fork of pi_pacsat --- install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install b/install index ecb3f1d8..b335178c 100755 --- a/install +++ b/install @@ -138,7 +138,11 @@ cd git clone https://github.com/ac2cz/pi_pacsat.git -cd pi_pacsat/Debug +cd pi_pacsat + +git checkout master-debug + +cd Debug make all From 7092c7aa67ab883e105f9ef1f50c2bfb4a527fb0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:42:12 -0500 Subject: [PATCH 0150/1744] Update install changed pi_pacsat to my repo --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b335178c..3a4297a4 100755 --- a/install +++ b/install @@ -136,7 +136,7 @@ sudo ./install.sh cd -git clone https://github.com/ac2cz/pi_pacsat.git +git clone https://github.com/alanbjohnston/pi_pacsat.git cd pi_pacsat From aa0e48aca2f74196dc17c8fe4878d33f550b43ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 06:52:29 -0500 Subject: [PATCH 0151/1744] Update pacsat.sh don't set CubeSatSim mode --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 3846ea26..b68dbec9 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -10,7 +10,7 @@ sudo systemctl stop transmit sudo systemctl stop command -/home/pi/CubeSatSim/config -I +#/home/pi/CubeSatSim/config -I sudo systemctl stop command &>/dev/null From 002c3dbd6b6c603d3dadd7d09931b3aa5f622b46 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 11:04:01 -0500 Subject: [PATCH 0152/1744] Update install fix pacsat install --- install | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install b/install index 3a4297a4..87881db0 100755 --- a/install +++ b/install @@ -152,18 +152,20 @@ mkdir /home/pi/PacSat/pacsat/dir export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=$1-12" >> pacsat.config -echo "broadcast_callsign=$1-11" >> pacsat.config -echo "digi_callsign=$1-1" >> pacsat.config +echo "bbs_callsign=W3ZM-12" >> pacsat.config +echo "broadcast_callsign=W3ZM-11" >> pacsat.config +echo "digi_callsign=W3ZM-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" > pacsat.state echo "uplink_open=1" >> pacsat.state +echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt From 41d47740a3fe28c27184f8ef5cbbc5828341e2d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 12:54:22 -0500 Subject: [PATCH 0153/1744] Create pacsat.desktop --- groundstation/pacsat.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/pacsat.desktop diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop new file mode 100644 index 00000000..539c0e1d --- /dev/null +++ b/groundstation/pacsat.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Pacsat +GenericName=Pacsat Loopback +Comment=Pacsat +Exec=/home/pi/CubeSatSim/groundstation/pacsat.sh +Icon=/home/pi/Icons/pacsat.png +Terminal=true +Type=Application +Categories=HamRadio; +Keywords=APRS; From 9ca2860de8a214e1e743b1127af7044cc58a5513 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 12:55:29 -0500 Subject: [PATCH 0154/1744] Create pacsatlog.desktop --- groundstation/pacsatlog.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/pacsatlog.desktop diff --git a/groundstation/pacsatlog.desktop b/groundstation/pacsatlog.desktop new file mode 100644 index 00000000..b3032884 --- /dev/null +++ b/groundstation/pacsatlog.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Name=Pacsat Log +GenericName=Pacsat Loopback +Comment=Pacsat +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/log -p" +Icon=/home/pi/Icons/pacsat.png +Terminal=true +Type=Application +Categories=HamRadio; +Keywords=APRS; From e574937c7aac87611d2529c53702889c3ad71db0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 30 Dec 2024 13:36:56 -0500 Subject: [PATCH 0155/1744] Update pacsat.sh remove frequency comments --- groundstation/pacsat.sh | 43 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b68dbec9..b0b1e952 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -40,44 +40,27 @@ echo sudo systemctl restart pacsatsim -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -echo "Receive frequency is $8 MHz" -echo "Transmit frequency is $7 MHz" -echo -echo "To change, quit and type CubeSatSim/config -F" -echo +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value + +#echo "Receive frequency is $8 MHz" +#echo "Transmit frequency is $7 MHz" +#echo +#echo "To change, quit and type CubeSatSim/config -F" +#echo -frequency="$8e6" +#frequency="$8e6" #echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." #echo -if [[ $(arecord -l | grep "USB Audio Device") ]] ; then - echo -e "Direwolf using USB Sound Card (FM Transceiver) on $frequency Hz" - - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & - -else - - echo -e "Direwolf using RTL-SDR on $frequency Hz" - - direwolf -P+ -D3 -r 48000 -qd -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf -t 0 & - - sleep 5 - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & +echo +echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." +echo -fi cd /home/pi/Desktop/PacSatGround_0.46m_linux/ From 9f7d7e8334d43d3a7b20675b6e74695036e37b52 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jan 2025 09:43:40 -0500 Subject: [PATCH 0156/1744] Update transmit.py repeater mode CARD --- transmit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index 32d970b3..baa1419d 100644 --- a/transmit.py +++ b/transmit.py @@ -802,7 +802,7 @@ if __name__ == "__main__": ## system("arecord -D plughw:CARD=Device,DEV=0 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") sleep(1) - system("sudo arecord -D plughw:1 -r48000 -fS16_LE -c1 | nc localhost 8011 &") + system("sudo arecord -D plughw:CARD -r48000 -fS16_LE -c1 | nc localhost 8011 &") GPIO.output(powerPin, 1) sleep(0.5) GPIO.output(powerPin, 0) @@ -810,9 +810,9 @@ if __name__ == "__main__": sleep(1) print("No carrier detected, stopping repeater") output(txLed, txLedOff) - system("sudo killall -9 arecord") - system("sudo killall -9 nc") - system("sudo killall -9 rpitx") + system("sudo killall -9 arecord > /dev/null 2>&1") + system("sudo killall -9 nc > /dev/null 2>&1") + system("sudo killall -9 rpitx > /dev/null 2>&1") else: print("FSK") From 087eab06256fba579360b3ae1a1a4af10535c861 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jan 2025 09:47:36 -0500 Subject: [PATCH 0157/1744] Update transmit.py fixed CARD=Device --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index baa1419d..7d47f19a 100644 --- a/transmit.py +++ b/transmit.py @@ -802,7 +802,7 @@ if __name__ == "__main__": ## system("arecord -D plughw:CARD=Device,DEV=0 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") sleep(1) - system("sudo arecord -D plughw:CARD -r48000 -fS16_LE -c1 | nc localhost 8011 &") + system("sudo arecord -D plughw:CARD=Device,DEV=0 -r48000 -fS16_LE -c1 | nc localhost 8011 &") GPIO.output(powerPin, 1) sleep(0.5) GPIO.output(powerPin, 0) From 976ac018166a9be5048dffce1f2a74c73e5f33b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 07:11:49 -0500 Subject: [PATCH 0158/1744] Update install switch pi_pacsat back to ac2cz --- install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install b/install index 87881db0..eed5aef2 100755 --- a/install +++ b/install @@ -136,11 +136,12 @@ sudo ./install.sh cd -git clone https://github.com/alanbjohnston/pi_pacsat.git +#git clone https://github.com/alanbjohnston/pi_pacsat.git +git clone https://github.com/ac2cz/pi_pacsat.git cd pi_pacsat -git checkout master-debug +#git checkout master-debug cd Debug From 54bcd77317cfd20287c7005872bdfb80dcf68248 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 10:59:07 -0500 Subject: [PATCH 0159/1744] Update sstv_decode_prompt.sh remove hw:0.0 on play --- groundstation/sstv_decode_prompt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 76eb611f..5e3b5e2d 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -128,7 +128,9 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 + +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 sleep 5 From d2cf9213369d173592fd1b48b88b6a6a85000ee0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 11:03:37 -0500 Subject: [PATCH 0160/1744] Update sstv_decode_prompt.sh remove tee --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 5e3b5e2d..da80f1d4 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -130,7 +130,7 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 4c7f4d5e172645792c6b264d6ebc25415898e0bc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:14:03 -0500 Subject: [PATCH 0161/1744] Update fox-profile.desktop --- groundstation/fox-profile.desktop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/fox-profile.desktop b/groundstation/fox-profile.desktop index c03f40d4..8b7aaabe 100644 --- a/groundstation/fox-profile.desktop +++ b/groundstation/fox-profile.desktop @@ -2,8 +2,8 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-profile.sh Name=Change FoxTelem Profile -Comment=FIAB-v3 -Icon=/home/pi/Downloads/foxtelem.png +Comment=FIAB-v4 +Icon=/home/pi/Icons/foxtelem.png Path=/home/pi Terminal=true Categories=HamRadio From 3a4373ea1432279a1eb7ecd8e1075b847f72badd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:15:37 -0500 Subject: [PATCH 0162/1744] Update gpredict.desktop --- groundstation/gpredict.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/gpredict.desktop b/groundstation/gpredict.desktop index 20a6ab49..69d11ecb 100644 --- a/groundstation/gpredict.desktop +++ b/groundstation/gpredict.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/usr/bin/gpredict Name=Gpredict Comment=ISS and Satellite Tracking for ARISS Radio Pi -Icon=/home/pi/Downloads/gpredict.png +Icon=/home/pi/Icons/gpredict.png Path=/home/pi Terminal=false Categories=HamRadio From 6d0a9fa82d218759caa64cf3bef25edbf77299ae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:17:02 -0500 Subject: [PATCH 0163/1744] Update rtl-tcp.desktop --- groundstation/rtl-tcp.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.desktop b/groundstation/rtl-tcp.desktop index 117acb9c..7ae3c038 100644 --- a/groundstation/rtl-tcp.desktop +++ b/groundstation/rtl-tcp.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/rtl-tcp.sh Name=RTL-TCP Comment=RTL-TCP for SDR# -Icon=/home/pi/Downloads/SDRSharp.png +Icon=/home/pi/Icons/SDRSharp.png Path=/home/pi Terminal=true Categories=HamRadio From 5dc9c1b18d83802c280747ca431a4ec5b94eed3a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:18:35 -0500 Subject: [PATCH 0164/1744] Update set location.desktop --- groundstation/set location.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/set location.desktop b/groundstation/set location.desktop index e2b80016..9adc6f66 100644 --- a/groundstation/set location.desktop +++ b/groundstation/set location.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/loc.sh Name=Set My Location Comment=Set Location for Gpredict -Icon=/home/pi/Downloads/gpredict.png +Icon=/home/pi/Icons/gpredict.png Path=/home/pi Terminal=true Categories=HamRadio From 5d2f5ada8d4e08c61edbd7c745ba71136ec97d3a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:20:40 -0500 Subject: [PATCH 0165/1744] Create SDRpp.desktop --- groundstation/SDRpp.desktop | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/SDRpp.desktop diff --git a/groundstation/SDRpp.desktop b/groundstation/SDRpp.desktop new file mode 100644 index 00000000..f4f4ba38 --- /dev/null +++ b/groundstation/SDRpp.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Exec=/home/pi/CubeSatSim/groundstation/sdrpp.sh +Name=SDRpp +Comment=SDRpp +Icon=/home/pi/Icons/sdrpp.png +Path=/home/pi +Terminal=true +Categories=HamRadio +Keywords=Ham Radio;SDR From cbe338671ae6233250610ee24c965594738fdbd3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:24:47 -0500 Subject: [PATCH 0166/1744] Update cubicsdr.desktop --- groundstation/cubicsdr.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/cubicsdr.desktop b/groundstation/cubicsdr.desktop index 1599f5df..2cf19759 100644 --- a/groundstation/cubicsdr.desktop +++ b/groundstation/cubicsdr.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/cubicsdr.sh Name=SDR FM Broadcast Comment=CubicSDR FM Broadcast -Icon=/home/pi/Downloads/cubicsdr.png +Icon=/home/pi/Icons/cubicsdr.png Path=/home/pi Terminal=true Categories=HamRadio From 1190ebca96629ec22b9b53d64a690080568d069c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:32:27 -0500 Subject: [PATCH 0167/1744] Update aprs.sh --- groundstation/aprs.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/aprs.sh b/groundstation/aprs.sh index 2e1c6873..dd88ba5d 100755 --- a/groundstation/aprs.sh +++ b/groundstation/aprs.sh @@ -3,12 +3,14 @@ sudo modprobe snd-aloop -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null From 2ceeb9c62571b616d05bab9eb9059dc70dd84f97 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:34:18 -0500 Subject: [PATCH 0168/1744] Update fox.sh --- groundstation/fox.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/fox.sh b/groundstation/fox.sh index 3c1daf1a..233644ef 100755 --- a/groundstation/fox.sh +++ b/groundstation/fox.sh @@ -5,12 +5,14 @@ echo "Script to run FoxTelem for ARISS Radio Pi" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 rtl_fm &>/dev/null From 324731eef74382126920512a14e6688abbe551c8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:35:27 -0500 Subject: [PATCH 0169/1744] Update sstv_decode_prompt.sh --- groundstation/sstv_decode_prompt.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index da80f1d4..6b6e5dbc 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -4,10 +4,12 @@ echo "Script to decode SSTV using QSSTV with rtl_fm" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null sudo modprobe snd-aloop +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 qsstv &>/dev/null sudo killall -9 rtl_fm &>/dev/null @@ -16,7 +18,7 @@ sudo killall -9 aplay &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null From 42857a18cf894859e138b16dd93696395ce37e33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:36:58 -0500 Subject: [PATCH 0170/1744] Update sdr.sh --- groundstation/sdr.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 0783d9ca..1ad01092 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -24,6 +24,8 @@ echo "Note: you need to be on the Wifi network: $ssid" echo +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 java &>/dev/null sudo killall -9 rtl_fm &>/dev/null @@ -42,13 +44,13 @@ sudo killall -9 direwolf &>/dev/null sudo killall -9 zenity &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null -sudo systemctl restart openwebrx +sudo systemctl restart openwebrx &>/dev/null sleep 10 -setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://127.0.0.1:8073 &>/dev/null & +setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://localhost:8073 &>/dev/null & sleep 10 From 3b85b6e6b52f62a8f6cc249771e925296264b305 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:37:55 -0500 Subject: [PATCH 0171/1744] Update rtl-tcp.sh --- groundstation/rtl-tcp.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index c8af8906..bcf8e154 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -23,13 +23,15 @@ echo "Note: you need to be on the Wifi network: $ssid" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null sleep 2 pkill -o chromium &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null + +sudo killall -9 sdrpp &>/dev/null sudo killall -9 java &>/dev/null From 6f81e7d9075c22e9854a12fe4df1461ea192caeb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:39:07 -0500 Subject: [PATCH 0172/1744] Update cubicsdr.sh --- groundstation/cubicsdr.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/cubicsdr.sh b/groundstation/cubicsdr.sh index 3f4b6b62..f9c3146c 100755 --- a/groundstation/cubicsdr.sh +++ b/groundstation/cubicsdr.sh @@ -9,14 +9,16 @@ echo "Note: Select Generic RTL2832 device then click Start to begin" echo -sudo systemctl stop openwebrx +sudo systemctl stop openwebrx &>/dev/null sudo killall -9 java &>/dev/null -sudo systemctl stop rtl_tcp +sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null From 30a48e2dd2f23c4e893df65dd90eb7dd19ef79d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:55:32 -0500 Subject: [PATCH 0173/1744] Update aprs.sh remove tee --- groundstation/aprs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/aprs.sh b/groundstation/aprs.sh index dd88ba5d..10917a3c 100755 --- a/groundstation/aprs.sh +++ b/groundstation/aprs.sh @@ -80,7 +80,7 @@ echo -e "Auto decoding APRS packets on $frequency Hz" #sudo rtl_fm -f 144.39M -s 22050 -g 48 - | multimon-ng -a AFSK1200 -A -t raw - -direwolf -r 48000 -t 0 & +direwolf -c direwolf.conf -r 48000 -t 0 & sleep 5 @@ -89,6 +89,7 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 28ab2a86885214337f1a413f361f0c0fb040cdd6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:56:05 -0500 Subject: [PATCH 0174/1744] Update direwolf.conf changed speaker to default --- groundstation/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf.conf b/groundstation/direwolf.conf index ce8b6823..d70427b9 100644 --- a/groundstation/direwolf.conf +++ b/groundstation/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 default From 061845cdfe4d0e1e6cb8412b86078eeb49d364d8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jan 2025 12:57:44 -0500 Subject: [PATCH 0175/1744] Update aprs.sh full path for direwolf conf --- groundstation/aprs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/aprs.sh b/groundstation/aprs.sh index 10917a3c..427c36cb 100755 --- a/groundstation/aprs.sh +++ b/groundstation/aprs.sh @@ -80,7 +80,7 @@ echo -e "Auto decoding APRS packets on $frequency Hz" #sudo rtl_fm -f 144.39M -s 22050 -g 48 - | multimon-ng -a AFSK1200 -A -t raw - -direwolf -c direwolf.conf -r 48000 -t 0 & +direwolf -c /home/pi/CubeSatSim/groundstation/direwolf.conf -r 48000 -t 0 & sleep 5 From 0e590a838ef743f7f0459605bc04120f40614ae0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 03:11:05 -0500 Subject: [PATCH 0176/1744] Update bookmarks.json --- groundstation/bookmarks.json | 191 ++++++++++------------------------- 1 file changed, 55 insertions(+), 136 deletions(-) diff --git a/groundstation/bookmarks.json b/groundstation/bookmarks.json index f8bae496..09f1be52 100644 --- a/groundstation/bookmarks.json +++ b/groundstation/bookmarks.json @@ -1,137 +1,56 @@ [ - { - "name": "ISS APRS", - "frequency": 145825000, - "modulation": "nfm" - }, - { - "name": "ISS SSTV/Voice", - "frequency": 145800000, - "modulation": "nfm" - }, - { - "name": "ARISS Repeater Downlink", - "frequency": 437800000, - "modulation": "nfm" - }, - { - "name": "AO-27", - "frequency": 436795000, - "modulation": "nfm" - }, - { - "name": "AO-73", - "frequency": 145815000, - "modulation": "usb" - }, - { - "name": "Fox-1B AO-91", - "frequency": 145960000, - "modulation": "nfm" - }, - { - "name": "Fox-1D AO-92", - "frequency": 145880000, - "modulation": "nfm" - }, - { - "name": "HuskySat-1 HO-107", - "frequency": 435800000, - "modulation": "usb" - }, - { - "name": "Fox-1E", - "frequency": 435750000, - "modulation": "usb" - }, - { - "name": "MAX VALIER", - "frequency": 145860000, - "modulation": "usb" - }, - { - "name": "NOAA WX Radio 1", - "frequency": 162400000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 2", - "frequency": 162425000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 3", - "frequency": 162450000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 4", - "frequency": 162475000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 5", - "frequency": 162500000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 6", - "frequency": 162525000, - "modulation": "nfm" - }, - { - "name": "NOAA WX Radio 7", - "frequency": 162550000, - "modulation": "nfm" - }, - { - "name": "CAS-4A", - "frequency": 145855000, - "modulation": "usb" - }, - { - "name": "CAS-4B", - "frequency": 145910000, - "modulation": "usb" - }, - { - "name": "XW-2A", - "frequency": 145660000, - "modulation": "usb" - }, - { - "name": "XW-2B", - "frequency": 145725000, - "modulation": "usb" - }, - { - "name": "XW-2C", - "frequency": 145790000, - "modulation": "usb" - }, - { - "name": "XW-2F", - "frequency": 145975000, - "modulation": "usb" - }, - { - "name": "NOAA-19", - "frequency": 137100000, - "modulation": "nfm" - }, - { - "name": "NOAA-18", - "frequency": 137912500, - "modulation": "nfm" - }, - { - "name": "NOAA-15", - "frequency": 137620000, - "modulation": "nfm" - }, - { - "name": "CubeSatSim", - "frequency": 434900000, - "modulation": "packet" - } -] + { + "name": "NOAA WX Radio 1", + "frequency": 162400000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 2", + "frequency": 162425000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 3", + "frequency": 162450000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 4", + "frequency": 162475000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 5", + "frequency": 162500000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 6", + "frequency": 162525000, + "modulation": "nfm" + }, + { + "name": "NOAA WX Radio 7", + "frequency": 162550000, + "modulation": "nfm" + }, + { + "name": "CubeSatSim", + "frequency": 434900000, + "modulation": "packet" + }, + { + "name": "ISS SSTV/Voice", + "frequency": 145800000, + "modulation": "nfm" + }, + { + "name": "ISS APRS", + "frequency": 145825000, + "modulation": "packet" + }, + { + "name": "ISS Voice Repeater", + "frequency": 437800000, + "modulation": "nfm" + } From 2cd5718e43dd73441c94dc27db7666a9e61a0bff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 03:19:22 -0500 Subject: [PATCH 0177/1744] Create settings.json --- groundstation/settings.json | 808 ++++++++++++++++++++++++++++++++++++ 1 file changed, 808 insertions(+) create mode 100644 groundstation/settings.json diff --git a/groundstation/settings.json b/groundstation/settings.json new file mode 100644 index 00000000..69033009 --- /dev/null +++ b/groundstation/settings.json @@ -0,0 +1,808 @@ +{ + "version": 8, + "sdrs": { + "rtlsdr": { + "name": "RTL-SDR", + "type": "rtl_sdr", + "profiles": { + "70cm": { + "name": "70cm Ham Band 435 MHz (CubeSatSim)", + "center_freq": 435000000, + "rf_gain": 10.0, + "samp_rate": 2400000, + "start_freq": 434900000, + "start_mod": "nfm", + "tuning_step": 1000, + "direct_sampling": 0 + }, + "2m": { + "name": "WX Band 161 MHz", + "center_freq": 162400000, + "rf_gain": 29, + "samp_rate": 2048000, + "start_freq": 157000000, + "start_mod": "nfm" + }, + "e59a4765-4139-4ab8-89c5-d8ac3343ba70": { + "name": "2m Ham Band 146 MHz (ISS)", + "center_freq": 145000000, + "samp_rate": 2400000, + "start_freq": 145000000, + "start_mod": "nfm", + "rf_gain": 42.0, + "direct_sampling": 0 + }, + "faf80b0b-1a96-4a9b-96fa-ce40b109c7e0": { + "name": "70cm Ham Band 438 MHz (ISS)", + "rf_gain": 29.0, + "center_freq": 438000000, + "samp_rate": 2400000, + "start_freq": 437800000, + "start_mod": "nfm" + }, + "a4fd4a5d-d2d0-4949-87e2-bda83cd83a37": { + "name": "FM Band 95 MHz", + "rf_gain": 29.0, + "center_freq": 95000000, + "samp_rate": 2400000, + "start_freq": 94000000, + "start_mod": "wfm" + }, + "ce2bca29-78cb-45d8-ab46-8dea3135981c": { + "name": "10m Ham Band 28 MHz", + "rf_gain": 29.0, + "center_freq": 28000000, + "samp_rate": 2400000, + "start_freq": 28000000, + "start_mod": "usb", + "direct_sampling": 0 + }, + "d6cdbf2d-74e4-4cac-aaa8-e793103a8e89": { + "name": "6m Ham Band 51 MHz", + "rf_gain": 29.0, + "center_freq": 51000000, + "samp_rate": 2400000, + "start_freq": 51000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "e2aba387-1d3b-4ca8-b280-e119282b8812": { + "name": "90 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 90000000, + "samp_rate": 2400000, + "start_freq": 90000000, + "start_mod": "wfm" + }, + "f700b99d-3c51-4524-b151-a0809b868ecc": { + "name": "92 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 92000000, + "samp_rate": 2400000, + "start_freq": 92000000, + "start_mod": "wfm" + }, + "dc6af94f-d607-4fee-a522-7f375f66a62c": { + "name": "94 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 94000000, + "samp_rate": 2400000, + "start_freq": 94000000, + "start_mod": "wfm" + }, + "6887e85a-a4dc-4245-810f-99801fc5e824": { + "name": "96 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 96000000, + "samp_rate": 2400000, + "start_freq": 96000000, + "start_mod": "wfm" + }, + "a2182ed6-70a8-4377-b233-ac6f8ccc91d7": { + "name": "98 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 96000000, + "samp_rate": 2400000, + "start_freq": 96000000, + "start_mod": "wfm" + }, + "57e38353-fb86-4935-899b-e365228b8ae5": { + "name": "100 MHz FM Band", + "center_freq": 100000000, + "samp_rate": 2400000, + "start_freq": 100000000, + "start_mod": "wfm" + }, + "5e9ec6dd-905d-4781-bd13-9cb702f58e84": { + "name": "102 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 102000000, + "samp_rate": 2400000, + "start_freq": 102000000, + "start_mod": "wfm" + }, + "ef2c703c-2e22-4e87-82b5-581420d704bd": { + "name": "104 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 104000000, + "samp_rate": 2400000, + "start_freq": 104000000, + "start_mod": "wfm" + }, + "34cc3ddf-8018-4288-acb9-29e6940bc37e": { + "name": "106 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 106000000, + "samp_rate": 2400000, + "start_freq": 106000000, + "start_mod": "wfm" + }, + "b4693683-ccf5-474d-a2d9-9a47b0a18ee2": { + "name": "108 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 108000000, + "samp_rate": 2400000, + "start_freq": 108000000, + "start_mod": "wfm" + }, + "34224d77-7b61-467c-b78f-18c7f3af1a0c": { + "name": "110 MHz FM Band", + "rf_gain": 29.0, + "center_freq": 110000000, + "samp_rate": 2400000, + "start_freq": 110000000, + "start_mod": "wfm" + }, + "8dd82d97-73db-4fa7-ac41-263c3026ea1d": { + "name": "112 MHz", + "rf_gain": 29.0, + "center_freq": 112000000, + "samp_rate": 2400000, + "start_freq": 112000000, + "start_mod": "nfm" + }, + "79304b30-f10d-469e-9617-50a19bfdb435": { + "name": "114 MHz", + "rf_gain": 29.0, + "center_freq": 114000000, + "samp_rate": 2400000, + "start_freq": 114000000, + "start_mod": "nfm" + }, + "c00bf096-27b8-4262-832c-df1a308d7eb9": { + "name": "116 MHz", + "rf_gain": 29.0, + "center_freq": 116000000, + "samp_rate": 2400000, + "start_freq": 116000000, + "start_mod": "nfm" + }, + "669d25a6-6c15-4131-a330-3c33dd2147f0": { + "name": "118 Mhz Air Band", + "rf_gain": 29.0, + "center_freq": 118000000, + "samp_rate": 2400000, + "start_freq": 118000000, + "start_mod": "am" + }, + "948248fa-43d9-4e7d-bf86-afaadd391779": { + "name": "120 MHz Air Band", + "rf_gain": 29.0, + "center_freq": 120000000, + "samp_rate": 2400000, + "start_freq": 120000000, + "start_mod": "am" + }, + "b634273b-8fc8-4e87-b5c4-e6226d4be0ac": { + "name": "122 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 122000000, + "samp_rate": 2400000, + "start_freq": 121000000, + "start_mod": "nfm" + }, + "c55289a2-8286-4a3d-a505-37ba2867571a": { + "name": "124 Mhz Air Band", + "rf_gain": 42.0, + "center_freq": 124000000, + "samp_rate": 2400000, + "start_freq": 124000000, + "start_mod": "am" + }, + "4fe488b7-f369-43ba-bb49-91e1a185be7a": { + "name": "126 MHz Air Band", + "rf_gain": 29.0, + "center_freq": 126000000, + "samp_rate": 2400000, + "start_freq": 126000000, + "start_mod": "am" + }, + "e79639a2-1384-4e92-8e46-f6e5670ec9fd": { + "name": "128 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 128000000, + "samp_rate": 2400000, + "start_freq": 128000000, + "start_mod": "am" + }, + "319f3fb2-b98a-4620-85a7-a99d5a722bd5": { + "name": "130 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 130000000, + "samp_rate": 2400000, + "start_freq": 130000000, + "start_mod": "am" + }, + "63c5c2ce-07de-496c-81f6-b188a7adbf39": { + "name": "132 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 132000000, + "samp_rate": 2400000, + "start_freq": 132000000, + "start_mod": "am" + }, + "386bdc7b-eb10-4e05-972a-69d730a23cd8": { + "name": "134 MHz Air Band", + "rf_gain": 29.0, + "center_freq": 134000000, + "samp_rate": 2400000, + "start_freq": 134000000, + "start_mod": "am" + }, + "ae8ea8b1-23de-45ef-b8c4-3b83a188e65d": { + "name": "136 MHz Air Band", + "rf_gain": 42.0, + "center_freq": 136000000, + "samp_rate": 2400000, + "start_freq": 136000000, + "start_mod": "am" + }, + "c0b1a28c-5e07-400a-a5f3-07c62db27587": { + "name": "138 MHz NOAA Weather Satellite Band", + "rf_gain": 42.0, + "center_freq": 138000000, + "samp_rate": 2400000, + "start_freq": 138000000, + "start_mod": "nfm" + }, + "20f7ce56-fd85-4b3e-8fac-94cbe9ba0e1d": { + "name": "140 MHz ", + "rf_gain": 42.0, + "center_freq": 140000000, + "samp_rate": 2400000, + "start_freq": 140000000, + "start_mod": "nfm" + }, + "882079f8-5697-428a-ae9d-bcc091269c7f": { + "name": "142 MHz ", + "rf_gain": 42.0, + "center_freq": 142000000, + "samp_rate": 2400000, + "start_freq": 142000000, + "start_mod": "nfm" + }, + "da1b3f12-2eba-40e9-8c62-33493adf74b3": { + "name": "144 MHz 2m Ham Band", + "rf_gain": 42.0, + "center_freq": 144000000, + "samp_rate": 2400000, + "start_freq": 144000000, + "start_mod": "nfm" + }, + "8d9cf1e1-44c5-41c4-bcea-7b1c69446e62": { + "name": "146 MHz 2m Ham Band", + "rf_gain": 42.0, + "center_freq": 146000000, + "samp_rate": 2400000, + "start_freq": 146000000, + "start_mod": "nfm" + }, + "eec8aa0d-3485-43d2-baa4-82f7d9e14df6": { + "name": "148 MHz 2m Ham Band", + "rf_gain": 42.0, + "center_freq": 148000000, + "samp_rate": 2400000, + "start_freq": 148000000, + "start_mod": "nfm" + }, + "bf66a908-1988-4aec-b998-06e2bc7d0a84": { + "name": "150 MHz", + "rf_gain": 42.0, + "center_freq": 150000000, + "samp_rate": 2400000, + "start_freq": 150000000, + "start_mod": "nfm" + }, + "0389f270-b919-4aae-a313-f73697059f70": { + "name": "152 MHz", + "rf_gain": 42.0, + "center_freq": 152000000, + "samp_rate": 2400000, + "start_freq": 152000000, + "start_mod": "nfm" + }, + "6ef9d955-76aa-46c0-8463-2c23def5e37b": { + "name": "154 MHz", + "rf_gain": 42.0, + "center_freq": 154000000, + "samp_rate": 2400000, + "start_freq": 154000000, + "start_mod": "nfm" + }, + "5d0a64c7-3bce-408e-94d9-c8315bef7540": { + "name": "156 MHz", + "rf_gain": 42.0, + "center_freq": 156000000, + "samp_rate": 2400000, + "start_freq": 156000000, + "start_mod": "nfm" + }, + "5b869cae-ffa7-4554-96af-7acd497bbaf3": { + "name": "158 MHz", + "rf_gain": 42.0, + "center_freq": 158000000, + "samp_rate": 2400000, + "start_freq": 158000000, + "start_mod": "nfm" + }, + "0de7c5d4-14fc-4655-9a81-2bcebb2f4147": { + "name": "160 MHz", + "rf_gain": 42.0, + "center_freq": 160000000, + "samp_rate": 2400000, + "start_freq": 160000000, + "start_mod": "nfm" + }, + "8ca54821-8b80-4938-a35c-9fe25e2320d1": { + "name": "162 MHz", + "rf_gain": 42.0, + "center_freq": 162000000, + "samp_rate": 2400000, + "start_freq": 162000000, + "start_mod": "nfm" + }, + "f74d262d-9e98-4030-86b2-45676121ff1e": { + "name": "164 MHz", + "rf_gain": 42.0, + "center_freq": 164000000, + "samp_rate": 2400000, + "start_freq": 164000000, + "start_mod": "nfm" + }, + "bfc9c686-6c06-4de2-b1d5-c8f012131042": { + "name": "168 MHz", + "rf_gain": 42.0, + "center_freq": 168000000, + "samp_rate": 2400000, + "start_freq": 167000000, + "start_mod": "nfm" + }, + "5468e597-d529-42fe-9fcf-0ff4fa9e2d06": { + "name": "170 MHz", + "rf_gain": 42.0, + "center_freq": 170000000, + "samp_rate": 2400000, + "start_freq": 170000000, + "start_mod": "nfm" + }, + "e124cc6e-7177-4d5f-ae5b-2ec6a6fa2956": { + "name": "172 MHz", + "rf_gain": 42.0, + "center_freq": 172000000, + "samp_rate": 2400000, + "start_freq": 172000000, + "start_mod": "nfm" + }, + "1ce0f3ed-4763-4f00-916a-4f72d29ba410": { + "name": "174 MHz ", + "rf_gain": 42.0, + "center_freq": 174000000, + "samp_rate": 2400000, + "start_freq": 174000000, + "start_mod": "nfm" + }, + "639b1496-a2b9-4a42-ad28-3cda89fbe2fb": { + "name": "420 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 420000000, + "samp_rate": 2400000, + "start_freq": 420000000, + "start_mod": "nfm" + }, + "bbc9b57e-ea86-43ef-be65-cb2337615ae5": { + "name": "422 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 422000000, + "samp_rate": 2400000, + "start_freq": 422000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "3aed286d-7d13-4338-8621-d1c0dfdf3ac6": { + "name": "424 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 424000000, + "samp_rate": 2400000, + "start_freq": 424000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "9ae664b4-48f3-410a-8995-edc60127d746": { + "name": "426 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 426000000, + "samp_rate": 2400000, + "start_freq": 426000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "24d2467b-6740-42b5-8d3f-8f389fc0860b": { + "name": "428 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 428000000, + "samp_rate": 2400000, + "start_freq": 428000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "debbc3ab-081d-41e7-80fe-7d564838154e": { + "name": "430 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 430000000, + "samp_rate": 2400000, + "start_freq": 430000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "649233e0-fc85-415d-b88e-94750f49ca4b": { + "name": "432 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 432000000, + "samp_rate": 2400000, + "start_freq": 432000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "bed3b482-fd3b-45ee-b924-200aa4223ace": { + "name": "434 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 434000000, + "samp_rate": 2400000, + "start_freq": 434000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "58dfac9e-6030-4bb3-ba28-465285baa25e": { + "name": "436 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 436000000, + "samp_rate": 2400000, + "start_freq": 436000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "4c293b84-cd43-495f-95a5-1fcabfe4e4c7": { + "name": "438 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 438000000, + "samp_rate": 2400000, + "start_freq": 438000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "0e763161-a0e8-411a-abe6-c1af13045f27": { + "name": "440 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 440000000, + "samp_rate": 2400000, + "start_freq": 440000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "6dda77d3-e859-41b7-9b0b-22c2dee47472": { + "name": "442 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 442000000, + "samp_rate": 2400000, + "start_freq": 442000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "285813ef-aa6d-433f-a316-074f47e02073": { + "name": "444 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 444000000, + "samp_rate": 2400000, + "start_freq": 444000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "e0842b63-6857-4554-874b-fad99e4db03a": { + "name": "446 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 446000000, + "samp_rate": 2400000, + "start_freq": 446000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "c7b21c80-cfef-42e8-a6fe-c5eea4556c7e": { + "name": "448 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 448000000, + "samp_rate": 2400000, + "start_freq": 448000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "d98b4d4a-8247-4a99-9fc7-89780e5e1fef": { + "name": "450 MHz 70cm Ham Band", + "rf_gain": 42.0, + "center_freq": 450000000, + "samp_rate": 2400000, + "start_freq": 450000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "a09a546f-c56f-41b5-ae34-c5511afbcef5": { + "name": "460 MHz", + "rf_gain": 42.0, + "center_freq": 460000000, + "samp_rate": 2400000, + "start_freq": 460000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "232b2ae6-88dd-4e58-b489-37f310e5e204": { + "name": "462 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 462000000, + "samp_rate": 2400000, + "start_freq": 462000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "41db9b38-87d7-40a0-9f90-1f0c77c054d9": { + "name": "464 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 464000000, + "samp_rate": 2400000, + "start_freq": 464000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "e9bb7781-eb9b-4314-b399-2d96c52716f0": { + "name": "466 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 466000000, + "samp_rate": 2400000, + "start_freq": 466000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "5d9e07e8-eb42-4832-82c9-016f05d89027": { + "name": "468 MHz FRS/GMRS", + "rf_gain": 42.0, + "center_freq": 468000000, + "samp_rate": 2400000, + "start_freq": 468000000, + "start_mod": "nfm", + "direct_sampling": 0 + }, + "20m": { + "name": "20m", + "center_freq": 14150000, + "samp_rate": 384000, + "start_freq": 14070000, + "start_mod": "usb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "30m": { + "name": "30m", + "center_freq": 10125000, + "samp_rate": 192000, + "start_freq": 10142000, + "start_mod": "usb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "40m": { + "name": "40m", + "center_freq": 7100000, + "samp_rate": 256000, + "start_freq": 7070000, + "start_mod": "lsb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "80m": { + "name": "80m", + "center_freq": 3650000, + "samp_rate": 384000, + "start_freq": 3570000, + "start_mod": "lsb", + "tuning_step": "500", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "49m": { + "name": "49m Broadcast", + "center_freq": 6050000, + "samp_rate": 384000, + "start_freq": 6070000, + "start_mod": "am", + "tuning_step": "1000", + "rf_gain": 42.0, + "direct_sampling": 1 + }, + "c1982ce1-7504-455e-908c-dc097fa031a8": { + "name": "1090 MHz ADS-B Band", + "rf_gain": 42.0, + "center_freq": 1090000000, + "samp_rate": 2400000, + "start_freq": 1090000000, + "start_mod": "adsb", + "tuning_step": 1, + "direct_sampling": 0 + }, + "cb7f2f8e-e317-4a5e-9504-826dd3781791": { + "name": "978 MHz ADS-B Band", + "rf_gain": 42.0, + "center_freq": 978000000, + "samp_rate": 2400000, + "start_freq": 978000000, + "start_mod": "adsb", + "tuning_step": 1 + } + } + }, + "airspy": { + "name": "Airspy HF+", + "type": "airspyhf", + "rf_gain": "auto", + "profiles": { + "20m": { + "name": "20m", + "center_freq": 14150000, + "samp_rate": 384000, + "start_freq": 14070000, + "start_mod": "usb", + "tuning_step": "500" + }, + "30m": { + "name": "30m", + "center_freq": 10125000, + "samp_rate": 192000, + "start_freq": 10142000, + "start_mod": "usb", + "tuning_step": "500" + }, + "40m": { + "name": "40m", + "center_freq": 7100000, + "samp_rate": 256000, + "start_freq": 7070000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "80m": { + "name": "80m", + "center_freq": 3650000, + "samp_rate": 384000, + "start_freq": 3570000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "49m": { + "name": "49m Broadcast", + "center_freq": 6050000, + "samp_rate": 384000, + "start_freq": 6070000, + "start_mod": "am", + "tuning_step": "1000" + } + } + }, + "sdrplay": { + "name": "SDRPlay device", + "type": "sdrplay", + "antenna": "Antenna A", + "rf_gain": "auto", + "profiles": { + "20m": { + "name": "20m", + "center_freq": 14150000, + "samp_rate": 500000, + "start_freq": 14070000, + "start_mod": "usb", + "tuning_step": "500" + }, + "30m": { + "name": "30m", + "center_freq": 10125000, + "samp_rate": 250000, + "start_freq": 10142000, + "start_mod": "usb", + "tuning_step": "500" + }, + "40m": { + "name": "40m", + "center_freq": 7100000, + "samp_rate": 500000, + "start_freq": 7070000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "80m": { + "name": "80m", + "center_freq": 3650000, + "samp_rate": 500000, + "start_freq": 3570000, + "start_mod": "lsb", + "tuning_step": "500" + }, + "49m": { + "name": "49m Broadcast", + "center_freq": 6000000, + "samp_rate": 500000, + "start_freq": 6070000, + "start_mod": "am", + "tuning_step": "1000" + } + } + } + }, + "receiver_name": "ARISS Radio Pi", + "receiver_location": "Budapest, Hungary", + "receiver_asl": 200, + "receiver_admin": "example@example.com", + "receiver_gps": { + "lat": 39.95233, + "lon": -75.16379 + }, + "photo_title": "Panorama of Budapest from Sch\u00f6nherz Zolt\u00e1n Dormitory", + "photo_desc": "", + "max_clients": 20, + "keep_files": 20, + "session_timeout": 0, + "usage_policy_url": "policy", + "allow_chat": true, + "allow_audio_recording": true, + "allow_center_freq_changes": false, + "magic_key": "memagic", + "receiver_keys": [], + "waterfall_scheme": "GoogleTurboWaterfall", + "fft_fps": 9, + "fft_size": 4096, + "fft_voverlap_factor": 0.3, + "waterfall_levels": { + "min": -88.0, + "max": -20.0 + }, + "waterfall_auto_levels": { + "min": 3.0, + "max": 10.0 + }, + "waterfall_auto_level_default_mode": false, + "waterfall_auto_min_range": 50, + "audio_compression": "adpcm", + "fft_compression": "adpcm", + "tuning_precision": 2, + "eibi_bookmarks_range": 0, + "repeater_range": 0, + "map_type": "google", + "google_maps_api_key": "", + "openweathermap_api_key": "", + "map_position_retention_time": 7200, + "map_ignore_indirect_reports": false, + "map_prefer_recent_reports": true, + "callsign_url": "https://www.qrzcq.com/call/{}", + "vessel_url": "https://www.vesselfinder.com/vessels/details/{}", + "flight_url": "https://flightaware.com/live/flight/{}", + "modes_url": "https://flightaware.com/live/modes/{}/redirect" +} + From be3af7add803873995882d436051f0d6810a5d39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 04:01:51 -0500 Subject: [PATCH 0178/1744] Update bookmarks.json --- groundstation/bookmarks.json | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/bookmarks.json b/groundstation/bookmarks.json index 09f1be52..b3c55a2c 100644 --- a/groundstation/bookmarks.json +++ b/groundstation/bookmarks.json @@ -54,3 +54,4 @@ "frequency": 437800000, "modulation": "nfm" } +] From 0185e522fb0ca2ce634b4b33ea7c829a707b4662 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 04:19:01 -0500 Subject: [PATCH 0179/1744] Update loc.sh add venv --- groundstation/loc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/loc.sh b/groundstation/loc.sh index 5a1b6881..06096323 100755 --- a/groundstation/loc.sh +++ b/groundstation/loc.sh @@ -5,7 +5,7 @@ sudo killall -9 java &>/dev/null sudo killall -9 gpredict &>/dev/null -python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py +/home/pi/venv/bin/python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py #/usr/bin/gpredict From 8925b52b6aa0a7735c0f1bfaf89cafe645f93c93 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 04:58:55 -0500 Subject: [PATCH 0180/1744] Update sdr.sh get rid of Restore pages popup --- groundstation/sdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 1ad01092..8dfd5e64 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -50,7 +50,7 @@ sudo systemctl restart openwebrx &>/dev/null sleep 10 -setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://localhost:8073 &>/dev/null & +setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 &>/dev/null & sleep 10 From ca2a06d119860982af6f2e3659aaca22d2475e9b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 06:59:49 -0500 Subject: [PATCH 0181/1744] Update sstv_decode_prompt.sh changed play device --- groundstation/sstv_decode_prompt.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 6b6e5dbc..1a065791 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -132,7 +132,8 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 46a2dfd578ea2e5a8790c737c47ce7acf83a0135 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 10:32:38 -0500 Subject: [PATCH 0182/1744] Update packet.sh remove tee --- groundstation/packet.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 87620bdc..28a9e2de 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -187,5 +187,6 @@ set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 6826e558b34e08e88863ea50a061330352882b76 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 10:33:04 -0500 Subject: [PATCH 0183/1744] Update direwolf.conf change speaker to default --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index ce8b6823..d70427b9 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=b1,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 default From 869107baf273982335de9874f743496bd904b8f1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 10:37:20 -0500 Subject: [PATCH 0184/1744] Update direwolf.conf change speaker to loopback --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index d70427b9..701d80b4 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 default +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 From 17437ecc58c49c5e88b774eb39b5cc9fea155120 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 13:42:52 -0500 Subject: [PATCH 0185/1744] Update packet.sh changed subchannel --- groundstation/packet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 28a9e2de..87ff253b 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -186,7 +186,7 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From b3ef984e542de0dc971e7e9f2a15e2556334d7b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:01:32 -0500 Subject: [PATCH 0186/1744] Update aprs.desktop --- groundstation/aprs.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/aprs.desktop b/groundstation/aprs.desktop index b9ee2512..5f360f7b 100644 --- a/groundstation/aprs.desktop +++ b/groundstation/aprs.desktop @@ -2,7 +2,7 @@ Name=APRS Decode using Direwolf GenericName=Decodes APRS using rtl_fm and Direwolf Comment=APRS signals -Exec=/home/pi/CubeSatSim/groundstation/aprs.sh +Exec=/home/pi/CubeSatSim/groundstation/packet.sh Icon=/home/pi/Icons/aprs.png Terminal=true Type=Application From 8ccc7040bcb9b858122dac21fb820efcbe574524 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:03:49 -0500 Subject: [PATCH 0187/1744] Update sstv_decode_prompt.sh --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 1a065791..9845c3bf 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -133,7 +133,7 @@ set -- $value #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 961c80d8ecda8482300a66f5b53fc54d8f82cf9d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:13:20 -0500 Subject: [PATCH 0188/1744] Update sstv_decode_prompt.sh added also stop/start --- groundstation/sstv_decode_prompt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 9845c3bf..3c343732 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -30,6 +30,9 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + #echo "s" >> .mode frequency=$(zenity --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") From 9b5fb214283407e0aa2702499d4cc73342576bc0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:16:15 -0500 Subject: [PATCH 0189/1744] Update sstv_decode_prompt.sh --- groundstation/sstv_decode_prompt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 3c343732..ab8c9f1f 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -135,8 +135,8 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 84e5a7c2d695f6b279db42e3c7e779d202194eb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 3 Jan 2025 14:18:58 -0500 Subject: [PATCH 0190/1744] Update packet.sh added alsa stop/start --- groundstation/packet.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 87ff253b..3f68fe6e 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -26,6 +26,9 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + echo frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") From 757430adfc93416fd8fa7672f3601f59edd25ee0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 03:32:19 -0500 Subject: [PATCH 0191/1744] Update webSDR.desktop --- groundstation/webSDR.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/webSDR.desktop b/groundstation/webSDR.desktop index 277bbae2..f660c2ea 100644 --- a/groundstation/webSDR.desktop +++ b/groundstation/webSDR.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/sdr.sh Name=Web SDR Comment=openwebrx for Web SDR -Icon=/home/pi/Downloads/openwebrx.png +Icon=/home/pi/Iconss/openwebrx.png Path=/home/pi Terminal=true Categories=HamRadio From 389870d5b723ce97ff9b54f3484af2ff500bb1b8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 03:34:00 -0500 Subject: [PATCH 0192/1744] Update chromium.desktop changed to myurl --- groundstation/autostart/chromium.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/autostart/chromium.desktop b/groundstation/autostart/chromium.desktop index fc57834e..5fd6bef0 100644 --- a/groundstation/autostart/chromium.desktop +++ b/groundstation/autostart/chromium.desktop @@ -2,4 +2,4 @@ [Desktop Entry] Type=Application Name=Chromium with WebSDR -Exec=chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://127.0.0.1:8073 +Exec=chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 From 9c5dc8bd2f608d4933c84344798d76d09b9336df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 07:53:17 -0500 Subject: [PATCH 0193/1744] Update and rename rtl_tcp.service to rtltcp.service from niclashoyer/rtltcp --- groundstation/rtl_tcp.service | 14 -------------- groundstation/rtltcp.service | 10 ++++++++++ 2 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 groundstation/rtl_tcp.service create mode 100644 groundstation/rtltcp.service diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service deleted file mode 100644 index 403425a3..00000000 --- a/groundstation/rtl_tcp.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=RTL-TCP - -[Service] -TimeoutStopSec = 5 -ExecStart=/bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I)' -WorkingDirectory=/home/pi -StandardOutput=inherit -StandardError=inherit -Restart=always -User=root - -[Install] -WantedBy=default.target diff --git a/groundstation/rtltcp.service b/groundstation/rtltcp.service new file mode 100644 index 00000000..f9d2405f --- /dev/null +++ b/groundstation/rtltcp.service @@ -0,0 +1,10 @@ +[Unit] +Description=RTL TCP Service +After=network.target +Requires=rtltcp.socket + +[Service] +Type=notify +User=pi +ExecStart=/usr/local/bin/rtltcp +TimeoutStopSec=5 From a259419e2d5112cfad4b4146ec46d09247968bd8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 07:54:57 -0500 Subject: [PATCH 0194/1744] Create rtltcp.socket from niclashoyer/rtltcp --- groundstation/rtltcp.socket | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 groundstation/rtltcp.socket diff --git a/groundstation/rtltcp.socket b/groundstation/rtltcp.socket new file mode 100644 index 00000000..d8a67a14 --- /dev/null +++ b/groundstation/rtltcp.socket @@ -0,0 +1,9 @@ +[Unit] +Description=RTL TCP Socket +PartOf=rtltcp.service + +[Socket] +ListenStream=[::]:1234 + +[Install] +WantedBy=sockets.target From 03be3471e06a531e8de423e3105854bc160e347f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:15:57 -0500 Subject: [PATCH 0195/1744] Update and rename rtltcp.service to rtl_tcp.service revert --- groundstation/rtl_tcp.service | 14 ++++++++++++++ groundstation/rtltcp.service | 10 ---------- 2 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 groundstation/rtl_tcp.service delete mode 100644 groundstation/rtltcp.service diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service new file mode 100644 index 00000000..403425a3 --- /dev/null +++ b/groundstation/rtl_tcp.service @@ -0,0 +1,14 @@ +[Unit] +Description=RTL-TCP + +[Service] +TimeoutStopSec = 5 +ExecStart=/bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I)' +WorkingDirectory=/home/pi +StandardOutput=inherit +StandardError=inherit +Restart=always +User=root + +[Install] +WantedBy=default.target diff --git a/groundstation/rtltcp.service b/groundstation/rtltcp.service deleted file mode 100644 index f9d2405f..00000000 --- a/groundstation/rtltcp.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=RTL TCP Service -After=network.target -Requires=rtltcp.socket - -[Service] -Type=notify -User=pi -ExecStart=/usr/local/bin/rtltcp -TimeoutStopSec=5 From 3aeed04e4144360a94ac74d28f95a09606a7490f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:17:46 -0500 Subject: [PATCH 0196/1744] Update rtl_tcp.service removed path --- groundstation/rtl_tcp.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service index 403425a3..e2c3b3b7 100644 --- a/groundstation/rtl_tcp.service +++ b/groundstation/rtl_tcp.service @@ -3,7 +3,7 @@ Description=RTL-TCP [Service] TimeoutStopSec = 5 -ExecStart=/bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I)' +ExecStart=/bin/sh -c 'rtl_tcp -a $(hostname -I)' WorkingDirectory=/home/pi StandardOutput=inherit StandardError=inherit From b43aa9da609786a2b5f3b6cd8f0d914483ea885a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:33:39 -0500 Subject: [PATCH 0197/1744] add sdrpp script --- groundstation/sdrpp.sh | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 groundstation/sdrpp.sh diff --git a/groundstation/sdrpp.sh b/groundstation/sdrpp.sh new file mode 100755 index 00000000..73f520e7 --- /dev/null +++ b/groundstation/sdrpp.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# script to run sdrpp + +echo "Script to run SDRpp for ARISS Radio Pi" + +echo + +sudo systemctl stop openwebrx + +sudo killall -9 java &>/dev/null + +sudo killall -9 sdrpp &>/dev/null + +sudo systemctl stop rtl_tcp + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +sudo killall -9 direwolf &>/dev/null + +sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +#sudo kill `ps -aux | grep cubicsdr-packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +#sudo kill `ps -aux | grep packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +#sudo kill `ps -aux | grep sstv_decode_prompt| grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +sudo killall -9 zenity &>/dev/null + +sleep 5 + +setsid sdrpp + +sleep 10 + +#$SHELL From 15ebacf05b528ef293d534041af28573067acc15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:40:47 -0500 Subject: [PATCH 0198/1744] Update rtl-tcp.sh use systemd --- groundstation/rtl-tcp.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index bcf8e154..47853aaf 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -50,7 +50,8 @@ sudo killall -9 aplay &>/dev/null sudo killall -9 zenity &>/dev/null -sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' +#sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' +sudo systemctl start rtl_tcp &>/dev/null sleep 5 From a991cf979de7009f40142220f2937ad4b47286d4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:41:48 -0500 Subject: [PATCH 0199/1744] Update rtl_tcp.service changed to IP address not host name --- groundstation/rtl_tcp.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl_tcp.service b/groundstation/rtl_tcp.service index e2c3b3b7..ff899e9b 100644 --- a/groundstation/rtl_tcp.service +++ b/groundstation/rtl_tcp.service @@ -3,7 +3,7 @@ Description=RTL-TCP [Service] TimeoutStopSec = 5 -ExecStart=/bin/sh -c 'rtl_tcp -a $(hostname -I)' +ExecStart=/bin/sh -c 'rtl_tcp -a $(hostname -I|cut -f1 -d " ")' WorkingDirectory=/home/pi StandardOutput=inherit StandardError=inherit From f224a0ede08f5e878715632f498bd56e8ed33ee7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:44:07 -0500 Subject: [PATCH 0200/1744] Update rtl-tcp.sh add journalctl messages --- groundstation/rtl-tcp.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 47853aaf..4a18c89f 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -49,10 +49,11 @@ sudo killall -9 aplay &>/dev/null sudo killall -9 zenity &>/dev/null - #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null +sudo journalctl -af -u rtl_tcp + sleep 5 #$SHELL From 84d090747cbab6f223d1b0c5922fb07b0f60be71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:54:18 -0500 Subject: [PATCH 0201/1744] Update rtl-tcp.sh add while to close window --- groundstation/rtl-tcp.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 4a18c89f..0378909a 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -52,8 +52,9 @@ sudo killall -9 zenity &>/dev/null #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null -sudo journalctl -af -u rtl_tcp - -sleep 5 +while [[ sudo systemctl status rtl_tcp | grep "Active: active (running)" ]] +do + sleep 5 +done #$SHELL From 0df2108bda38e847a7ca1aabdbd15eca883b4518 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:56:44 -0500 Subject: [PATCH 0202/1744] Update rtl-tcp.sh fixed typo --- groundstation/rtl-tcp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 0378909a..185d8b6a 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -52,7 +52,7 @@ sudo killall -9 zenity &>/dev/null #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null -while [[ sudo systemctl status rtl_tcp | grep "Active: active (running)" ]] +while [[ $(sudo systemctl status rtl_tcp | grep "Active: active (running)") ]] do sleep 5 done From 4de35d79776cb895866472fa00c9052c1ed23c91 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 08:58:14 -0500 Subject: [PATCH 0203/1744] Update rtl-tcp.sh add back in journalctl log --- groundstation/rtl-tcp.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 185d8b6a..caf5ff2c 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -52,6 +52,8 @@ sudo killall -9 zenity &>/dev/null #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null +sudo journalctl -af -u rtl_tcp & + while [[ $(sudo systemctl status rtl_tcp | grep "Active: active (running)") ]] do sleep 5 From 861fe223d8069cd16f1fe1f03c89bd2566c30a30 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jan 2025 09:01:02 -0500 Subject: [PATCH 0204/1744] Update rtl-tcp.sh add sleep at end --- groundstation/rtl-tcp.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index caf5ff2c..e16c6e9a 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -59,4 +59,6 @@ do sleep 5 done +sleep 5 + #$SHELL From 100560015959ba3edf62acd842265cda40940477 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:00:17 -0500 Subject: [PATCH 0205/1744] Update fox-profile.sh --- groundstation/fox-profile.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-profile.sh b/groundstation/fox-profile.sh index d51e7ccb..1610e293 100755 --- a/groundstation/fox-profile.sh +++ b/groundstation/fox-profile.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to change FoxTelem default profile -echo "Script to change your default FoxTelem profile for FIAB v3" +echo "Script to change your default FoxTelem profile for FIAB v4" echo From c0653b5b1d03c7e6baf6cad88c818ac6d994dd1d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:00:47 -0500 Subject: [PATCH 0206/1744] Update fox-startup.sh --- groundstation/fox-startup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-startup.sh b/groundstation/fox-startup.sh index cb035116..cf6a6282 100755 --- a/groundstation/fox-startup.sh +++ b/groundstation/fox-startup.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to run FoxTelem -echo "Startup script to run FoxTelem for FIAB v3" +echo "Startup script to run FoxTelem for FIAB v4" echo From d8c40c6b57cb02a29e8f9f0f820cf033e93bfc60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:01:13 -0500 Subject: [PATCH 0207/1744] Update fox-run.sh --- groundstation/fox-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-run.sh b/groundstation/fox-run.sh index c680b47a..d8fe4fe5 100755 --- a/groundstation/fox-run.sh +++ b/groundstation/fox-run.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to run FoxTelem -echo "Startup script to run FoxTelem for FIAB v3" +echo "Startup script to run FoxTelem for FIAB v4" echo From 5f09c5a73ca33a714599fcf5b56cff4f567d64d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:01:44 -0500 Subject: [PATCH 0208/1744] Update fox-download.desktop --- groundstation/fox-download.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-download.desktop b/groundstation/fox-download.desktop index d58827d0..4e4bcf40 100644 --- a/groundstation/fox-download.desktop +++ b/groundstation/fox-download.desktop @@ -2,7 +2,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-download.sh Name=FoxTelem Download -Comment=FIAB-v3 +Comment=FIAB-v4 Icon=/home/pi/Icons/FoxTelemDownload.png Path=/home/pi Terminal=true From 577d0f93edc99d753a6970d5430ceea07e1461cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:02:19 -0500 Subject: [PATCH 0209/1744] Update foxtelem.desktop --- groundstation/foxtelem.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/foxtelem.desktop b/groundstation/foxtelem.desktop index 9dc42ab9..87fe00a1 100644 --- a/groundstation/foxtelem.desktop +++ b/groundstation/foxtelem.desktop @@ -2,7 +2,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-run.sh Name=FoxTelem -Comment=FIAB-v3 +Comment=FIAB-v4 Icon=/home/pi/Downloads/foxtelem.png Path=/home/pi Terminal=true From b3eeaaa8687061f7bae94f0ed3f9ec145cd113a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:10:36 -0500 Subject: [PATCH 0210/1744] Update loc.sh activate venv --- groundstation/loc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/loc.sh b/groundstation/loc.sh index 06096323..8aa8cd9f 100755 --- a/groundstation/loc.sh +++ b/groundstation/loc.sh @@ -5,7 +5,10 @@ sudo killall -9 java &>/dev/null sudo killall -9 gpredict &>/dev/null -/home/pi/venv/bin/python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py +source /home/pi/venv/bin/activate + + +python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py #/usr/bin/gpredict From 7db82fff14ddd1ef35c66a1c06321662cec7d3a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:33:21 -0500 Subject: [PATCH 0211/1744] Update fox-run.sh add venv activate --- groundstation/fox-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/fox-run.sh b/groundstation/fox-run.sh index d8fe4fe5..aa21578b 100755 --- a/groundstation/fox-run.sh +++ b/groundstation/fox-run.sh @@ -5,6 +5,8 @@ echo "Startup script to run FoxTelem for FIAB v4" echo +source /home/pi/venv/bin/activate + sudo killall -9 FoxTelem &>/dev/null sudo killall -9 zenity &>/dev/null From a8692efe42719658ecc7df9ebeedb0ca2af92eb8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:40:03 -0500 Subject: [PATCH 0212/1744] Update fox-run.sh removed fox --- groundstation/fox-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/fox-run.sh b/groundstation/fox-run.sh index aa21578b..3f1ec4c5 100755 --- a/groundstation/fox-run.sh +++ b/groundstation/fox-run.sh @@ -14,7 +14,7 @@ sudo killall -9 zenity &>/dev/null FILE=/home/pi/FoxTelemetryData/.foxprofile if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose your default FoxTelem profile:" --list 2>/dev/null --width=410 --height=120 --title="Set FoxTelem Profile" --column="Profile" --column="Receive and decode telemetry from" Fox-in-a-Box "AMSAT Fox satellites" "CubeSatSim" "AMSAT CubeSat Simulator") + profile=$(zenity --text="Choose your default FoxTelem profile:" --list 2>/dev/null --width=410 --height=120 --title="Set FoxTelem Profile" --column="Profile" --column="Receive and decode telemetry from" Fox-in-a-Box "AMSAT Satellites" "CubeSatSim" "AMSAT CubeSat Simulator") echo $profile From ca6b036ea897b3cb2d0a49604ab2f54bbf8c4952 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 05:40:46 -0500 Subject: [PATCH 0213/1744] Update sstv_decode_prompt.sh mode 4 --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index ab8c9f1f..fbc55895 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -70,7 +70,7 @@ elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ]; then frequency=434900000 echo "Frequency is" $frequency echo -echo "If your CubeSatSim is transmitting in SSTV mode (mode 5) you should get images." +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 [ "$choice" = "3" ] || [ "$frequency" = "Other" ]; then From 69c2f9457ad283e6d147378c106a3471e8cad6c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 06:18:07 -0500 Subject: [PATCH 0214/1744] Update packet.sh add kill sdrpp --- groundstation/packet.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 3f68fe6e..4b65bdef 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -12,6 +12,8 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 direwolf &>/dev/null sudo killall -9 aplay &>/dev/null From 993848e641c7b85eb8db4bbc94f8caf2b508a7fa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jan 2025 06:20:01 -0500 Subject: [PATCH 0215/1744] Update packet.sh dire wolf with colors --- groundstation/packet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 4b65bdef..f669afda 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -180,7 +180,7 @@ else echo -e "Auto decoding APRS packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -t 0 & + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf & # -t 0 & fi From 65b69f64fdbf74c3697487eb5527d39dd6f408ba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:21:29 -0500 Subject: [PATCH 0216/1744] Update pacsat.sh add missing direwolf --- groundstation/pacsat.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b0b1e952..d70aa07f 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -56,6 +56,7 @@ sudo systemctl restart pacsatsim #echo +direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From 81be0e9b3c70ea24809d346eb1bca2c7c8623dc3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:40:34 -0500 Subject: [PATCH 0217/1744] Update direwolf-pacsat-loopback.conf to 0 1 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 74a7fb1e..c815b866 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 CHANNEL 0 MODEM 1200 From c26743c59f3844d74d4c1cbfb1989ee012bf9c10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:45:39 -0500 Subject: [PATCH 0218/1744] Update direwolf-pacsat-loopback.conf 0 0 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index c815b866..74a7fb1e 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 #PTT GPIO 20 CHANNEL 0 MODEM 1200 From 0556866021d4cf2055e181713279e35303a044a7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:46:17 -0500 Subject: [PATCH 0219/1744] Update direwolf-pacsatsim-jp14.conf 1 1 --- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 803920ff..64c7bfe5 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 MYCALL AMSAT CHANNEL 0 From ec1e6fafabe11df51b5ea1e817ce2b103563be71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jan 2025 14:57:13 -0500 Subject: [PATCH 0220/1744] Update pacsatsim.sh don't kill direwolf --- pacsatsim.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6588240e..94a07850 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -14,15 +14,15 @@ sudo modprobe snd-aloop #sudo systemctl stop openwebrx -sudo systemctl stop rtl_tcp &>/dev/null +#sudo systemctl stop rtl_tcp &>/dev/null #pkill -o chromium &>/dev/null -sudo killall -9 rtl_fm &>/dev/null +#sudo killall -9 rtl_fm &>/dev/null -sudo killall -9 direwolf &>/dev/null +#sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#udo killall -9 aplay &>/dev/null #sudo killall -9 qsstv &>/dev/null From d37400dd318b909df295d29ec2a543fdcff50d1b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:35:06 -0500 Subject: [PATCH 0221/1744] Update pacsatsim.sh direwolf loopback --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 94a07850..2bc9bcc6 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From ed93dbc59aaeb006135744f08a97305a38e1cb4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:35:57 -0500 Subject: [PATCH 0222/1744] Create direwolf-pacsatsim-loopback.conf --- direwolf/direwolf-pacsatsim-loopback.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim-loopback.conf diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf new file mode 100644 index 00000000..64c7bfe5 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -0,0 +1,8 @@ +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 +#PTT GPIO 20 +MYCALL AMSAT +CHANNEL 0 +MODEM 1200 +FULLDUP OFF +TXDELAY 75 +#FIX_BITS 1 AX25 From 8007aa4530cd0d6021862502f3e198b0dd522699 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:39:00 -0500 Subject: [PATCH 0223/1744] Update pacsatsim.sh comment on direwolf --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2bc9bcc6..33c1a8cd 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & +# direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From 47a6a89fb9e8b2833d27422ea09d112d1939dd48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:40:23 -0500 Subject: [PATCH 0224/1744] Update pacsat.sh comment out direwolf --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d70aa07f..5564d8cd 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -56,7 +56,7 @@ sudo systemctl restart pacsatsim #echo -direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +#direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From fa11e21422739745096d432287656030db20c1e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 02:43:37 -0500 Subject: [PATCH 0225/1744] Update pacsat.sh remove direwolf killall --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5564d8cd..01fa7515 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -22,7 +22,7 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null -sudo killall -9 direwolf &>/dev/null +#sudo killall -9 direwolf &>/dev/null sudo killall -9 aplay &>/dev/null From 2219931cec652b11ba3ac3522d8618cb569545e8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 03:35:16 -0500 Subject: [PATCH 0226/1744] adding reset_pacsat --- groundstation/reset_pacsat.sh | 55 +++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 groundstation/reset_pacsat.sh diff --git a/groundstation/reset_pacsat.sh b/groundstation/reset_pacsat.sh new file mode 100755 index 00000000..34e153a3 --- /dev/null +++ b/groundstation/reset_pacsat.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +# script to clear Pacsat Ground Station and Pacsatsim state + +echo "Clearing all Pacsat Ground Station and Pacsatsim state" + +echo + +sudo systemctl stop pacsatsim + +#sudo killall -9 direwolf &>/dev/null + +sudo killall -9 java &>/dev/null + +cd + +cd pi_pacsat + +cd Debug + +sudo rm -r /home/pi/PacSat + +mkdir /home/pi/PacSat +mkdir /home/pi/PacSat/pacsat +mkdir /home/pi/PacSat/pacsat/dir + +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value + +echo "bit_rate=9600" > pacsat.config +echo "bbs_callsign=AMSAT-12" >> pacsat.config +echo "broadcast_callsign=AMSAT-11" >> pacsat.config +echo "digi_callsign=AMSAT-1" >> pacsat.config +echo "max_frames_in_tx_buffer=5" >> pacsat.config + +sudo rm pacsat_last_command_time.dat +sudo rm pacsat_upload_table.dat +sudo rm pacsat.state + +echo "pb_open=1" > pacsat.state +echo "uplink_open=1" >> pacsat.state +echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state + +touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + +sudo rm -r /home/pi/PacSatGround + +mkdir /home/pi/PacSatGround + +echo + +echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + From 8a8c09814ada6c466ab9e7f9df725a04484f8f19 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 03:38:45 -0500 Subject: [PATCH 0227/1744] Update pacsatsim.sh direwolf back in --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 33c1a8cd..2bc9bcc6 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" -# direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From f6053fc6ba53862bf141fa8280923e1e0a60e5af Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 03:39:15 -0500 Subject: [PATCH 0228/1744] Update pacsat.sh run direwolf back in --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 01fa7515..46293689 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -56,7 +56,7 @@ sudo systemctl restart pacsatsim #echo -#direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From 0bc9b97a720f627e9c9eee7419a402c9c1999e08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 04:14:45 -0500 Subject: [PATCH 0229/1744] Update pacsat.sh add 30 second delay --- groundstation/pacsat.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 46293689..0e916410 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -40,6 +40,11 @@ echo sudo systemctl restart pacsatsim + +echo "Waiting 30 seconds for Pacsatsim to start" + +sleep 30 + #value=`cat /home/pi/CubeSatSim/sim.cfg` #echo "$value" > /dev/null #set -- $value From d22bbc222d328ffede96bf909c71d81c7eb98c68 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 06:07:20 -0500 Subject: [PATCH 0230/1744] Update pacsat.sh change to 10 second delay --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 0e916410..56be5a59 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -41,9 +41,9 @@ echo sudo systemctl restart pacsatsim -echo "Waiting 30 seconds for Pacsatsim to start" +echo "Waiting 10 seconds for Pacsatsim to start" -sleep 30 +sleep 10 #value=`cat /home/pi/CubeSatSim/sim.cfg` #echo "$value" > /dev/null From 4b3e527419986a34db28357ea952a6c021fe0254 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 06:32:23 -0500 Subject: [PATCH 0231/1744] Update direwolf-pacsat-loopback.conf set AGW port --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 74a7fb1e..6058c722 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -4,6 +4,7 @@ ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 CHANNEL 0 MODEM 1200 KISSPORT 8100 +AGWPORT 8002 FULLDUP OFF TXDELAY 30 #FIX_BITS 1 AX25 From 1c67dbdbb36cfaac6131b59f5386cff1843a850e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 06:57:37 -0500 Subject: [PATCH 0232/1744] Update install changed from W3ZM to AMSAT --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index eed5aef2..216dd74f 100755 --- a/install +++ b/install @@ -158,9 +158,9 @@ export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LI #set -- $value echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=W3ZM-12" >> pacsat.config -echo "broadcast_callsign=W3ZM-11" >> pacsat.config -echo "digi_callsign=W3ZM-1" >> pacsat.config +echo "bbs_callsign=AMSAT-12" >> pacsat.config +echo "broadcast_callsign=AMSAT-11" >> pacsat.config +echo "digi_callsign=AMSAT-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config echo "pb_open=1" > pacsat.state From a2797e17b9942cc9a2981a0f4eba2221c55a1066 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 07:17:30 -0500 Subject: [PATCH 0233/1744] Update pacsatsim.sh try -du --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2bc9bcc6..e7ca6ba8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + direwolf -P+ -D1 -qd -du -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From d660f6451583be55ba3acbc6105a6005ce85c253 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 07:21:27 -0500 Subject: [PATCH 0234/1744] Update pacsatsim.sh try -dp --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index e7ca6ba8..5f2e717e 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -185,7 +185,7 @@ else echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - direwolf -P+ -D1 -qd -du -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & fi From 0d954f7f3d5998bbd5658130908dfc5cd580ab00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 07:24:38 -0500 Subject: [PATCH 0235/1744] Update pacsat.sh add direwolf -dp for packet dump --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 56be5a59..f187e1ca 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -61,7 +61,7 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." From 3cce953b8c9c6b3c3ed856218bafb9be86f8c857 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 7 Jan 2025 09:58:56 -0500 Subject: [PATCH 0236/1744] Update direwolf-pacsatsim-loopback.conf upload better with txdelay 15 --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 64c7bfe5..3fc85671 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -4,5 +4,5 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 75 +TXDELAY 15 #FIX_BITS 1 AX25 From d8c8cfe3fa5197570cc6f513b21495f25bb0fefe Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:54:09 -0500 Subject: [PATCH 0237/1744] Update cubicsdr.sh add also stop/start --- groundstation/cubicsdr.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/groundstation/cubicsdr.sh b/groundstation/cubicsdr.sh index f9c3146c..2bfb65dc 100755 --- a/groundstation/cubicsdr.sh +++ b/groundstation/cubicsdr.sh @@ -23,7 +23,7 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -39,9 +39,10 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null -zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & - +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start +zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & sleep 5 From 29acb25334f94f8f09d2fffdcdd03e796acc34af Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:55:42 -0500 Subject: [PATCH 0238/1744] Update fox.sh add alsa stop/start --- groundstation/fox.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/fox.sh b/groundstation/fox.sh index 233644ef..36e241e0 100755 --- a/groundstation/fox.sh +++ b/groundstation/fox.sh @@ -23,12 +23,15 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + sleep 5 #/home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData-CubeSatSim From e676205c3cab60490bc7b6915d934e3fe69da0f2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:57:51 -0500 Subject: [PATCH 0239/1744] Update pacsat.sh add alsa stop/start --- groundstation/pacsat.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f187e1ca..056ff0ca 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,7 +24,7 @@ sudo killall -9 rtl_fm &>/dev/null #sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -40,6 +40,9 @@ echo sudo systemctl restart pacsatsim +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + echo "Waiting 10 seconds for Pacsatsim to start" From 15986706d87d9c328063400b56bae3bf7c2c32c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:58:35 -0500 Subject: [PATCH 0240/1744] Update rtl-tcp.sh add alsa stop/start --- groundstation/rtl-tcp.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index e16c6e9a..d5d541b1 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -45,10 +45,13 @@ sudo killall -9 qsstv &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + #sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sudo systemctl start rtl_tcp &>/dev/null From d25bbf7dc08e6cd79ff9a2e6fc8390c519ddf827 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:59:20 -0500 Subject: [PATCH 0241/1744] Update sdr.sh add alsa stop/start --- groundstation/sdr.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 8dfd5e64..66983556 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -38,7 +38,7 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 qsstv &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 direwolf &>/dev/null @@ -46,6 +46,9 @@ sudo killall -9 zenity &>/dev/null sudo systemctl stop rtl_tcp &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + sudo systemctl restart openwebrx &>/dev/null sleep 10 From 3ef21390e3e16ff629aae7b9b6fba5fc48e22b4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 06:59:55 -0500 Subject: [PATCH 0242/1744] Update sdrpp.sh add alsa stop/start --- groundstation/sdrpp.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/groundstation/sdrpp.sh b/groundstation/sdrpp.sh index 73f520e7..08736032 100755 --- a/groundstation/sdrpp.sh +++ b/groundstation/sdrpp.sh @@ -19,7 +19,7 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null -sudo killall -9 aplay &>/dev/null +#sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -35,6 +35,9 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + sleep 5 setsid sdrpp From aeec194e8d91ab376b86e076d2a2e0244c1a7de8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:14:20 -0500 Subject: [PATCH 0243/1744] Update loc-add-foxtelem.py added Pacsat location setting --- groundstation/loc-add-foxtelem.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/groundstation/loc-add-foxtelem.py b/groundstation/loc-add-foxtelem.py index 64c47bbd..1f4279cc 100644 --- a/groundstation/loc-add-foxtelem.py +++ b/groundstation/loc-add-foxtelem.py @@ -118,6 +118,16 @@ if (latitude != 0) and (longitude != 0): system(longSedStr) print("\nKLAtracker configuration updated with your latitude and longitude") + + latSedStr = 'sed -i "s/latitude=.*/latitude=' + str(latitude) + '/g" /home/pi/PacSatGround/PacSatGround.properties' + #print (latSedStr) + system(latSedStr) + + longSedStr = 'sed -i "s/longitude=.*/longitude=' + str(longitude) + '/g" /home/pi/PacSatGround/PacSatGround.properties' + #print (longSedStr) + system(longSedStr) + + print("\nPacsat configuration updated with your latitude and longitude") receiver_gpsSedStr = 'sudo sed -i "s/ ' + dquote + 'lat' + dquote + ': .*/ ' + dquote + 'lat' + dquote + ': ' + str(latitude) + ',/g" /var/lib/openwebrx/settings.json' #print (receiver_gpsSedStr) From 00fff29dc664577348bc6386327a547cc8fc6308 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:20:30 -0500 Subject: [PATCH 0244/1744] Update config change callsign in Pacsat Ground Station --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 3764aa86..a38e55a9 100755 --- a/config +++ b/config @@ -553,6 +553,8 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config > /dev/null 2>&1 + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties' + sudo sed -i "s/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties' fi if [ "$norestart" = "1" ]; then From 2c25bbf453768a9dd7ae6325b8c86ff962098398 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:27:32 -0500 Subject: [PATCH 0245/1744] Update config remove dev null --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index a38e55a9..4e2e3406 100755 --- a/config +++ b/config @@ -552,7 +552,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config > /dev/null 2>&1 + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties' sudo sed -i "s/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties' fi From 0fb005db3b894c19dcc864cec5c29bd1f3f551ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:36:30 -0500 Subject: [PATCH 0246/1744] Update config sed typos --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 4e2e3406..936ddad0 100755 --- a/config +++ b/config @@ -553,8 +553,8 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties' - sudo sed -i "s/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties' + sudo sed -i 's/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then From 1a7e2f8fdd5ac68abf60917543c73ad4b73cf4b0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:38:56 -0500 Subject: [PATCH 0247/1744] Update pacsat.sh add back kill direwolf --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 056ff0ca..0ab6acb9 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -22,7 +22,7 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null -#sudo killall -9 direwolf &>/dev/null +sudo killall -9 direwolf &>/dev/null #sudo killall -9 aplay &>/dev/null From d814dc1788e04a28878f0afdaf789cd8c3afa92f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:52:01 -0500 Subject: [PATCH 0248/1744] Update config stop pacsatsim and java for callsign change --- config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config b/config index 936ddad0..59e752a8 100755 --- a/config +++ b/config @@ -552,6 +552,9 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + sudo systemctl stop pacsatsim + sudo killall -9 java &>/dev/null + sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i 's/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties From 38121edbbb20bec20947a52b397bb51d252301db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 07:57:03 -0500 Subject: [PATCH 0249/1744] Update config fix sed --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 59e752a8..1929eee1 100755 --- a/config +++ b/config @@ -555,9 +555,9 @@ elif [ "$1" = "-c" ]; then sudo systemctl stop pacsatsim sudo killall -9 java &>/dev/null - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i 's/callsign=$oldcallsign/callsign=$callsign/g' /home/pi/PacSatGround/PacSatGround.properties - sudo sed -i 's/$oldcallsign/$callsign/g' /home/pi/PacSatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then From b3d34ca70fc2171c4fd7e3ade5f7645b7982fd50 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:00:40 -0500 Subject: [PATCH 0250/1744] Update pacsat.sh added pacsatsim stop at the end --- groundstation/pacsat.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 0ab6acb9..dcc80fd3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,5 +75,9 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +sudo systemctl stop pacsatsim + +sleep 10 + From e99b9d0bb0998346b03f6a81c6c43ebf869c12b6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:03:49 -0500 Subject: [PATCH 0251/1744] Update pacsat.sh --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index dcc80fd3..df4d9edf 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -79,5 +79,7 @@ sudo systemctl stop pacsatsim sleep 10 +echo "Stopping Pacsatsim" + From 53dfb22cceb422e4ac2324c926a1acb7071593dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:08:10 -0500 Subject: [PATCH 0252/1744] Update pacsat.sh added >/dev/null 2>&1 --- groundstation/pacsat.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index df4d9edf..e2f2913c 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,19 +4,19 @@ sudo modprobe snd-aloop -sudo systemctl stop cubesatsim +sudo systemctl stop cubesatsim >/dev/null 2>&1 -sudo systemctl stop transmit +sudo systemctl stop transmit >/dev/null 2>&1 -sudo systemctl stop command +sudo systemctl stop command >/dev/null 2>&1 #/home/pi/CubeSatSim/config -I -sudo systemctl stop command &>/dev/null +sudo systemctl stop command >/dev/null 2>&1 -sudo systemctl stop openwebrx &>/dev/null +sudo systemctl stop openwebrx >/dev/null 2>&1 -sudo systemctl stop rtl_tcp &>/dev/null +sudo systemctl stop rtl_tcp >/dev/null 2>&1 pkill -o chromium &>/dev/null @@ -75,7 +75,7 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -sudo systemctl stop pacsatsim +sudo systemctl stop pacsatsim sleep 10 From c14d2189ebee014d16d7d46595068a23fba16282 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:29:33 -0500 Subject: [PATCH 0253/1744] Update pacsat.sh add #$SHELL --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e2f2913c..acf59fc2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -81,5 +81,7 @@ sleep 10 echo "Stopping Pacsatsim" +$SHELL + From 8be415e59b946a89a8a73d9de8c04217439811ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:33:28 -0500 Subject: [PATCH 0254/1744] Update pacsat.sh remove stop pacsatsim at end --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index acf59fc2..e846f248 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,11 +75,13 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -sudo systemctl stop pacsatsim +cd + +#sudo systemctl stop pacsatsim sleep 10 -echo "Stopping Pacsatsim" +#echo "Stopping Pacsatsim" $SHELL From 978eb8b4ebfa05c1208978410c359cdf537fcd15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:40:04 -0500 Subject: [PATCH 0255/1744] Update pacsat.sh launch direwolf in separate window --- groundstation/pacsat.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e846f248..acc304cd 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,10 +64,11 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" echo -echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback." +echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" echo From cfa1f66324bea05bf6e5707942b7e94da72bd687 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:41:17 -0500 Subject: [PATCH 0256/1744] Update pacsat.sh remove SHELL at end --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index acc304cd..b8deafc7 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -84,7 +84,7 @@ sleep 10 #echo "Stopping Pacsatsim" -$SHELL +#$SHELL From ff3230b0c311740fffef86fc5dfac60dd3518451 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:46:24 -0500 Subject: [PATCH 0257/1744] Update pacsat.sh back to SHELL --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b8deafc7..2c4e8aa5 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,8 +64,8 @@ sleep 10 #echo -#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" @@ -84,7 +84,7 @@ sleep 10 #echo "Stopping Pacsatsim" -#$SHELL +$SHELL From 87d2ec4b9cb6f53110bcc3367551a192fd7b802e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:47:45 -0500 Subject: [PATCH 0258/1744] Update pacsat.sh remove & --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 2c4e8aa5..c7a09c84 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,7 +64,7 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 & +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" echo From c04e9e7263d2806aee4f2b949f7d2b97b283bed6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:49:23 -0500 Subject: [PATCH 0259/1744] Update pacsat.sh change order of pacsat and direwolf --- groundstation/pacsat.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index c7a09c84..644306fa 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -64,18 +64,24 @@ sleep 10 #echo -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - echo echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" echo - cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" + + + + +#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" + cd #sudo systemctl stop pacsatsim From 1b20bff48a6bca6475a80348f43fc1a8d6b6e3ff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:50:25 -0500 Subject: [PATCH 0260/1744] Update pacsat.sh add kill sdrpp --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 644306fa..d601d114 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,6 +24,8 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null +sudo killall -9 sdrpp &>/dev/null + #sudo killall -9 aplay &>/dev/null sudo killall -9 qsstv &>/dev/null From 75e12ce363a14807ecdf1c5aec5436825d8a7f0f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:54:39 -0500 Subject: [PATCH 0261/1744] Update pacsat.sh back to separate wndow --- groundstation/pacsat.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d601d114..895b3a46 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -74,11 +74,11 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - +#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ @@ -92,7 +92,7 @@ sleep 10 #echo "Stopping Pacsatsim" -$SHELL +#$SHELL From 26774c7db3280d05f8a256afaa1058c5da8f4c2a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 08:57:39 -0500 Subject: [PATCH 0262/1744] Update sdrpp.sh add & --- groundstation/sdrpp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sdrpp.sh b/groundstation/sdrpp.sh index 08736032..2dd97fd1 100755 --- a/groundstation/sdrpp.sh +++ b/groundstation/sdrpp.sh @@ -40,7 +40,7 @@ sudo /etc/init.d/alsa-utils start sleep 5 -setsid sdrpp +setsid sdrpp & sleep 10 From e41fd1e58c6aaa5e2fb1408f0f60ced9acfcf4c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 09:00:55 -0500 Subject: [PATCH 0263/1744] Update sstv_decode_prompt.sh add & --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index fbc55895..7ae8cd9b 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -135,7 +135,7 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & #rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 46a20c7840f61ae8e2e6d11756ad88c9c3a64d1d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 09:04:17 -0500 Subject: [PATCH 0264/1744] Update sstv_decode_prompt.sh remove & --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 7ae8cd9b..fbc55895 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -135,7 +135,7 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & +rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From d49477f0ec72d644733c819001da16d4e5e868ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jan 2025 09:10:38 -0500 Subject: [PATCH 0265/1744] Update pacsat.desktop make window large --- groundstation/pacsat.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop index 539c0e1d..d1be6bbf 100644 --- a/groundstation/pacsat.desktop +++ b/groundstation/pacsat.desktop @@ -2,7 +2,7 @@ Name=Pacsat GenericName=Pacsat Loopback Comment=Pacsat -Exec=/home/pi/CubeSatSim/groundstation/pacsat.sh +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/packet.sh" Icon=/home/pi/Icons/pacsat.png Terminal=true Type=Application From e24b1a46c6a3024ba69689fee875dbe4e0246cb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jan 2025 21:58:58 -0500 Subject: [PATCH 0266/1744] Update pacsat.desktop --- groundstation/pacsat.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop index d1be6bbf..7fef68f8 100644 --- a/groundstation/pacsat.desktop +++ b/groundstation/pacsat.desktop @@ -2,7 +2,7 @@ Name=Pacsat GenericName=Pacsat Loopback Comment=Pacsat -Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/packet.sh" +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat.sh" Icon=/home/pi/Icons/pacsat.png Terminal=true Type=Application From 95dd40dbead88f4186810f5c5d58350d48c778df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jan 2025 22:21:15 -0500 Subject: [PATCH 0267/1744] Update aprs.desktop --- groundstation/aprs.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/aprs.desktop b/groundstation/aprs.desktop index 5f360f7b..a7d0062a 100644 --- a/groundstation/aprs.desktop +++ b/groundstation/aprs.desktop @@ -2,7 +2,7 @@ Name=APRS Decode using Direwolf GenericName=Decodes APRS using rtl_fm and Direwolf Comment=APRS signals -Exec=/home/pi/CubeSatSim/groundstation/packet.sh +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/packet.sh" Icon=/home/pi/Icons/aprs.png Terminal=true Type=Application From 1eadb145b9e47ef09a2b3b9694e309355d02ef09 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jan 2025 22:23:21 -0500 Subject: [PATCH 0268/1744] Update direwolf.conf --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index 701d80b4..3b372144 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 From b7b91a97dab9f970ea196ba09b30884bde1a97ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 16:28:53 -0500 Subject: [PATCH 0269/1744] Update webSDR.desktop typo --- groundstation/webSDR.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/webSDR.desktop b/groundstation/webSDR.desktop index f660c2ea..387dfd95 100644 --- a/groundstation/webSDR.desktop +++ b/groundstation/webSDR.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/sdr.sh Name=Web SDR Comment=openwebrx for Web SDR -Icon=/home/pi/Iconss/openwebrx.png +Icon=/home/pi/Icons/openwebrx.png Path=/home/pi Terminal=true Categories=HamRadio From 948252c22e01e6403fb4f8e5c0989de0c5f340c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 16:36:03 -0500 Subject: [PATCH 0270/1744] Update foxtelem.desktop --- groundstation/foxtelem.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/foxtelem.desktop b/groundstation/foxtelem.desktop index 87fe00a1..c01913be 100644 --- a/groundstation/foxtelem.desktop +++ b/groundstation/foxtelem.desktop @@ -3,7 +3,7 @@ Type=Application Exec=/home/pi/CubeSatSim/groundstation/fox-run.sh Name=FoxTelem Comment=FIAB-v4 -Icon=/home/pi/Downloads/foxtelem.png +Icon=/home/pi/Icons/foxtelem.png Path=/home/pi Terminal=true Categories=HamRadio From 04107c25616cdc5a33cca3fe74c289411689be70 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 19:50:21 -0500 Subject: [PATCH 0271/1744] Update pacsat.sh remove sudo --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 895b3a46..5a7c54e7 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -72,7 +72,7 @@ echo cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" From f311960426af201be083b402de4308401061ac3a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 22:27:31 -0500 Subject: [PATCH 0272/1744] Update pacsat.sh add & to pacsat --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5a7c54e7..0b27f7c0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -72,7 +72,7 @@ echo cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" From 0ca435040e8be342cd9151b25595cb9e5a3bc920 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jan 2025 22:31:29 -0500 Subject: [PATCH 0273/1744] Update PacSatSim.properties changed to AMSAT callsign --- spacecraft/PacSatGround_0.46m/PacSatSim.properties | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.properties b/spacecraft/PacSatGround_0.46m/PacSatSim.properties index d18ebe5c..e4ccad24 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.properties +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.properties @@ -2,11 +2,11 @@ #Sun Feb 17 18:25:06 EST 2019 sequence_num=3 name=PacSatSim -digiCallsign=W3ZM-1 +digiCallsign=AMSAT-1 description=PacSatSim -broadcastCallsign=W3ZM-11 +broadcastCallsign=AMSAT-11 DIR_AGE=10 -bbsCallsign=W3ZM-12 +bbsCallsign=AMSAT-12 telemLayoutFile=PacSatSim.dat telem_server=tlm.amsatfox.org web_site_url=http://CubeSatSim.org From b010b4389390d2031634c17c977f0a59c0aaed35 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 12 Jan 2025 09:05:38 -0500 Subject: [PATCH 0274/1744] Update CubeSatSim_rttelemetry.csv --- .../FoxTelem_1.13e/CubeSatSim_rttelemetry.csv | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv b/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv index e69de29b..9dc17ff6 100644 --- a/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv +++ b/spacecraft/FoxTelem_1.13e/CubeSatSim_rttelemetry.csv @@ -0,0 +1,48 @@ +47,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,RT,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,RT,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,RT,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +3,RT,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,RT,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,RT,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,RT,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current +7,RT,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,STEM Payload Sensor BME280 Temperature +8,RT,PANEL_PLUS_X_V,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,INA219 +X Panel Voltage +9,RT,PANEL_MINUS_X_V,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,INA219 -X Panel Voltage +10,RT,PANEL_PLUS_Y_V,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,INA219 +Y Panel Voltage +11,RT,PANEL_MINUS_Y_V,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,INA219 -Y Panel Voltage +12,RT,PANEL_PLUS_Z_V,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,INA219 +Z Panel Voltage +13,RT,PANEL_MINUS_Z_V,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,INA219 -Z Panel Voltage +14,RT,PANEL_PLUS_X_I,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X Panel Current +15,RT,PANEL_MINUS_X_I,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X Panel Current +16,RT,PANEL_PLUS_Y_I,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y Panel Current +17,RT,PANEL_MINUS_Y_I,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y Panel Current +18,RT,PANEL_PLUS_Z_I,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z Panel Current +19,RT,PANEL_MINUS_Z_I,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z Panel Current +20,RT,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +21,RT,SPIN,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,RT,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,STEM Payload Sensor BME280 Pressure +23,RT,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,STEM Payload Sensor BME280 Altitude +24,RT,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,RT,RSSI,12,dBm,cubesatsim_rssi|INT,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,RT,IHUTemperature,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal Temperature of Pi IHU +27,RT,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular Veolcity around X Axis +28,RT,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular Veolcity around Y Axis +29,RT,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular Veolcity around Z Axis +30,RT,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,STEM Payload Sensor BME280 Humidity +31,RT,BATT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,RT,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,RT,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,RT,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status,STEM Payload Board Status +35,RT,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,RT,SimulatedTelemetry,1,-,STATUS_ON_OFF,Computer Software,3,4,0,Simulated Telemetry, Simulated Telemetry Indicator +37,RT,PayloadStatus1,1,-,17,NONE,0,0,0,Exp 3,STEM Payload status 1 failure indicator +38,RT,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,RT,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,RT,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,RT,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator +42,RT,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,RT,RXAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +44,RT,TXAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +45,RT,C2CStatus,2,-,COMMAND_STATUS,Computer Software,3,5,0,Command Control, Command & Control Status +46,RT,Pad,56,-,0,NONE,0,0,0,NONE,NONE From 5feee9a4c233ae1fc9c3dfdbba618c64758b1120 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 18 Jan 2025 10:04:09 -0500 Subject: [PATCH 0275/1744] Update packet.sh --- groundstation/packet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index f669afda..24c04f0b 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -191,7 +191,7 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From dcc6eb488aabf127eab50bf00b1f5927f0a03143 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Feb 2025 03:39:18 -0500 Subject: [PATCH 0276/1744] Update direwolf-pacsatsim-loopback.conf add -12 to callsign --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 3fc85671..581d30cb 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,6 +1,6 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 #PTT GPIO 20 -MYCALL AMSAT +MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 FULLDUP OFF From b42985527a1a4ce84998c1a2488c5df591e4b0d2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 08:40:32 -0500 Subject: [PATCH 0277/1744] Update pacsat.sh don't restart pacsatsim --- groundstation/pacsat.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 0b27f7c0..aed65770 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -40,15 +40,15 @@ sudo killall -9 zenity &>/dev/null echo -sudo systemctl restart pacsatsim +#sudo systemctl restart pacsatsim -sudo /etc/init.d/alsa-utils stop -sudo /etc/init.d/alsa-utils start +#sudo /etc/init.d/alsa-utils stop +#sudo /etc/init.d/alsa-utils start -echo "Waiting 10 seconds for Pacsatsim to start" +#echo "Waiting 10 seconds for Pacsatsim to start" -sleep 10 +#sleep 10 #value=`cat /home/pi/CubeSatSim/sim.cfg` #echo "$value" > /dev/null From 586e22b1baac5a32855561b8d50705ec453efbec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 08:55:15 -0500 Subject: [PATCH 0278/1744] Update pacsat.sh don't kill direwolf --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index aed65770..59551eb3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -22,7 +22,7 @@ pkill -o chromium &>/dev/null sudo killall -9 rtl_fm &>/dev/null -sudo killall -9 direwolf &>/dev/null +#sudo killall -9 direwolf &>/dev/null sudo killall -9 sdrpp &>/dev/null From c45674512e4088eeb4c92a58eb6d338c01e419a9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:07:06 -0500 Subject: [PATCH 0279/1744] separate direwolf windows --- groundstation/pacsat-d.sh | 98 ++++++++++++++++++ pacsatsim-d.sh | 204 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 302 insertions(+) create mode 100755 groundstation/pacsat-d.sh create mode 100755 pacsatsim-d.sh diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh new file mode 100755 index 00000000..59551eb3 --- /dev/null +++ b/groundstation/pacsat-d.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +sudo modprobe snd-aloop + +sudo systemctl stop cubesatsim >/dev/null 2>&1 + +sudo systemctl stop transmit >/dev/null 2>&1 + +sudo systemctl stop command >/dev/null 2>&1 + +#/home/pi/CubeSatSim/config -I + +sudo systemctl stop command >/dev/null 2>&1 + +sudo systemctl stop openwebrx >/dev/null 2>&1 + +sudo systemctl stop rtl_tcp >/dev/null 2>&1 + +pkill -o chromium &>/dev/null + +sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 direwolf &>/dev/null + +sudo killall -9 sdrpp &>/dev/null + +#sudo killall -9 aplay &>/dev/null + +sudo killall -9 qsstv &>/dev/null + +sudo killall -9 rtl_tcp &>/dev/null + +sudo killall -9 java &>/dev/null + +sudo killall -9 CubicSDR &>/dev/null + +sudo killall -9 zenity &>/dev/null + +echo + +#sudo systemctl restart pacsatsim + +#sudo /etc/init.d/alsa-utils stop +#sudo /etc/init.d/alsa-utils start + + +#echo "Waiting 10 seconds for Pacsatsim to start" + +#sleep 10 + +#value=`cat /home/pi/CubeSatSim/sim.cfg` +#echo "$value" > /dev/null +#set -- $value + +#echo "Receive frequency is $8 MHz" +#echo "Transmit frequency is $7 MHz" +#echo +#echo "To change, quit and type CubeSatSim/config -F" +#echo + +#frequency="$8e6" + +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +#echo + +echo +echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" +echo + +cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & + +#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" + + +echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." + +#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" + +cd + +#sudo systemctl stop pacsatsim + +sleep 10 + +#echo "Stopping Pacsatsim" + +#$SHELL + + + diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh new file mode 100755 index 00000000..5f2e717e --- /dev/null +++ b/pacsatsim-d.sh @@ -0,0 +1,204 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + +#sudo systemctl stop cubesatsim + +#sudo systemctl stop transmit + +sudo systemctl stop command &>/dev/null + +sudo modprobe snd-aloop + +#sudo systemctl stop openwebrx + +#sudo systemctl stop rtl_tcp &>/dev/null + +#pkill -o chromium &>/dev/null + +#sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 direwolf &>/dev/null + +#udo killall -9 aplay &>/dev/null + +#sudo killall -9 qsstv &>/dev/null + +#sudo killall -9 rtl_tcp &>/dev/null + +#sudo killall -9 java &>/dev/null + +#sudo killall -9 CubicSDR &>/dev/null + +#sudo killall -9 zenity &>/dev/null + +echo + +#frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +#if [ -z "$frequency" ]; then + +#echo "No choice made. Exiting." + +#sleep 3 + +#exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +choice=2 + +#fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your Pacsat Ground Station is transmitting packets, you will see them here" + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +#echo + +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + + echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +cd /home/pi/pi_pacsat/Debug + +./pi_pacsat -c pacsat.config -d /home/pi/PacSat + +sleep 5 From cb6d5ea73a7e4db93bebdd95a3236d6267e1f0c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:08:52 -0500 Subject: [PATCH 0280/1744] Update pacsat-d.sh just run direwolf --- groundstation/pacsat-d.sh | 92 --------------------------------------- 1 file changed, 92 deletions(-) diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh index 59551eb3..8c58dd73 100755 --- a/groundstation/pacsat-d.sh +++ b/groundstation/pacsat-d.sh @@ -1,98 +1,6 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat - -sudo modprobe snd-aloop - -sudo systemctl stop cubesatsim >/dev/null 2>&1 - -sudo systemctl stop transmit >/dev/null 2>&1 - -sudo systemctl stop command >/dev/null 2>&1 - -#/home/pi/CubeSatSim/config -I - -sudo systemctl stop command >/dev/null 2>&1 - -sudo systemctl stop openwebrx >/dev/null 2>&1 - -sudo systemctl stop rtl_tcp >/dev/null 2>&1 - -pkill -o chromium &>/dev/null - -sudo killall -9 rtl_fm &>/dev/null - -#sudo killall -9 direwolf &>/dev/null - -sudo killall -9 sdrpp &>/dev/null - -#sudo killall -9 aplay &>/dev/null - -sudo killall -9 qsstv &>/dev/null - -sudo killall -9 rtl_tcp &>/dev/null - -sudo killall -9 java &>/dev/null - -sudo killall -9 CubicSDR &>/dev/null - -sudo killall -9 zenity &>/dev/null - -echo - -#sudo systemctl restart pacsatsim - -#sudo /etc/init.d/alsa-utils stop -#sudo /etc/init.d/alsa-utils start - - -#echo "Waiting 10 seconds for Pacsatsim to start" - -#sleep 10 - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -#echo "Receive frequency is $8 MHz" -#echo "Transmit frequency is $7 MHz" -#echo -#echo "To change, quit and type CubeSatSim/config -F" -#echo - -#frequency="$8e6" - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -#echo - -echo -echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" -echo - -cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & - -#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" -echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." - -#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" - -cd - -#sudo systemctl stop pacsatsim - -sleep 10 - -#echo "Stopping Pacsatsim" - -#$SHELL - - From cef6daf1d7a8baf9490f7233fa59b0e62efe4706 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:10:13 -0500 Subject: [PATCH 0281/1744] Update pacsatsim-d.sh just run direwolf --- pacsatsim-d.sh | 201 +------------------------------------------------ 1 file changed, 1 insertion(+), 200 deletions(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index 5f2e717e..7480af0c 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -1,204 +1,5 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat - -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - -#sudo systemctl stop cubesatsim - -#sudo systemctl stop transmit - -sudo systemctl stop command &>/dev/null - sudo modprobe snd-aloop -#sudo systemctl stop openwebrx - -#sudo systemctl stop rtl_tcp &>/dev/null - -#pkill -o chromium &>/dev/null - -#sudo killall -9 rtl_fm &>/dev/null - -#sudo killall -9 direwolf &>/dev/null - -#udo killall -9 aplay &>/dev/null - -#sudo killall -9 qsstv &>/dev/null - -#sudo killall -9 rtl_tcp &>/dev/null - -#sudo killall -9 java &>/dev/null - -#sudo killall -9 CubicSDR &>/dev/null - -#sudo killall -9 zenity &>/dev/null - -echo - -#frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") - -#echo $frequency - -#if [ -z "$frequency" ]; then - -#echo "No choice made. Exiting." - -#sleep 3 - -#exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -choice=2 - -#fi - -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 - echo - echo "If your Pacsat Ground Station is transmitting packets, you will see them here" - echo - -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi - -#echo - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -echo - -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & - -else - - echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - -fi - -sleep 5 - -value=`aplay -l | grep "Loopback"` -echo "$value" > /dev/null -set -- $value - -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - -cd /home/pi/pi_pacsat/Debug - -./pi_pacsat -c pacsat.config -d /home/pi/PacSat - -sleep 5 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 From 7c2cfc9b8ba9568897601decc36d60addbaf69f5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:13:24 -0500 Subject: [PATCH 0282/1744] Update pacsat.sh don't start direwolf --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 59551eb3..57f98fd9 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,10 +75,10 @@ cd /home/pi/Desktop/PacSatGround_0.46m_linux/ setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" -echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." +#echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ From 034ffeec911cb0338155e873a06474bb237775e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:14:23 -0500 Subject: [PATCH 0283/1744] Update pacsatsim.sh don't start direwolf --- pacsatsim.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5f2e717e..a1998cb0 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -183,10 +183,10 @@ if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] else - echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & +# echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + echo fi sleep 5 From 25da37ea525dd04f834d0ef27a6fd53b81501615 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 09:19:15 -0500 Subject: [PATCH 0284/1744] Update direwolf-pacsatsim-loopback.conf change full duplex on --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 581d30cb..d1bcf78d 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -3,6 +3,6 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP OFF +FULLDUP ON TXDELAY 15 #FIX_BITS 1 AX25 From 76d8323dc0638eb6c94aa81e63ad75cfff389bf8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 12:31:32 -0500 Subject: [PATCH 0285/1744] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1ec10273..bdac8141 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ There are several hardware versions and software branches to go with them - see See the Wiki Software Install page for more details: https://github.com/alanbjohnston/CubeSatSim/wiki/2.-Software-Install. The software runs on any Raspberry Pi including the Raspberry Pi 4B, 3B, 3B+, Pi Zero, Pi Zero W, or Pi Zero 2 W. -There are two ways to get the CubeSatSim software for your Pi. +There are two ways to get the CubeSatSim(TM) software for your Pi. One option is to download the disk image file and write it to a 16GB micro SD card or larger. The image is based on Raspberry Pi OS (Rasbian) Lite, dated December 2020. All software is installed, you just need to login to change your password and set your amateur radio callsign if you have one. You can run the ./update.sh script to update all packages and update and compile the latest CubeSatSim software. From 259419573f949dc3eb5b6e1e18fbcc4d39a46637 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:04:23 -0500 Subject: [PATCH 0286/1744] test script to launch 4 windows --- pacsat-test.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 pacsat-test.sh diff --git a/pacsat-test.sh b/pacsat-test.sh new file mode 100755 index 00000000..8c58dd73 --- /dev/null +++ b/pacsat-test.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" + + + From 509fa014c50c1462b58ff5ac46b27bbd3c5b229a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:07:43 -0500 Subject: [PATCH 0287/1744] Update pacsat-test.sh add 4 windows --- pacsat-test.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pacsat-test.sh b/pacsat-test.sh index 8c58dd73..1943056f 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -1,6 +1,17 @@ #!/bin/bash +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" + +sleep 1 + +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim.sh" + +sleep 1 + /usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +sleep 1 + +/usr/bin/x-terminal-emulator --geometry=120x40 -e /home/pi/CubeSatSim/groundstation/pacsat.sh" From ff7846985878b5c556599033e45a2c541b916d48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:09:15 -0500 Subject: [PATCH 0288/1744] Update pacsat-test.sh add bash --- pacsat-test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsat-test.sh b/pacsat-test.sh index 1943056f..0957c4a0 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -1,10 +1,10 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim-d.sh" sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim.sh" sleep 1 @@ -12,6 +12,6 @@ sleep 1 sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e /home/pi/CubeSatSim/groundstation/pacsat.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/groundstation/pacsat.sh" From 95eb85e88df4d54ef3c96e88770a2a5cb9ca6690 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Feb 2025 19:11:40 -0500 Subject: [PATCH 0289/1744] Update pacsat.sh removed & --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 57f98fd9..4daff914 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -72,7 +72,7 @@ echo cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" & +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" From 1d6d13814958b9525809e13e79f41ac2d1e05ee2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 15:44:41 -0500 Subject: [PATCH 0290/1744] Update direwolf-pacsatsim-jp14.conf making the same as loopback but with Device --- direwolf/direwolf-pacsatsim-jp14.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 64c7bfe5..36891485 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,8 +1,8 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 #PTT GPIO 20 -MYCALL AMSAT +MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP OFF -TXDELAY 75 +FULLDUP ON +TXDELAY 15 #FIX_BITS 1 AX25 From e735f7487fe9c2a78907248fb15a146062f04cc9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 15:47:00 -0500 Subject: [PATCH 0291/1744] Update direwolf-fm-pacsat-jp14.conf making same as loopback but with Device --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 6e4fc073..df741a62 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,10 +1,10 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 #PTT GPIO 20 CHANNEL 0 MODEM 1200 KISSPORT 8100 +AGWPORT 8002 FULLDUP OFF TXDELAY 30 #FIX_BITS 1 AX25 -KISSPORT 8001 From b0ed82ded4b2b5e5033cd3d6018d206303680f89 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:05:12 -0500 Subject: [PATCH 0292/1744] adding direwolf jp14 script --- groundstation/pacsat-dj.sh | 6 ++++++ pacsatsim-dj.sh | 5 +++++ 2 files changed, 11 insertions(+) create mode 100755 groundstation/pacsat-dj.sh create mode 100755 pacsatsim-dj.sh diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh new file mode 100755 index 00000000..b4fec439 --- /dev/null +++ b/groundstation/pacsat-dj.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-jp14.conf -t 0" + + + diff --git a/pacsatsim-dj.sh b/pacsatsim-dj.sh new file mode 100755 index 00000000..3999eb8d --- /dev/null +++ b/pacsatsim-dj.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 From 4ae4f08851a65768696c923ab63ec412c2980f2c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:19:30 -0500 Subject: [PATCH 0293/1744] Update pacsat-dj.sh add fm --- groundstation/pacsat-dj.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh index b4fec439..c7b4ea04 100755 --- a/groundstation/pacsat-dj.sh +++ b/groundstation/pacsat-dj.sh @@ -1,6 +1,6 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-jp14.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-jp14.conf -t 0" From 105d1312ddf6b08dee0241b041ce90d20ec14480 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:19:54 -0500 Subject: [PATCH 0294/1744] Update pacsat-test.sh add fm --- pacsat-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsat-test.sh b/pacsat-test.sh index 0957c4a0..71d0b036 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -8,7 +8,7 @@ sleep 1 sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-loopback.conf -t 0" sleep 1 From 06fd0e6955643a95fe7e2cc7b9a7f5ee955e173d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:21:21 -0500 Subject: [PATCH 0295/1744] Update pacsat-test.sh add fm --- pacsat-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsat-test.sh b/pacsat-test.sh index 71d0b036..dd43979c 100755 --- a/pacsat-test.sh +++ b/pacsat-test.sh @@ -8,7 +8,7 @@ sleep 1 sleep 1 -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-loopback.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-loopback.conf -t 0" sleep 1 From c0ebd632c6558952b6a959ce24d0b503ba83a902 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Feb 2025 16:21:59 -0500 Subject: [PATCH 0296/1744] Update pacsat-dj.sh add fm --- groundstation/pacsat-dj.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh index c7b4ea04..7a49576e 100755 --- a/groundstation/pacsat-dj.sh +++ b/groundstation/pacsat-dj.sh @@ -1,6 +1,6 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-fm-jp14.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0" From 465ea04df282db1dff8210f95fb5b52241dfc85c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 13:45:10 -0400 Subject: [PATCH 0297/1744] Create auto-tune.py --- groundstation/auto-tune.py | 81 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 groundstation/auto-tune.py diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py new file mode 100644 index 00000000..435d6523 --- /dev/null +++ b/groundstation/auto-tune.py @@ -0,0 +1,81 @@ +from rtlsdr import RtlSdr +import numpy as np +import matplotlib.pyplot as plt + +# Create a sample signal (sum of two sine waves) +sampling_rate = 1024e3 # 250e3 # Hz +duration = 65536/sampling_rate # 1 # seconds +# t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) +t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) +# frequency1 = 50 # Hz +# frequency2 = 120 # Hz +# signal = 0.7 * np.sin(2 * np.pi * frequency1 * t) + np.sin(2 * np.pi * frequency2 * t) + +sdr = RtlSdr() + +# configure device +sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 +center_frequency = 434.8e6 +sdr.center_freq = center_frequency +sdr.gain = 4 +sdr.direct_sampling = False + +# signal = sdr.read_samples(64*1024) #256 +signal = sdr.read_samples(duration*sampling_rate) #256 + +print(f"Center frequency is {center_frequency}") + +sdr.close() + +# Compute the FFT +fft_result = np.fft.fft(signal) + +# Calculate the frequencies corresponding to the FFT output +n = len(signal) +frequencies = np.fft.fftfreq(n, d=1/sampling_rate) + +# Take the absolute value for amplitude spectrum and consider only the positive frequencies +positive_frequencies_indices = np.where(frequencies >= 0) +positive_frequencies = frequencies[positive_frequencies_indices] +amplitude_spectrum = 2/n * np.abs(fft_result[positive_frequencies_indices]) # Normalize for amplitude + +# Plotting the results +plt.figure(figsize=(12, 6)) + +plt.subplot(1, 2, 1) +plt.plot(t, signal) +plt.title('Time Domain Signal') +plt.xlabel('Time (s)') +plt.ylabel('Amplitude') + +plt.subplot(1, 2, 2) +plt.stem(positive_frequencies, amplitude_spectrum, markerfmt=" ", basefmt="-b") +plt.title('Frequency Domain (FFT)') +plt.xlabel('Frequency (Hz)') +plt.ylabel('Amplitude') +plt.grid(True) + +plt.tight_layout() +plt.show() + +print(amplitude_spectrum) +x = amplitude_spectrum +print(x) +min_value = min(x) +max_value = max(x) + +#freq_min = np.argmax(min_value) +print(np.argmax(x)) +print(np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) +print(sampling_rate) +print(center_frequency) + +offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) +freq_max = center_frequency + offset + +print(f"The maximum signal is {max_value} at frequency {freq_max}") +#print(f"The minimum signal is {min_value} at frequency {freq_min}") + +print(min_value) +print(max_value) + From 873f789b426b0d863b59f83d058e8e8e09282cc6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 13:48:37 -0400 Subject: [PATCH 0298/1744] Update auto-tune.py add .real --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 435d6523..d83e33cc 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -21,7 +21,7 @@ sdr.gain = 4 sdr.direct_sampling = False # signal = sdr.read_samples(64*1024) #256 -signal = sdr.read_samples(duration*sampling_rate) #256 +signal = sdr.read_samples(duration*sampling_rate).real #256 print(f"Center frequency is {center_frequency}") From a0dbfdc646495a23c14639dee7477e47e9e9ed70 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:06:42 -0400 Subject: [PATCH 0299/1744] Update auto-tune.py add parameters --- groundstation/auto-tune.py | 73 +++++++++++++++++++++++--------------- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index d83e33cc..b473e96e 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -2,6 +2,20 @@ from rtlsdr import RtlSdr import numpy as np import matplotlib.pyplot as plt +if __name__ == "__main__": + graph = 'n' + center_frequency = 434.9e6 + if (len(sys.argv)) > 0: + print("There are arguments!") + center_frequency = float(sys.argv[1]) + if (center_frequency == 0): + center_frequency = 434.9e6 + if (len(sys.argv)) > 1: + print("There are more arguments") + if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): + graph = 'y' + + # Create a sample signal (sum of two sine waves) sampling_rate = 1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds @@ -15,7 +29,7 @@ sdr = RtlSdr() # configure device sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 -center_frequency = 434.8e6 +#center_frequency = 434.8e6 sdr.center_freq = center_frequency sdr.gain = 4 sdr.direct_sampling = False @@ -39,43 +53,44 @@ positive_frequencies_indices = np.where(frequencies >= 0) positive_frequencies = frequencies[positive_frequencies_indices] amplitude_spectrum = 2/n * np.abs(fft_result[positive_frequencies_indices]) # Normalize for amplitude -# Plotting the results -plt.figure(figsize=(12, 6)) - -plt.subplot(1, 2, 1) -plt.plot(t, signal) -plt.title('Time Domain Signal') -plt.xlabel('Time (s)') -plt.ylabel('Amplitude') - -plt.subplot(1, 2, 2) -plt.stem(positive_frequencies, amplitude_spectrum, markerfmt=" ", basefmt="-b") -plt.title('Frequency Domain (FFT)') -plt.xlabel('Frequency (Hz)') -plt.ylabel('Amplitude') -plt.grid(True) - -plt.tight_layout() -plt.show() - -print(amplitude_spectrum) +if (graph == 'y'): + # Plotting the results + plt.figure(figsize=(12, 6)) + + plt.subplot(1, 2, 1) + plt.plot(t, signal) + plt.title('Time Domain Signal') + plt.xlabel('Time (s)') + plt.ylabel('Amplitude') + + plt.subplot(1, 2, 2) + plt.stem(positive_frequencies, amplitude_spectrum, markerfmt=" ", basefmt="-b") + plt.title('Frequency Domain (FFT)') + plt.xlabel('Frequency (Hz)') + plt.ylabel('Amplitude') + plt.grid(True) + + plt.tight_layout() + plt.show() + +# print(amplitude_spectrum) x = amplitude_spectrum -print(x) +# print(x) min_value = min(x) max_value = max(x) #freq_min = np.argmax(min_value) -print(np.argmax(x)) -print(np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) -print(sampling_rate) -print(center_frequency) +# print(np.argmax(x)) +# print(np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) +# print(sampling_rate) +# print(center_frequency) offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) freq_max = center_frequency + offset -print(f"The maximum signal is {max_value} at frequency {freq_max}") +print(f" {freq_max} {max_value}") #print(f"The minimum signal is {min_value} at frequency {freq_min}") -print(min_value) -print(max_value) +#print(min_value) +#print(max_value) From 20090e5cf96337789ec848bc0f61e07f5c2320b4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:08:06 -0400 Subject: [PATCH 0300/1744] Update auto-tune.py fix name --- groundstation/auto-tune.py | 151 ++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 78 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index b473e96e..0684731f 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -16,81 +16,76 @@ if __name__ == "__main__": graph = 'y' -# Create a sample signal (sum of two sine waves) -sampling_rate = 1024e3 # 250e3 # Hz -duration = 65536/sampling_rate # 1 # seconds -# t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) -t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) -# frequency1 = 50 # Hz -# frequency2 = 120 # Hz -# signal = 0.7 * np.sin(2 * np.pi * frequency1 * t) + np.sin(2 * np.pi * frequency2 * t) - -sdr = RtlSdr() - -# configure device -sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 -#center_frequency = 434.8e6 -sdr.center_freq = center_frequency -sdr.gain = 4 -sdr.direct_sampling = False - -# signal = sdr.read_samples(64*1024) #256 -signal = sdr.read_samples(duration*sampling_rate).real #256 - -print(f"Center frequency is {center_frequency}") - -sdr.close() - -# Compute the FFT -fft_result = np.fft.fft(signal) - -# Calculate the frequencies corresponding to the FFT output -n = len(signal) -frequencies = np.fft.fftfreq(n, d=1/sampling_rate) - -# Take the absolute value for amplitude spectrum and consider only the positive frequencies -positive_frequencies_indices = np.where(frequencies >= 0) -positive_frequencies = frequencies[positive_frequencies_indices] -amplitude_spectrum = 2/n * np.abs(fft_result[positive_frequencies_indices]) # Normalize for amplitude - -if (graph == 'y'): - # Plotting the results - plt.figure(figsize=(12, 6)) - - plt.subplot(1, 2, 1) - plt.plot(t, signal) - plt.title('Time Domain Signal') - plt.xlabel('Time (s)') - plt.ylabel('Amplitude') - - plt.subplot(1, 2, 2) - plt.stem(positive_frequencies, amplitude_spectrum, markerfmt=" ", basefmt="-b") - plt.title('Frequency Domain (FFT)') - plt.xlabel('Frequency (Hz)') - plt.ylabel('Amplitude') - plt.grid(True) - - plt.tight_layout() - plt.show() - -# print(amplitude_spectrum) -x = amplitude_spectrum -# print(x) -min_value = min(x) -max_value = max(x) - -#freq_min = np.argmax(min_value) -# print(np.argmax(x)) -# print(np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) -# print(sampling_rate) -# print(center_frequency) - -offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) -freq_max = center_frequency + offset - -print(f" {freq_max} {max_value}") -#print(f"The minimum signal is {min_value} at frequency {freq_min}") - -#print(min_value) -#print(max_value) - + sampling_rate = 1024e3 # 250e3 # Hz + duration = 65536/sampling_rate # 1 # seconds + t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) + + sdr = RtlSdr() + + # configure device + sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 + #center_frequency = 434.8e6 + sdr.center_freq = center_frequency + sdr.gain = 4 + sdr.direct_sampling = False + + # signal = sdr.read_samples(64*1024) #256 + signal = sdr.read_samples(duration*sampling_rate).real #256 + + print(f"Center frequency is {center_frequency}") + + sdr.close() + + # Compute the FFT + fft_result = np.fft.fft(signal) + + # Calculate the frequencies corresponding to the FFT output + n = len(signal) + frequencies = np.fft.fftfreq(n, d=1/sampling_rate) + + # Take the absolute value for amplitude spectrum and consider only the positive frequencies + positive_frequencies_indices = np.where(frequencies >= 0) + positive_frequencies = frequencies[positive_frequencies_indices] + amplitude_spectrum = 2/n * np.abs(fft_result[positive_frequencies_indices]) # Normalize for amplitude + + if (graph == 'y'): + # Plotting the results + plt.figure(figsize=(12, 6)) + + plt.subplot(1, 2, 1) + plt.plot(t, signal) + plt.title('Time Domain Signal') + plt.xlabel('Time (s)') + plt.ylabel('Amplitude') + + plt.subplot(1, 2, 2) + plt.stem(positive_frequencies, amplitude_spectrum, markerfmt=" ", basefmt="-b") + plt.title('Frequency Domain (FFT)') + plt.xlabel('Frequency (Hz)') + plt.ylabel('Amplitude') + plt.grid(True) + + plt.tight_layout() + plt.show() + + # print(amplitude_spectrum) + x = amplitude_spectrum + # print(x) + min_value = min(x) + max_value = max(x) + + #freq_min = np.argmax(min_value) + # print(np.argmax(x)) + # print(np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) + # print(sampling_rate) + # print(center_frequency) + + offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) + freq_max = center_frequency + offset + + print(f" {freq_max} {max_value}") + #print(f"The minimum signal is {min_value} at frequency {freq_min}") + + #print(min_value) + #print(max_value) + From 5b70b566d5352e8041b2f02a034a912c9d70927e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:09:36 -0400 Subject: [PATCH 0301/1744] Update auto-tune.py fix indentation --- groundstation/auto-tune.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 0684731f..71adc956 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -4,18 +4,17 @@ import matplotlib.pyplot as plt if __name__ == "__main__": graph = 'n' - center_frequency = 434.9e6 - if (len(sys.argv)) > 0: - print("There are arguments!") - center_frequency = float(sys.argv[1]) - if (center_frequency == 0): - center_frequency = 434.9e6 - if (len(sys.argv)) > 1: - print("There are more arguments") - if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): - graph = 'y' + center_frequency = 434.9e6 + if (len(sys.argv)) > 0: + print("There are arguments!") + center_frequency = float(sys.argv[1]) + if (center_frequency == 0): + center_frequency = 434.9e6 + if (len(sys.argv)) > 1: + print("There are more arguments") + if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): + graph = 'y' - sampling_rate = 1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) From bf98365e686418f1b006f114dd811a64da35a264 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:10:23 -0400 Subject: [PATCH 0302/1744] Update auto-tune.py more indents --- groundstation/auto-tune.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 71adc956..57d9b509 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -7,13 +7,13 @@ if __name__ == "__main__": center_frequency = 434.9e6 if (len(sys.argv)) > 0: print("There are arguments!") - center_frequency = float(sys.argv[1]) - if (center_frequency == 0): - center_frequency = 434.9e6 - if (len(sys.argv)) > 1: - print("There are more arguments") - if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): - graph = 'y' + center_frequency = float(sys.argv[1]) + if (center_frequency == 0): + center_frequency = 434.9e6 + if (len(sys.argv)) > 1: + print("There are more arguments") + if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): + graph = 'y' sampling_rate = 1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds From 93265df16a0960dbd0a1b57ec72c57de7e3e3b3e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:10:59 -0400 Subject: [PATCH 0303/1744] Update auto-tune.py more indent --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 57d9b509..90a1b14e 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -13,7 +13,7 @@ if __name__ == "__main__": if (len(sys.argv)) > 1: print("There are more arguments") if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): - graph = 'y' + graph = 'y' sampling_rate = 1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds From a29525c8cfb874fc43ce994352b229760a5aac00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:11:31 -0400 Subject: [PATCH 0304/1744] Update auto-tune.py add sys --- groundstation/auto-tune.py | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 90a1b14e..2f071ea1 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -1,6 +1,7 @@ from rtlsdr import RtlSdr import numpy as np import matplotlib.pyplot as plt +import sys if __name__ == "__main__": graph = 'n' From ff9d9754b5800537ba6f578efd0073e2d7227ac4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:13:21 -0400 Subject: [PATCH 0305/1744] Update auto-tune.py add 200k offset --- groundstation/auto-tune.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 2f071ea1..df982d1b 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -5,12 +5,12 @@ import sys if __name__ == "__main__": graph = 'n' - center_frequency = 434.9e6 + center_frequency = 434.7e6 if (len(sys.argv)) > 0: print("There are arguments!") - center_frequency = float(sys.argv[1]) + center_frequency = float(sys.argv[1]) - 200e6 if (center_frequency == 0): - center_frequency = 434.9e6 + center_frequency = 434.7e6 if (len(sys.argv)) > 1: print("There are more arguments") if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): From e219ab42850d490884b10a5684f6dcf10a02eb6e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:14:01 -0400 Subject: [PATCH 0306/1744] Update auto-tune.py fix 200k --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index df982d1b..82883702 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -8,7 +8,7 @@ if __name__ == "__main__": center_frequency = 434.7e6 if (len(sys.argv)) > 0: print("There are arguments!") - center_frequency = float(sys.argv[1]) - 200e6 + center_frequency = float(sys.argv[1]) - 200e3 if (center_frequency == 0): center_frequency = 434.7e6 if (len(sys.argv)) > 1: From f2c44413a6f27eb34b8363e87af4745330282eba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:16:06 -0400 Subject: [PATCH 0307/1744] Update auto-tune.py only print results --- groundstation/auto-tune.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 82883702..4ed89696 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -7,12 +7,12 @@ if __name__ == "__main__": graph = 'n' center_frequency = 434.7e6 if (len(sys.argv)) > 0: - print("There are arguments!") +# print("There are arguments!") center_frequency = float(sys.argv[1]) - 200e3 if (center_frequency == 0): center_frequency = 434.7e6 if (len(sys.argv)) > 1: - print("There are more arguments") +# print("There are more arguments") if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): graph = 'y' @@ -32,7 +32,7 @@ if __name__ == "__main__": # signal = sdr.read_samples(64*1024) #256 signal = sdr.read_samples(duration*sampling_rate).real #256 - print(f"Center frequency is {center_frequency}") +# print(f"Center frequency is {center_frequency}") sdr.close() From 54466634cfd07853d2027fce8d41c9fea06eba92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:18:33 -0400 Subject: [PATCH 0308/1744] Update auto-tune.py format output --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 4ed89696..1cb62950 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -83,7 +83,7 @@ if __name__ == "__main__": offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) freq_max = center_frequency + offset - print(f" {freq_max} {max_value}") + print(f" {:.0f} {.2f}".format(freq_max, max_value) #print(f"The minimum signal is {min_value} at frequency {freq_min}") #print(min_value) From 20c2c53a734fbd6f364e87207296c8780af110ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:20:30 -0400 Subject: [PATCH 0309/1744] Update auto-tune.py fix format --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 1cb62950..0e909a24 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -83,7 +83,7 @@ if __name__ == "__main__": offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) freq_max = center_frequency + offset - print(f" {:.0f} {.2f}".format(freq_max, max_value) + print(f" {freq_max:.0f} {max_value:.2f}") #print(f"The minimum signal is {min_value} at frequency {freq_min}") #print(min_value) From 3d8b5a05672ef3985a23e7aff7522c091573fe17 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 14:42:50 -0400 Subject: [PATCH 0310/1744] Update sstv_decode_prompt.sh add autotune --- groundstation/sstv_decode_prompt.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index dab0f18a..86011979 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -121,8 +121,25 @@ setsid qsstv & sleep 5 -#sudo systemctl restart cubesatsim +python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt + +threshold="0.1" +confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) +echo "Auto tune confidence: " +echo $confidence +if [ "$confidence" .lt "$threshold" ]; then + + sleep 10 + python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt + +fi +frequency=$(awk '{print $1}' auto-tune.txt) + +echo "Auto tune frequency: " +echo $frequency + +#sudo systemctl restart cubesatsim value=`aplay -l | grep "Loopback"` echo "$value" > /dev/null From 06bc2b3db585bb6a2d563450cd95823d41a7d088 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 15:57:11 -0400 Subject: [PATCH 0311/1744] Update sstv_decode_prompt.sh fix -lt --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 86011979..b9f8d3d3 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -127,7 +127,7 @@ threshold="0.1" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence: " echo $confidence -if [ "$confidence" .lt "$threshold" ]; then +if [ "$confidence" -lt "$threshold" ]; then sleep 10 From 844a077daa12430a35bfdb107341784497c2bdb9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 15:59:23 -0400 Subject: [PATCH 0312/1744] Update auto-tune.py change max value to integer --- groundstation/auto-tune.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 0e909a24..b3a45c8c 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -72,7 +72,7 @@ if __name__ == "__main__": x = amplitude_spectrum # print(x) min_value = min(x) - max_value = max(x) + max_value = max(x) * 10 #freq_min = np.argmax(min_value) # print(np.argmax(x)) @@ -83,7 +83,7 @@ if __name__ == "__main__": offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) freq_max = center_frequency + offset - print(f" {freq_max:.0f} {max_value:.2f}") + print(f" {freq_max:.0f} {max_value:.0f}") #print(f"The minimum signal is {min_value} at frequency {freq_min}") #print(min_value) From 082d8de58911cefc51b351a9580b9a4bae29bdc6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 15:59:59 -0400 Subject: [PATCH 0313/1744] Update sstv_decode_prompt.sh integer threshold --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index b9f8d3d3..f79fa7e8 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -123,7 +123,7 @@ sleep 5 python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt -threshold="0.1" +threshold="1" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence: " echo $confidence From 732d887dcbdedd44589a558eb76d0951b72ffee1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 16:11:21 -0400 Subject: [PATCH 0314/1744] Update auto-tune.py change gain to 29 --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index b3a45c8c..a83d4cd3 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -26,7 +26,7 @@ if __name__ == "__main__": sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 #center_frequency = 434.8e6 sdr.center_freq = center_frequency - sdr.gain = 4 + sdr.gain = 29 sdr.direct_sampling = False # signal = sdr.read_samples(64*1024) #256 From 8a1382f3defc523e34c22d0780fdacb1ab990938 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 16:14:25 -0400 Subject: [PATCH 0315/1744] Update auto-tune.py add 4k offset --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index a83d4cd3..7c508163 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -81,7 +81,7 @@ if __name__ == "__main__": # print(center_frequency) offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) - freq_max = center_frequency + offset + freq_max = center_frequency + offset + 4000 print(f" {freq_max:.0f} {max_value:.0f}") #print(f"The minimum signal is {min_value} at frequency {freq_min}") From cd91412ee110d68026fc89251e391a5663d198be Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 22:47:40 -0400 Subject: [PATCH 0316/1744] Update auto-tune.py scale by 100 --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 7c508163..5efc2123 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -72,7 +72,7 @@ if __name__ == "__main__": x = amplitude_spectrum # print(x) min_value = min(x) - max_value = max(x) * 10 + max_value = max(x) * 100 #freq_min = np.argmax(min_value) # print(np.argmax(x)) From 7b3b54f4d8bd5f20ee7f7e533946c45ef88f7133 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 22:54:47 -0400 Subject: [PATCH 0317/1744] Update sstv_decode_prompt.sh cat auto-tune.txt --- groundstation/sstv_decode_prompt.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index f79fa7e8..0faedca8 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -122,18 +122,23 @@ setsid qsstv & sleep 5 python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt - -threshold="1" +echo "auto-tune.txt" +cat /home/pi/CubeSatSim/groundstation/auto-tune.txt +threshold="3" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence: " echo $confidence -if [ "$confidence" -lt "$threshold" ]; then +if [ "$confidence" -lt "$threshold" ]; then sleep 10 - 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: " + echo $confidence fi + frequency=$(awk '{print $1}' auto-tune.txt) echo "Auto tune frequency: " From 910d02b597038604ea822a0e7cf561485c767200 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 22:56:42 -0400 Subject: [PATCH 0318/1744] Update sstv_decode_prompt.sh add venv --- groundstation/sstv_decode_prompt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 0faedca8..44188ea5 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -121,6 +121,7 @@ setsid qsstv & sleep 5 +source /home/pi/venv/bin/activate 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 From 920a76cf42c78849422cc0803397fd0fce08f973 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 22:57:49 -0400 Subject: [PATCH 0319/1744] Update sstv_decode_prompt.sh fix frequency set --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 44188ea5..0e546d89 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -140,7 +140,7 @@ if [ "$confidence" -lt "$threshold" ]; then echo $confidence fi -frequency=$(awk '{print $1}' auto-tune.txt) +frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune frequency: " echo $frequency From 327e00082014fc1bfbef0118f0b058fc8ae02e33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 23:03:58 -0400 Subject: [PATCH 0320/1744] Update auto-tune.py change to 2000 --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 5efc2123..86884b0d 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -81,7 +81,7 @@ if __name__ == "__main__": # print(center_frequency) offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) - freq_max = center_frequency + offset + 4000 + freq_max = center_frequency + offset + 2000 print(f" {freq_max:.0f} {max_value:.0f}") #print(f"The minimum signal is {min_value} at frequency {freq_min}") From e3decd109820ee39fe794925e9ca0a8a78890a80 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 23:23:54 -0400 Subject: [PATCH 0321/1744] Update sstv_decode_prompt.sh check 3 times, only change if high confidence --- groundstation/sstv_decode_prompt.sh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 0e546d89..d6a2483d 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -123,8 +123,8 @@ sleep 5 source /home/pi/venv/bin/activate 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 +# echo "auto-tune.txt" +# cat /home/pi/CubeSatSim/groundstation/auto-tune.txt threshold="3" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence: " @@ -133,14 +133,26 @@ echo $confidence if [ "$confidence" -lt "$threshold" ]; then sleep 10 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 +# 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: " echo $confidence + + if [ "$confidence" -lt "$threshold" ]; then + sleep 10 + 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: " + echo $confidence + fi fi -frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) +if [ "$confidence" -gt "$threshold" ]; then + frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) +fi echo "Auto tune frequency: " echo $frequency From 5d0d29aa86f0bb203c8442fe653d5d6863ae599f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 23:34:21 -0400 Subject: [PATCH 0322/1744] Update auto-tune.py switch to 1e6 --- groundstation/auto-tune.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 86884b0d..ead2ddbb 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -16,7 +16,7 @@ if __name__ == "__main__": if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): graph = 'y' - sampling_rate = 1024e3 # 250e3 # Hz + sampling_rate = 1e6 #1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) @@ -80,7 +80,8 @@ if __name__ == "__main__": # print(sampling_rate) # print(center_frequency) - offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) +# offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) + offset = np.argmax(x) - 2000 freq_max = center_frequency + offset + 2000 print(f" {freq_max:.0f} {max_value:.0f}") From 5a08dc8372447bdac129f221af8a9f74612186d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 23:38:03 -0400 Subject: [PATCH 0323/1744] Update auto-tune.py revert --- groundstation/auto-tune.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index ead2ddbb..86884b0d 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -16,7 +16,7 @@ if __name__ == "__main__": if (sys.argv[2] == 'g') or (sys.argv[2] == '-g'): graph = 'y' - sampling_rate = 1e6 #1024e3 # 250e3 # Hz + sampling_rate = 1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) @@ -80,8 +80,7 @@ if __name__ == "__main__": # print(sampling_rate) # print(center_frequency) -# offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) - offset = np.argmax(x) - 2000 + offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) freq_max = center_frequency + offset + 2000 print(f" {freq_max:.0f} {max_value:.0f}") From 21f36f6ccf0497874cefe81bc47d8e267806d2c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 23:52:40 -0400 Subject: [PATCH 0324/1744] Update auto-tune.py gain to 47 --- groundstation/auto-tune.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index 86884b0d..d49ab3f6 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -26,7 +26,7 @@ if __name__ == "__main__": sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 #center_frequency = 434.8e6 sdr.center_freq = center_frequency - sdr.gain = 29 + sdr.gain = 47 sdr.direct_sampling = False # signal = sdr.read_samples(64*1024) #256 From bd901a424e38b2f61486ac2781150b4ce67fe559 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 27 Oct 2025 23:56:12 -0400 Subject: [PATCH 0325/1744] Update sstv_decode_prompt.sh confidence threshold 1 --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index d6a2483d..61e9b30f 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -125,7 +125,7 @@ source /home/pi/venv/bin/activate 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 -threshold="3" +threshold="1" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence: " echo $confidence From be27ae69e881d841db831f4a0089290b1242fed3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 08:39:30 -0400 Subject: [PATCH 0326/1744] Update sstv_decode_prompt.sh change to less than or equal --- groundstation/sstv_decode_prompt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 61e9b30f..40f9d9f6 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -130,7 +130,7 @@ confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence: " echo $confidence -if [ "$confidence" -lt "$threshold" ]; then +if [ "$confidence" -le "$threshold" ]; then sleep 10 python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt # echo "auto-tune.txt" @@ -139,7 +139,7 @@ if [ "$confidence" -lt "$threshold" ]; then echo "Auto tune confidence: " echo $confidence - if [ "$confidence" -lt "$threshold" ]; then + if [ "$confidence" -le "$threshold" ]; then sleep 10 python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt # echo "auto-tune.txt" From 6ebfc9c46213b2d0b48db8f00b4dbacfe2b2de85 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 08:45:38 -0400 Subject: [PATCH 0327/1744] Update sstv_decode_prompt.sh only print autotune when above threshold --- groundstation/sstv_decode_prompt.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 40f9d9f6..48d00ffb 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -127,7 +127,7 @@ python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /ho # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt threshold="1" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) -echo "Auto tune confidence: " +echo -n "Auto tune confidence: " echo $confidence if [ "$confidence" -le "$threshold" ]; then @@ -136,7 +136,7 @@ if [ "$confidence" -le "$threshold" ]; then # 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: " + echo -n "Auto tune confidence: " echo $confidence if [ "$confidence" -le "$threshold" ]; then @@ -145,18 +145,17 @@ if [ "$confidence" -le "$threshold" ]; then # 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: " + echo -n "Auto tune confidence: " echo $confidence fi fi if [ "$confidence" -gt "$threshold" ]; then frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) + echo -n "Auto tune frequency: " + echo $frequency fi -echo "Auto tune frequency: " -echo $frequency - #sudo systemctl restart cubesatsim value=`aplay -l | grep "Loopback"` From 992648f19b13bd0eaf69532d25d4b1260968cd08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 08:48:22 -0400 Subject: [PATCH 0328/1744] Update sstv_decode_prompt.sh auto-tune failed message --- groundstation/sstv_decode_prompt.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 48d00ffb..ccd08538 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -154,7 +154,10 @@ if [ "$confidence" -gt "$threshold" ]; then frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo -n "Auto tune frequency: " echo $frequency +else + echo "Auto tune failed, frequency unchanged" fi +echo #sudo systemctl restart cubesatsim From dcab91164ad3c33a594db24c8c18e4e5a56e7af6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:01:10 -0400 Subject: [PATCH 0329/1744] Update sstv_decode_prompt.sh add auto-tune prompt option --- groundstation/sstv_decode_prompt.sh | 59 +++++++++++++++++------------ 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index ccd08538..4b638346 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -34,7 +34,9 @@ sudo killall -9 rtl_fm &>/dev/null #echo "s" >> .mode -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=220 --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 @@ -70,6 +72,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 @@ -121,24 +128,17 @@ setsid qsstv & sleep 5 -source /home/pi/venv/bin/activate -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 -threshold="1" -confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) -echo -n "Auto tune confidence: " -echo $confidence - -if [ "$confidence" -le "$threshold" ]; then - sleep 10 +if [ "$autotune" = "1" ]; then + + source /home/pi/venv/bin/activate 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 + # echo "auto-tune.txt" + # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt + threshold="1" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) - echo -n "Auto tune confidence: " + echo -n "Auto tune confidence: " echo $confidence - + if [ "$confidence" -le "$threshold" ]; then sleep 10 python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt @@ -147,17 +147,28 @@ if [ "$confidence" -le "$threshold" ]; then confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo -n "Auto tune confidence: " echo $confidence + + if [ "$confidence" -le "$threshold" ]; then + sleep 10 + 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 -n "Auto tune confidence: " + echo $confidence + fi fi -fi + + if [ "$confidence" -gt "$threshold" ]; then + frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) + echo -n "Auto tune frequency: " + echo $frequency + else + echo "Auto tune failed, frequency unchanged" + fi + echo -if [ "$confidence" -gt "$threshold" ]; then - frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) - echo -n "Auto tune frequency: " - echo $frequency -else - echo "Auto tune failed, frequency unchanged" fi -echo #sudo systemctl restart cubesatsim From 73bfd12ab64eb31d37a4a10558c770fb10f3c36a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:05:10 -0400 Subject: [PATCH 0330/1744] Update sstv_decode_prompt.sh retry in 5 sec --- groundstation/sstv_decode_prompt.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 4b638346..69e49b2a 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -122,25 +122,26 @@ 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" + retry="5" + source /home/pi/venv/bin/activate 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 - threshold="1" confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo -n "Auto tune confidence: " echo $confidence if [ "$confidence" -le "$threshold" ]; then - sleep 10 + 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 @@ -149,7 +150,7 @@ if [ "$autotune" = "1" ]; then echo $confidence if [ "$confidence" -le "$threshold" ]; then - sleep 10 + 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 From 128f7410afc0774fdc2be89a957d9358ce77c12a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:06:50 -0400 Subject: [PATCH 0331/1744] Update sstv_decode_prompt.sh prompt window larger --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 69e49b2a..34021670 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -36,7 +36,7 @@ sudo killall -9 rtl_fm &>/dev/null autotune=0 -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" Auto-tune "CubeSatSim Auto-tune" Other "Choose another frequency" SSTV "Test SSTV decoding with WAV file") +frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=420 --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 From 842c4623bac608d5d99582f3f50c8ec7ebd33860 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:11:56 -0400 Subject: [PATCH 0332/1744] Update sstv_decode_prompt.sh change prints --- groundstation/sstv_decode_prompt.sh | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 34021670..a61b2851 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -137,8 +137,7 @@ if [ "$autotune" = "1" ]; then # echo "auto-tune.txt" # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) - echo -n "Auto tune confidence: " - echo $confidence + echo "Auto tune confidence: " $confidence if [ "$confidence" -le "$threshold" ]; then sleep $retry @@ -146,8 +145,7 @@ if [ "$autotune" = "1" ]; then # echo "auto-tune.txt" # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) - echo -n "Auto tune confidence: " - echo $confidence + echo "Auto tune confidence: " $confidence if [ "$confidence" -le "$threshold" ]; then sleep $retry @@ -155,19 +153,19 @@ if [ "$autotune" = "1" ]; then # echo "auto-tune.txt" # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) - echo -n "Auto tune confidence: " - echo $confidence + echo "Auto tune confidence: " $confidence fi fi if [ "$confidence" -gt "$threshold" ]; then frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) - echo -n "Auto tune frequency: " - echo $frequency + echo "Auto tune frequency: " $frequency else echo "Auto tune failed, frequency unchanged" fi echo + echo "If your CubeSatSim is transmitting in SSTV mode (mode 4) you should get images." + echo fi From c4310cee67525d892943a12b06a3e35943e97ad0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:13:29 -0400 Subject: [PATCH 0333/1744] Update sstv_decode_prompt.sh prompt window size --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index a61b2851..25bcbe14 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -36,7 +36,7 @@ sudo killall -9 rtl_fm &>/dev/null autotune=0 -frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=420 --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") +frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=260 --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 From 9f8d7e1e1e479afb67390c79805ed9bf8b109244 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:14:22 -0400 Subject: [PATCH 0334/1744] Update sstv_decode_prompt.sh prompt window size --- groundstation/sstv_decode_prompt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 25bcbe14..22387e69 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -36,7 +36,7 @@ sudo killall -9 rtl_fm &>/dev/null autotune=0 -frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=260 --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") +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 From b9e3fdf2f481e1a28654b3ad973715d86a1f8ba9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:23:40 -0400 Subject: [PATCH 0335/1744] Update sstv_decode_prompt.sh autotune while loop --- groundstation/sstv_decode_prompt.sh | 36 +++++++++++------------------ 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 22387e69..dc350a87 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -129,33 +129,23 @@ setsid qsstv & #sleep 5 if [ "$autotune" = "1" ]; then - threshold="1" - retry="5" + threshold=1 + delay=5 + retries=5 - source /home/pi/venv/bin/activate - 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 - - if [ "$confidence" -le "$threshold" ]; then - sleep $retry + tries=0 + confidence=0 + while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do + + sleep $delay + source /home/pi/venv/bin/activate 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 + # 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 - - 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 - # 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 + + done if [ "$confidence" -gt "$threshold" ]; then frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) From cdc8c2f607df5702aee314aaa63e6f4b0b398818 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:36:02 -0400 Subject: [PATCH 0336/1744] Update packet.sh add auto-tune --- groundstation/packet.sh | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 803e988a..9a6f52f3 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -37,7 +37,9 @@ sudo /etc/init.d/alsa-utils start echo -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=4000 --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") #echo $frequency @@ -75,6 +77,10 @@ elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." echo +elif [ "$frequency" = "Auto-tune" ] ; then + + frequency=434900000 + elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then frequency=144800000 @@ -155,7 +161,38 @@ echo #fi -sleep 5 +#sleep 5 + +if [ "$autotune" = "1" ]; then + threshold=1 + delay=1 + retries=30 + + tries=0 + confidence=0 + while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do + + sleep $delay + source /home/pi/venv/bin/activate + 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 + + done + + if [ "$confidence" -gt "$threshold" ]; then + frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) + echo "Auto tune frequency: " $frequency + else + echo "Auto tune failed, frequency unchanged" + fi + echo + echo "If your CubeSatSim is transmitting in APRS mode (mode 1) then you should see packets." + echo + +fi value=`aplay -l | grep "Loopback"` echo "$value" > /dev/null From 14de4150895ddee432de3dfdf629229a08ece6aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:39:36 -0400 Subject: [PATCH 0337/1744] Update packet.sh turn on autotune --- groundstation/packet.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 9a6f52f3..a541bbae 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -39,7 +39,7 @@ echo autotune=0 -frequency=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=4000 --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=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") #echo $frequency @@ -80,6 +80,7 @@ elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then elif [ "$frequency" = "Auto-tune" ] ; then frequency=434900000 + autotune=1 elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then From a8f1a4095f6c5c8176ddbd4bfae1bbc6eed17660 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:42:10 -0400 Subject: [PATCH 0338/1744] Update packet.sh remove delay --- groundstation/packet.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index a541bbae..ed28f12c 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -173,7 +173,7 @@ if [ "$autotune" = "1" ]; then confidence=0 while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do - sleep $delay +# sleep $delay source /home/pi/venv/bin/activate python3 /home/pi/CubeSatSim/groundstation/auto-tune.py 434900000 n 2> null > /home/pi/CubeSatSim/groundstation/auto-tune.txt # echo "auto-tune.txt" From 27cbf1a822e79457fc7efb2e8cb202915c4f8796 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 09:47:53 -0400 Subject: [PATCH 0339/1744] Update packet.sh add auto-tune text --- groundstation/packet.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index ed28f12c..7c4ee945 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -168,7 +168,9 @@ if [ "$autotune" = "1" ]; then threshold=1 delay=1 retries=30 - + + echo "Starting Auto-tune scanning" + echo "Scan will stop when confidence exceeds threshold value of " $threshold " or after " $retries " retries" tries=0 confidence=0 while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do From 3293b75c6af4d43d915d8326cb7972217466a71d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 10:20:10 -0400 Subject: [PATCH 0340/1744] Update sstv_decode_prompt.sh add starting auto tune message --- groundstation/sstv_decode_prompt.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index dc350a87..19588782 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -132,7 +132,9 @@ 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 while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do From 249887715b94a12c87a01ccde35e64af413b9a9c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 10:22:06 -0400 Subject: [PATCH 0341/1744] Update sstv_decode_prompt.sh fix echos --- groundstation/sstv_decode_prompt.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 19588782..4ed695a4 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -134,7 +134,7 @@ if [ "$autotune" = "1" ]; then retries=5 echo "Starting Auto-tune scanning" - echo "Scan will stop when confidence exceeds threshold value of " $threshold " or after " $retries " retries" + echo "Scan will stop when confidence exceeds threshold value of" $threshold "or after" $retries "retries" tries=0 confidence=0 while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do @@ -145,13 +145,13 @@ if [ "$autotune" = "1" ]; then # 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 + echo "Auto tune confidence:" $confidence done if [ "$confidence" -gt "$threshold" ]; then frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) - echo "Auto tune frequency: " $frequency + echo "Auto tune frequency:" $frequency else echo "Auto tune failed, frequency unchanged" fi From ec1c707164688ab719863687c5618fef35b372a7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 10:24:35 -0400 Subject: [PATCH 0342/1744] Update sstv_decode_prompt.sh subtract 2 second delay --- groundstation/sstv_decode_prompt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 4ed695a4..e7710011 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -137,6 +137,7 @@ if [ "$autotune" = "1" ]; then 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 while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do sleep $delay From bbe606672d2d6891d9a032e96a22fcbe6d16b902 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 10:27:10 -0400 Subject: [PATCH 0343/1744] Update sstv_decode_prompt.sh increment tries --- groundstation/sstv_decode_prompt.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index e7710011..ea3c396d 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -147,6 +147,7 @@ if [ "$autotune" = "1" ]; then # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence:" $confidence + tries=$((tries+1)) done From 8a3a1a07f227cc4f8dff25327f9e5a0ba319525a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Oct 2025 10:31:20 -0400 Subject: [PATCH 0344/1744] Update packet.sh add tries increment --- groundstation/packet.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 7c4ee945..3835a581 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -182,6 +182,7 @@ if [ "$autotune" = "1" ]; then # cat /home/pi/CubeSatSim/groundstation/auto-tune.txt confidence=$(awk '{print $2}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) echo "Auto tune confidence: " $confidence + tries=$((tries+1)) done From 07fc9aeb7f667ba17206878716776e1d5d463a60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Oct 2025 14:14:23 -0400 Subject: [PATCH 0345/1744] Update fctelem.sh add auto-tune --- groundstation/fctelem.sh | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/groundstation/fctelem.sh b/groundstation/fctelem.sh index 4beb88a3..c2682806 100755 --- a/groundstation/fctelem.sh +++ b/groundstation/fctelem.sh @@ -80,8 +80,9 @@ else echo fi +autotune=0 -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 +97,11 @@ if [ "$frequency" = "434900" ]; then frequency=434900000 +elif [ "$frequency" = "Auto-tune" ]; then + + frequency=434900000 + autotune=1 + elif [ "$frequency" = "Other" ]; then echo @@ -110,6 +116,38 @@ elif [ "$frequency" = "Other" ]; then fi +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 + while [ $tries -le $retries ] && [ "$confidence" -le "$threshold" ]; do + + sleep $delay + source /home/pi/venv/bin/activate + 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 + tries=$((tries+1)) + + done + + if [ "$confidence" -gt "$threshold" ]; then + frequency=$(awk '{print $1}' /home/pi/CubeSatSim/groundstation/auto-tune.txt) + echo "Auto tune frequency:" $frequency + else + echo "Auto tune failed, frequency unchanged" + fi + +fi + echo "Frequency is" $frequency echo echo "If your CubeSatSim is transmitting in FUNcube mode (mode 7) you should get some frames after 30 seconds" From 8efbdcb94171bf46a4bc82446e396f87b8119c77 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Oct 2025 14:17:59 -0400 Subject: [PATCH 0346/1744] Update fctelem.sh 10 sec delay --- groundstation/fctelem.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/fctelem.sh b/groundstation/fctelem.sh index c2682806..c87fa46b 100755 --- a/groundstation/fctelem.sh +++ b/groundstation/fctelem.sh @@ -148,6 +148,8 @@ if [ "$autotune" = "1" ]; then fi +sleep 10 + echo "Frequency is" $frequency echo echo "If your CubeSatSim is transmitting in FUNcube mode (mode 7) you should get some frames after 30 seconds" From 52c0a2a930c1fc8e51bdfb4d98807f2599e0160e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Oct 2025 14:48:56 -0400 Subject: [PATCH 0347/1744] Update fctelem.sh 5 second delay --- groundstation/fctelem.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/fctelem.sh b/groundstation/fctelem.sh index c87fa46b..0b4c92a3 100755 --- a/groundstation/fctelem.sh +++ b/groundstation/fctelem.sh @@ -146,10 +146,9 @@ if [ "$autotune" = "1" ]; then echo "Auto tune failed, frequency unchanged" fi +sleep 5 fi -sleep 10 - echo "Frequency is" $frequency echo echo "If your CubeSatSim is transmitting in FUNcube mode (mode 7) you should get some frames after 30 seconds" From 4aaa8daabed36194f0c01f8f4ef8431346eb8f7a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Oct 2025 15:22:51 -0400 Subject: [PATCH 0348/1744] Update auto-tune.py catch rtl failure --- groundstation/auto-tune.py | 138 +++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 68 deletions(-) diff --git a/groundstation/auto-tune.py b/groundstation/auto-tune.py index d49ab3f6..b7808902 100644 --- a/groundstation/auto-tune.py +++ b/groundstation/auto-tune.py @@ -18,74 +18,76 @@ if __name__ == "__main__": sampling_rate = 1024e3 # 250e3 # Hz duration = 65536/sampling_rate # 1 # seconds - t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) - - sdr = RtlSdr() - - # configure device - sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 - #center_frequency = 434.8e6 - sdr.center_freq = center_frequency - sdr.gain = 47 - sdr.direct_sampling = False - - # signal = sdr.read_samples(64*1024) #256 - signal = sdr.read_samples(duration*sampling_rate).real #256 - -# print(f"Center frequency is {center_frequency}") - - sdr.close() - - # Compute the FFT - fft_result = np.fft.fft(signal) - - # Calculate the frequencies corresponding to the FFT output - n = len(signal) - frequencies = np.fft.fftfreq(n, d=1/sampling_rate) - - # Take the absolute value for amplitude spectrum and consider only the positive frequencies - positive_frequencies_indices = np.where(frequencies >= 0) - positive_frequencies = frequencies[positive_frequencies_indices] - amplitude_spectrum = 2/n * np.abs(fft_result[positive_frequencies_indices]) # Normalize for amplitude - - if (graph == 'y'): - # Plotting the results - plt.figure(figsize=(12, 6)) - - plt.subplot(1, 2, 1) - plt.plot(t, signal) - plt.title('Time Domain Signal') - plt.xlabel('Time (s)') - plt.ylabel('Amplitude') - - plt.subplot(1, 2, 2) - plt.stem(positive_frequencies, amplitude_spectrum, markerfmt=" ", basefmt="-b") - plt.title('Frequency Domain (FFT)') - plt.xlabel('Frequency (Hz)') - plt.ylabel('Amplitude') - plt.grid(True) - - plt.tight_layout() - plt.show() - - # print(amplitude_spectrum) - x = amplitude_spectrum - # print(x) - min_value = min(x) - max_value = max(x) * 100 - - #freq_min = np.argmax(min_value) - # print(np.argmax(x)) - # print(np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) - # print(sampling_rate) - # print(center_frequency) - - offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) - freq_max = center_frequency + offset + 2000 + try: + sdr = RtlSdr() + + # configure device + sdr.sample_rate = sampling_rate # 250e3 # 2.4e6 + #center_frequency = 434.8e6 + sdr.center_freq = center_frequency + sdr.gain = 47 + sdr.direct_sampling = False + + # signal = sdr.read_samples(64*1024) #256 + signal = sdr.read_samples(duration*sampling_rate).real #256 + + # print(f"Center frequency is {center_frequency}") + + sdr.close() + + # Compute the FFT + fft_result = np.fft.fft(signal) + + # Calculate the frequencies corresponding to the FFT output + n = len(signal) + frequencies = np.fft.fftfreq(n, d=1/sampling_rate) + + # Take the absolute value for amplitude spectrum and consider only the positive frequencies + positive_frequencies_indices = np.where(frequencies >= 0) + positive_frequencies = frequencies[positive_frequencies_indices] + amplitude_spectrum = 2/n * np.abs(fft_result[positive_frequencies_indices]) # Normalize for amplitude + + if (graph == 'y'): + # Plotting the results + t = np.linspace(0, duration, int(sampling_rate * duration), endpoint=False) + + plt.figure(figsize=(12, 6)) + + plt.subplot(1, 2, 1) + plt.plot(t, signal) + plt.title('Time Domain Signal') + plt.xlabel('Time (s)') + plt.ylabel('Amplitude') + + plt.subplot(1, 2, 2) + plt.stem(positive_frequencies, amplitude_spectrum, markerfmt=" ", basefmt="-b") + plt.title('Frequency Domain (FFT)') + plt.xlabel('Frequency (Hz)') + plt.ylabel('Amplitude') + plt.grid(True) + + plt.tight_layout() + plt.show() + + # print(amplitude_spectrum) + x = amplitude_spectrum + # print(x) + min_value = min(x) + max_value = max(x) * 100 + + #freq_min = np.argmax(min_value) + # print(np.argmax(x)) + # print(np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) + # print(sampling_rate) + # print(center_frequency) + + offset = (np.argmax(x)*(150e3 - 10e3)/(9770 - 709)) + freq_max = center_frequency + offset + 2000 + except: # if no RTL-SDR or in use, stop scanning with high max value and center frequency + max_value = 100 + freq_max = center_frequency + 200e3 # should be 434900000 + print(f" {freq_max:.0f} {max_value:.0f}") - #print(f"The minimum signal is {min_value} at frequency {freq_min}") - - #print(min_value) - #print(max_value) + From 1e9fb2e6d612ac571de97a3cd1c405528265dd22 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 10:50:43 -0400 Subject: [PATCH 0349/1744] update to use USB device --- .../direwolf/direwolf-fm-pacsat-jp14-device.conf | 10 ++++++++++ pacsatsim-djf.sh | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf create mode 100755 pacsatsim-djf.sh diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf new file mode 100644 index 00000000..df741a62 --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf @@ -0,0 +1,10 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh new file mode 100755 index 00000000..1d0c3036 --- /dev/null +++ b/pacsatsim-djf.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 From 065e8be4d8bab44a808d092075f654382872bbf7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 10:59:49 -0400 Subject: [PATCH 0350/1744] from pacsatsim half duplex --- direwolf/direwolf-pacsatsim-jp14-half.conf | 9 +++++++++ .../direwolf/direwolf-fm-pacsat-jp14-ptt.conf | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim-jp14-half.conf create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-half.conf b/direwolf/direwolf-pacsatsim-jp14-half.conf new file mode 100644 index 00000000..d6a05876 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-jp14-half.conf @@ -0,0 +1,9 @@ +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#PTT GPIO 20 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +#FULLDUP ON +FULLDUP OFF +TXDELAY 15 +#FIX_BITS 1 AX25 diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf new file mode 100644 index 00000000..279b7e0e --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf @@ -0,0 +1,10 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 From 227c88a893cd7635070f06e6dc9a678d8142c508 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 11:10:36 -0400 Subject: [PATCH 0351/1744] Update pacsatsim-djf.sh change to half duplex --- pacsatsim-djf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh index 1d0c3036..fdd358bb 100755 --- a/pacsatsim-djf.sh +++ b/pacsatsim-djf.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-half.conf -t 0 From b3df13961419b2be641a841d5b55a138ae91ae69 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 11:12:08 -0400 Subject: [PATCH 0352/1744] Update pacsatsim-djf.sh revert --- pacsatsim-djf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh index fdd358bb..1d0c3036 100755 --- a/pacsatsim-djf.sh +++ b/pacsatsim-djf.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-half.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 From dd3346792d9758436856e37472190002d13e3e8c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 11:12:39 -0400 Subject: [PATCH 0353/1744] Update pacsatsim-dj.sh changed pacsatsim to half duplex --- pacsatsim-dj.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-dj.sh b/pacsatsim-dj.sh index 3999eb8d..888124e6 100755 --- a/pacsatsim-dj.sh +++ b/pacsatsim-dj.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 From 4210c9ad4ab9de6a35fd4065b09f3d474518a387 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:37:15 -0400 Subject: [PATCH 0354/1744] Create direwolf-pacsatsim-jp14-loop.conf --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 direwolf/direwolf-pacsatsim-jp14-loop.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf new file mode 100644 index 00000000..6b1b9b34 --- /dev/null +++ b/direwolf/direwolf-pacsatsim-jp14-loop.conf @@ -0,0 +1,8 @@ +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 +#PTT GPIO 20 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +FULLDUP ON +TXDELAY 15 +#FIX_BITS 1 AX25 From 0089231f42c352e272b27298ea8bb46076234ef4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:40:06 -0400 Subject: [PATCH 0355/1744] Update pacsatsim-d.sh fm and loopback --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index 7480af0c..33ea4ad5 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loopback.conf -t 0 From 03fe5a278fe2e1fcf749dffe4d1a105f62b46050 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:42:15 -0400 Subject: [PATCH 0356/1744] Update pacsatsim-d.sh change to loop --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index 33ea4ad5..bc3bd322 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loopback.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loop.conf -t 0 From c52a6f3e0ca968513aabd1efcca3de4ba0fdeb44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:44:03 -0400 Subject: [PATCH 0357/1744] Update pacsatsim-d.sh fix filename --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index bc3bd322..f7c3e84e 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-j14-loop.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-loop.conf -t 0 From 4fcb86904f2d19e881b677b3c0f7d8cf465dd0cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:56:46 -0400 Subject: [PATCH 0358/1744] Create direwolf-fm-pacsat-jp14-loop.conf --- .../direwolf/direwolf-fm-pacsat-jp14-loop.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf new file mode 100644 index 00000000..cac3fffe --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf @@ -0,0 +1,10 @@ +MYCALL AMSAT +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 +#PTT GPIO 20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +FULLDUP OFF +TXDELAY 30 +#FIX_BITS 1 AX25 From 1265d27020cc437a4f7669cd4a6c16174ddd0eb7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Oct 2025 16:59:17 -0400 Subject: [PATCH 0359/1744] Update pacsat-d.sh update with j14-loop --- groundstation/pacsat-d.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh index 8c58dd73..e1569ce7 100755 --- a/groundstation/pacsat-d.sh +++ b/groundstation/pacsat-d.sh @@ -1,6 +1,6 @@ #!/bin/bash -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - +sudo modprobe snd-aloop +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf -t 0 From 489e2eab1ec9eba8461de369034c443b6219f1a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Nov 2025 22:53:28 -0400 Subject: [PATCH 0360/1744] Update pacsat.sh added rpitx transmit and direwolf --- groundstation/pacsat.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 4daff914..38799d49 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -67,18 +67,26 @@ echo #echo echo -echo "The Pacsat and Pacsat Ground Station are running on this Pi using audio loopback" +echo "The Pacsat Ground Station are running on this Pi using FM receiver and rpitx transmitter" echo -cd /home/pi/Desktop/PacSatGround_0.46m_linux/ +#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & +#setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-d.sh" + +arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & + +echo "Don't close the direwolf window or the Pacsatsim will stop running." + +cd /home/pi/Desktop/PacSatGround_0.46m_linux/ + +setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & -#echo "Don't close the direwolf-pacsat-loopback window or the Pacsatsim will stop running." #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ From 53a05e66e9fcaf15477c304c6a1ac87204501193 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Nov 2025 23:01:01 -0400 Subject: [PATCH 0361/1744] Update pacsatsim.sh add pacsatsim-d.sh and rpitx --- pacsatsim.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index a1998cb0..d0bf0fc8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -186,6 +186,13 @@ else # echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" + + arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & + + echo "Don't close the direwolf window or the Pacsatsim will stop running." + echo fi From 94041dac3e149b4cd59e5163d81582ee9d107931 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Nov 2025 08:46:23 -0500 Subject: [PATCH 0362/1744] fix pacsatsim direwolf configs --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 2 +- direwolf/direwolf-pacsatsim-jp14.conf | 2 +- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf index 6b1b9b34..b2a5fb9e 100644 --- a/direwolf/direwolf-pacsatsim-jp14-loop.conf +++ b/direwolf/direwolf-pacsatsim-jp14-loop.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO 20 +PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 36891485..da583428 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 +PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index d1bcf78d..e96bd980 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,5 +1,5 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 -#PTT GPIO 20 +PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From dc697a83068547f0c02fe6b81b39787ca93e923a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Nov 2025 08:47:54 -0500 Subject: [PATCH 0363/1744] add fm scripts --- pacsatsim-df.sh | 5 ++ pacsatsim-f.sh | 211 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+) create mode 100755 pacsatsim-df.sh create mode 100755 pacsatsim-f.sh diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh new file mode 100755 index 00000000..3999eb8d --- /dev/null +++ b/pacsatsim-df.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 diff --git a/pacsatsim-f.sh b/pacsatsim-f.sh new file mode 100755 index 00000000..2a8bb965 --- /dev/null +++ b/pacsatsim-f.sh @@ -0,0 +1,211 @@ +#!/bin/bash + +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat + +export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + +#sudo systemctl stop cubesatsim + +#sudo systemctl stop transmit + +sudo systemctl stop command &>/dev/null + +sudo modprobe snd-aloop + +#sudo systemctl stop openwebrx + +#sudo systemctl stop rtl_tcp &>/dev/null + +#pkill -o chromium &>/dev/null + +#sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 direwolf &>/dev/null + +#udo killall -9 aplay &>/dev/null + +#sudo killall -9 qsstv &>/dev/null + +#sudo killall -9 rtl_tcp &>/dev/null + +#sudo killall -9 java &>/dev/null + +#sudo killall -9 CubicSDR &>/dev/null + +#sudo killall -9 zenity &>/dev/null + +echo + +#frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") + +#echo $frequency + +#if [ -z "$frequency" ]; then + +#echo "No choice made. Exiting." + +#sleep 3 + +#exit + +#echo "Choose the number for the packet decoding option:" +#echo +#echo "1. APRS US 2m (144390 kHz)" +#echo "2. CubeSatSim (434900 kHz)" +#echo "3. APRS European 2m (144800 kHz)" +#echo "4. APRS Australian 2m (145175 kHz)" +#echo "5. APRS on another frequency" +#echo "6. APRS on ISS (145825 kHz)" +#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" +#echo "8. Test Serenity CubeSat decoding with WAV file" +#echo "9. Test APRS decoding with CubeSatSim WAV file" +#echo + +#read -r choice + +choice=2 + +#fi + +if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then + + frequency=144390000 + +elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then + + frequency=434900000 + echo + echo "If your Pacsat Ground Station is transmitting packets, you will see them here" + echo + +elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then + + frequency=144800000 + +elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then + + frequency=145175000 + +elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then + + echo + + echo "Enter the frequency in kiloHertz" + + echo + + read -r frequency + + frequency=$frequency"000" + + #echo $frequency + +elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then + + frequency=145825000 + echo + echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then + + frequency=437100000 + echo + echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." + echo + +elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then + + echo "A recorded WAV file will play and you should see some packets decoded" + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + +# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & +# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & + aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then + + echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." + + echo + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & + (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & + + timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 + + echo + + echo "Test complete. This window will close in 10 seconds." + + sleep 5 + + exit + +#fi + +fi + +#echo + +#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." + +echo + +if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then + + echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & + +else + +# echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + +### arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & + + echo "Don't close the direwolf window or the Pacsatsim will stop running." + + echo +fi + +sleep 5 + +value=`aplay -l | grep "Loopback"` +echo "$value" > /dev/null +set -- $value + +#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & + +cd /home/pi/pi_pacsat/Debug + +./pi_pacsat -c pacsat.config -d /home/pi/PacSat + +sleep 5 From 3f2c43fb3e89eb646964bd24786a74ab2be37b32 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Nov 2025 13:18:23 -0500 Subject: [PATCH 0364/1744] Update transmit.py fixed pacsatsim and pacsat modes --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 7d47f19a..c9e1450d 100644 --- a/transmit.py +++ b/transmit.py @@ -426,10 +426,10 @@ if __name__ == "__main__": elif (mode == 'p'): print("Pacsat") # system('/home/pi/CubeSatSim/pacsatsim.sh') - system('sudo systemctl restart pacsatsim') +# system('sudo systemctl restart pacsatsim') while True: sleep(30) - elif (mode == 'p'): + elif (mode == 'P'): print("Pacsat Ground Station") while True: sleep(30) From 6129d0c237af02d98b3cd48076904b4de7b30373 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 14:57:03 -0500 Subject: [PATCH 0365/1744] gs edits to make working --- .../direwolf/direwolf-fm-pacsat-jp14.conf | 17 +++++++++++++---- groundstation/pacsat-df.sh | 10 ++++++++++ groundstation/pacsat.sh | 9 +++++---- 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100755 groundstation/pacsat-df.sh diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index df741a62..1b9d9a15 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,10 +1,19 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +PTT GPIO -20 CHANNEL 0 MODEM 1200 KISSPORT 8100 AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 +#FULLDUP OFF +#TXDELAY 30 #FIX_BITS 1 AX25 + +#DWAIT 0 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 150 +#TXTAIL 10 +FULLDUP OFF diff --git a/groundstation/pacsat-df.sh b/groundstation/pacsat-df.sh new file mode 100755 index 00000000..2c0af411 --- /dev/null +++ b/groundstation/pacsat-df.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +sudo modprobe snd-aloop + +#gpio -g mode 20 out + +#gpio -g write 20 1 + +direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 + diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 38799d49..4e65f2d5 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,9 +4,9 @@ sudo modprobe snd-aloop -sudo systemctl stop cubesatsim >/dev/null 2>&1 +#sudo systemctl stop cubesatsim >/dev/null 2>&1 -sudo systemctl stop transmit >/dev/null 2>&1 +#sudo systemctl stop transmit >/dev/null 2>&1 sudo systemctl stop command >/dev/null 2>&1 @@ -77,9 +77,10 @@ echo #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-d.sh" +/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" -arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & +# arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & +##arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & echo "Don't close the direwolf window or the Pacsatsim will stop running." From c43ca730b058f22009a3efb6c10754b936bc5864 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 15:01:00 -0500 Subject: [PATCH 0366/1744] changes to pi_pacsat to work over fm --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 11 +++++++++-- direwolf/direwolf-pacsatsim-jp14.conf | 17 ++++++++++++++--- pacsatsim.sh | 5 +++-- 3 files changed, 26 insertions(+), 7 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf index b2a5fb9e..bd04ddbc 100644 --- a/direwolf/direwolf-pacsatsim-jp14-loop.conf +++ b/direwolf/direwolf-pacsatsim-jp14-loop.conf @@ -1,8 +1,15 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -PTT GPIO -20 +#PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP ON +#FULLDUP ON TXDELAY 15 #FIX_BITS 1 AX25 +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +TXTAIL 10 +FULLDUP OFF diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index da583428..8b42f6c7 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,8 +1,19 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:2,0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP ON -TXDELAY 15 +##FULLDUP ON +##TXDELAY 15 #FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 100 +#TXTAIL 10 +TXTAIL 1 +FULLDUP OFF diff --git a/pacsatsim.sh b/pacsatsim.sh index d0bf0fc8..5a044360 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -187,9 +187,10 @@ else # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-d.sh" + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" - arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & +# arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & +## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & echo "Don't close the direwolf window or the Pacsatsim will stop running." From 303ed89d4a69ad1c75f7779341c9071cc2aa59fb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 16:30:00 -0500 Subject: [PATCH 0367/1744] Update update change iors to alanbjohnston --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index f15dcf4c..e2220d82 100755 --- a/update +++ b/update @@ -307,7 +307,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/ac2cz/iors_common.git + git clone https://github.com/alanbjohnston/iors_common.git cd iors_common/Debug/ From 6e4e41478d32e4f504dc9ad62ea65ac834719466 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 16:40:51 -0500 Subject: [PATCH 0368/1744] Update install change ions and add peripheral --- install | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/install b/install index 216dd74f..b2169009 100755 --- a/install +++ b/install @@ -126,7 +126,7 @@ cd rpitx cd -git clone https://github.com/ac2cz/iors_common.git +git clone https://github.com/alanbjohnston/iors_common.git cd iors_common/Debug/ @@ -250,10 +250,17 @@ sudo raspi-config nonint do_legacy 0 fi if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then - echo "dtoverlay=dwc2 aalready in /boot/config.txt" + + if [[ $(grep 'dtoverlay=dwc2,dr_mode=peripheral' /boot/config.txt) ]]; then + echo "dtoverlay=dwc2,dr_mode=peripheral aalready in /boot/config.txt" + else + sudo sed -i 's/dtoverlay=dwc2/dtoverlay=dwc2,dr_mode=peripheral/g' /boot/config.txt + echo " adding dr_mode=peripheral to /boot/config.txt" + fi + else - echo "adding dtoverlay=dwc2 to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + echo "adding dtoverlay=dwc2,dr_mode=peripheral to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2,dr_mode=peripheral" >> /boot/config.txt' fi if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then From 1b962d320f2d7b84f0f3c316ab424806fcc9f22c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 16:58:35 -0500 Subject: [PATCH 0369/1744] Update install change pacsat from m to n --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index b2169009..2a1396dd 100755 --- a/install +++ b/install @@ -176,7 +176,7 @@ sudo raspi-config nonint do_vnc 0 cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz +wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46n_linux.tar.gz tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop From a6dc350ddde7aba3a521d8f9fdd0214fc9ca1d37 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:02:33 -0500 Subject: [PATCH 0370/1744] Update update update pacsatground to 46n --- update | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update b/update index e2220d82..9c5180ae 100755 --- a/update +++ b/update @@ -350,13 +350,13 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd /tmp - wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46m_linux.tar.gz + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz - tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop + tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop - rm PacSatGround_0.46m_linux.tar.gz + rm PacSatGround_0.46n_linux.tar.gz - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ mkdir /home/pi/PacSatGround From 4051bc0d691e4a41e044fdbfdf3ebb2d14bd1ff8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:03:24 -0500 Subject: [PATCH 0371/1744] Update install change pacsat ground to 46n --- install | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install b/install index 2a1396dd..b3ecfe98 100755 --- a/install +++ b/install @@ -176,14 +176,14 @@ sudo raspi-config nonint do_vnc 0 cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacSatGround_0.46n_linux.tar.gz +wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz -tar -xzf PacSatGround_0.46m_linux.tar.gz -C /home/pi/Desktop +tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop -rm PacSatGround_0.46m_linux.tar.gz - -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacSatGround_0.46m_linux/spacecraft/ +rm PacSatGround_0.46n_linux.tar.gz +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ + mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi From 2accb21066b67ac667eab1a0c118f58a1fed8bcd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:10:51 -0500 Subject: [PATCH 0372/1744] Update install fix pacsat install --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index b3ecfe98..40c70f12 100755 --- a/install +++ b/install @@ -180,9 +180,9 @@ wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop -rm PacSatGround_0.46n_linux.tar.gz +rm PacsatGround_unix_0_46n.tar.gz -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 90920a243793092ccde246a78717a6819e696e23 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:11:33 -0500 Subject: [PATCH 0373/1744] Update update fix pacsat gs install --- update | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/update b/update index 9c5180ae..c6435169 100755 --- a/update +++ b/update @@ -354,10 +354,10 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop - rm PacSatGround_0.46n_linux.tar.gz - - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround_unix_0_46n/spacecraft/ + rm PacsatGround_unix_0_46n.tar.gz + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ + mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi From 7f0814211da62deaf31a473252ddcf3d1a400eed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:12:46 -0500 Subject: [PATCH 0374/1744] Update pacsat.sh change for version 46n --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 4e65f2d5..633e6612 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -84,7 +84,7 @@ echo echo "Don't close the direwolf window or the Pacsatsim will stop running." -cd /home/pi/Desktop/PacSatGround_0.46m_linux/ +cd /home/pi/Desktop/PacSatGround/ setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & From 36533e538b14d98cc8225f888b6ff78381b2b441 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:14:55 -0500 Subject: [PATCH 0375/1744] Update pacsat.sh fix dir name --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 633e6612..6a00522a 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -84,7 +84,7 @@ echo echo "Don't close the direwolf window or the Pacsatsim will stop running." -cd /home/pi/Desktop/PacSatGround/ +cd /home/pi/Desktop/PacsatGround/ setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & From 2eb2fac9814d18f8640812479399030279bfc66b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:31:04 -0500 Subject: [PATCH 0376/1744] Update transmit.py change from card to headphones --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index c9e1450d..d0301441 100644 --- a/transmit.py +++ b/transmit.py @@ -352,8 +352,8 @@ if __name__ == "__main__": print(txLedOn) GPIO.setup(txLed, GPIO.OUT) -# card = "Headphones" # default using pcm audio output of Pi Zero - card = "Device" # using USB sound card for audio output + card = "Headphones" # default using pcm audio output of Pi Zero +# card = "Device" # using USB sound card for audio output print("Programming FM module!\n"); output(pd, 1) From fb0776dda8e5dd0410fb15e42e6cf8776b30afe9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 17:38:25 -0500 Subject: [PATCH 0377/1744] Update update add cmake and direwolf v1.8 --- update | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/update b/update index c6435169..306e71ac 100755 --- a/update +++ b/update @@ -23,7 +23,7 @@ if [ "$1" = "u" ]; then fi -sudo apt-get install -y python3-smbus +sudo apt-get install -y python3-smbus cmake sudo sed -i 's/update.sh/update /g' /etc/motd @@ -374,16 +374,18 @@ cd /home/pi/direwolf #git status | grep 'invert' -if [[ ! $(git status | grep 'invert') ]]; then +if [[ ! $(git status | grep 'master-sync-invert') ]]; then - echo "updating direwolf to ptt invert version" + echo "updating direwolf to master-sync-invert version" git pull --no-rebase - git checkout invert - make clean - make -j + git checkout master-sync-invert + mkdir build + cd build + cmake .. + make -j4 sudo make install - make install-rpi + make install-conf cd fi From 427b53bee7663af50e4b82f0743417bae6123846 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:51:35 -0500 Subject: [PATCH 0378/1744] Create direwolf-pacsat-pwm.conf for pwm audio out --- direwolf/direwolf-pacsat-pwm.conf | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 direwolf/direwolf-pacsat-pwm.conf diff --git a/direwolf/direwolf-pacsat-pwm.conf b/direwolf/direwolf-pacsat-pwm.conf new file mode 100644 index 00000000..839bd4a4 --- /dev/null +++ b/direwolf/direwolf-pacsat-pwm.conf @@ -0,0 +1,18 @@ +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +PTT GPIO -20 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +##FULLDUP ON +##TXDELAY 15 +#FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 100 +#TXTAIL 10 +TXTAIL 1 +FULLDUP OFF From 67fde490cfbfa41682789db282d506bf8dc7d33d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:53:59 -0500 Subject: [PATCH 0379/1744] Update pacsatsim-df.sh add pwm variable --- pacsatsim-df.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh index 3999eb8d..5abc76d1 100755 --- a/pacsatsim-df.sh +++ b/pacsatsim-df.sh @@ -1,5 +1,15 @@ #!/bin/bash +pwm=1 + sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 +if [ "$pwm" = "1" ] ; then + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 + +else + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 + +fi From bf572cc9bccba0cee2e5d46ccb8c249506b95349 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:55:25 -0500 Subject: [PATCH 0380/1744] Update pacsat-df.sh add pwm variable --- groundstation/pacsat-df.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat-df.sh b/groundstation/pacsat-df.sh index 2c0af411..99ffc988 100755 --- a/groundstation/pacsat-df.sh +++ b/groundstation/pacsat-df.sh @@ -1,10 +1,21 @@ #!/bin/bash +pwm=1 + sudo modprobe snd-aloop #gpio -g mode 20 out #gpio -g write 20 1 -direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 +#direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 + +if [ "$pwm" = "1" ] ; then + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 + +else + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 + +fi From 7d1aeae4708b9da46ac3a248452d5f62516642ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 21:57:09 -0500 Subject: [PATCH 0381/1744] Create direwolf-fm-pacsat-pwm.conf add PWM --- .../direwolf/direwolf-fm-pacsat-pwm.conf | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 groundstation/direwolf/direwolf-fm-pacsat-pwm.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf new file mode 100644 index 00000000..ce5b6db6 --- /dev/null +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -0,0 +1,19 @@ +MYCALL AMSAT +ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +PTT GPIO -20 +CHANNEL 0 +MODEM 1200 +KISSPORT 8100 +AGWPORT 8002 +#FULLDUP OFF +#TXDELAY 30 +#FIX_BITS 1 AX25 + +#DWAIT 0 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +#TXDELAY 1000 +TXDELAY 150 +#TXTAIL 10 +FULLDUP OFF From 7f9d85add375cd8b5b3b65b6b06bab46d5a6b168 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 22:21:54 -0500 Subject: [PATCH 0382/1744] Update update pi_pacsat to my repo --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index 306e71ac..86f72c22 100755 --- a/update +++ b/update @@ -317,7 +317,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/ac2cz/pi_pacsat.git + git clone https://github.com/alanbjohnston/pi_pacsat.git cd pi_pacsat/Debug From c04e411b6416076c98f6e1df951025025537eb69 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 22:29:44 -0500 Subject: [PATCH 0383/1744] Rename direwolf-pacsat-pwm.conf to direwolf-pacsatsim-pwm.conf --- .../{direwolf-pacsat-pwm.conf => direwolf-pacsatsim-pwm.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename direwolf/{direwolf-pacsat-pwm.conf => direwolf-pacsatsim-pwm.conf} (100%) diff --git a/direwolf/direwolf-pacsat-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf similarity index 100% rename from direwolf/direwolf-pacsat-pwm.conf rename to direwolf/direwolf-pacsatsim-pwm.conf From a21b17e9010e6291371a2f6165f07a72765c175e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Dec 2025 22:39:49 -0500 Subject: [PATCH 0384/1744] Update direwolf-pacsatsim-jp14.conf change to card names --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 8b42f6c7..976f2d03 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -ADEVICE plughw:2,0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +#ADEVICE plughw:2,0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 4efcc75f0a39bd7f4e1877aba9d586729343b9c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 09:52:23 -0500 Subject: [PATCH 0385/1744] Update update to g0kla_common, pacsat version o --- update | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/update b/update index 86f72c22..bc2d029a 100755 --- a/update +++ b/update @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nupdate script for CubeSatSim v2.1\n" +echo -e "\nupdate script for CubeSatSim v2.2\n" if [ "$1" = "n" ] ; then # if [ -z "$2" ] ; then @@ -307,9 +307,9 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/alanbjohnston/iors_common.git + git clone https://github.com/alanbjohnston/g0kla_common.git - cd iors_common/Debug/ + cd g0kla_common/Debug/ make all @@ -327,7 +327,9 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir - export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + + export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null @@ -350,13 +352,13 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd /tmp - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz - tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop + tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop - rm PacsatGround_unix_0_46n.tar.gz + rm PacsatGround_unix_0_46o.tar.gz - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 777146d05380aea290929d5238da2686847f7b8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:11:47 -0500 Subject: [PATCH 0386/1744] Update update check for PacSat Ground and check for Desktop --- update | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/update b/update index bc2d029a..c8c35716 100755 --- a/update +++ b/update @@ -349,22 +349,38 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt sudo raspi-config nonint do_vnc 0 + +fi + +if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then + + echo "Installing PacSat Ground Station!" + + if [ ! -d "/home/pi/Desktop" ]; then + + echo + echo "You won't be able to run the PacSat Ground Station as this Pi OS does not seem to have the Desktop GUI installed." + echo + + else - cd /tmp - - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz - - tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop - - rm PacsatGround_unix_0_46o.tar.gz + cd /tmp + + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz + + tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop + + rm PacsatGround_unix_0_46o.tar.gz + + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + + mkdir /home/pi/PacSatGround - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + sudo usermod -a -G gpio pi - mkdir /home/pi/PacSatGround + sudo apt-get install default-jdk -y - sudo usermod -a -G gpio pi - - sudo apt-get install default-jdk -y + fi cd From 6a421e79514039f29e17e230dcde79d3925732e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:18:10 -0500 Subject: [PATCH 0387/1744] Update update fix copy of PacSat spacecraft files --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index c8c35716..cc452af9 100755 --- a/update +++ b/update @@ -372,7 +372,7 @@ if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then rm PacsatGround_unix_0_46o.tar.gz - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 554c0b12e69713217f0e049f9d9ee115b816de2c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:28:29 -0500 Subject: [PATCH 0388/1744] update library path --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5a044360..eb122c82 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,7 +2,9 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + +export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH #sudo systemctl stop cubesatsim From b6c77b2c2901289271160af4f75a115229a5e33b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:32:01 -0500 Subject: [PATCH 0389/1744] Update update change pi_pacsat to latest ac2cz --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index cc452af9..88918ed9 100755 --- a/update +++ b/update @@ -317,7 +317,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then cd - git clone https://github.com/alanbjohnston/pi_pacsat.git + git clone https://github.com/ac2cz/pi_pacsat.git cd pi_pacsat/Debug From fcf760d6f2daf9ec5c29e137f48d95b9eb890739 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Feb 2026 10:44:25 -0500 Subject: [PATCH 0390/1744] Update pacsatsim.sh run dire wolf in same window --- pacsatsim.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index eb122c82..76e37d1c 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -189,12 +189,14 @@ else # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + # /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + + /home/pi/CubeSatSim/pacsatsim-df.sh & # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & ## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & - echo "Don't close the direwolf window or the Pacsatsim will stop running." +## echo "Don't close the direwolf window or the Pacsatsim will stop running." echo fi From ec674a80c0efbbb2daca49dae0df0e55fe165986 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 14:20:38 -0500 Subject: [PATCH 0391/1744] Update update change BBS callsign to -12 --- update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update b/update index 88918ed9..a9188a67 100755 --- a/update +++ b/update @@ -336,7 +336,7 @@ if [ ! -d "/home/pi/pi_pacsat" ]; then set -- $value echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=$1" >> pacsat.config + echo "bbs_callsign=$1-12" >> pacsat.config echo "broadcast_callsign=$1-11" >> pacsat.config echo "digi_callsign=$1-1" >> pacsat.config echo "max_frames_in_tx_buffer=5" >> pacsat.config From b5c2b1cc04b7dc336a804fcee55c05ab19e0ff36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 16:57:33 -0500 Subject: [PATCH 0392/1744] Update direwolf-fm-pacsat-jp14.conf change to plughw and txdelay 1000 --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index 1b9d9a15..eb0bf0a2 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 PTT GPIO -20 CHANNEL 0 MODEM 1200 @@ -13,7 +13,7 @@ AGWPORT 8002 DWAIT 20 SLOTTIME 300 PERSIST 63 -#TXDELAY 1000 -TXDELAY 150 +TXDELAY 1000 +#TXDELAY 150 #TXTAIL 10 FULLDUP OFF From d202c27855d675bc453c3d25dea309c186e74dc4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 16:59:35 -0500 Subject: [PATCH 0393/1744] Update direwolf-fm-pacsat-pwm.conf change to plughw and txdelay 1000 --- groundstation/direwolf/direwolf-fm-pacsat-pwm.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf index ce5b6db6..b8a4929c 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE hw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 CHANNEL 0 MODEM 1200 @@ -13,7 +13,7 @@ AGWPORT 8002 DWAIT 20 SLOTTIME 300 PERSIST 63 -#TXDELAY 1000 -TXDELAY 150 +TXDELAY 1000 +#TXDELAY 150 #TXTAIL 10 FULLDUP OFF From bb0d8a3a6fc6e1d6a0e8586e2a0067801031a377 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 17:04:24 -0500 Subject: [PATCH 0394/1744] Update direwolf-pacsatsim-jp14.conf txdelay 1000 txtail 10 --- direwolf/direwolf-pacsatsim-jp14.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 976f2d03..cb0a1ce8 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -12,8 +12,8 @@ MODEM 1200 DWAIT 0 SLOTTIME 10 PERSIST 63 -#TXDELAY 1000 -TXDELAY 100 -#TXTAIL 10 -TXTAIL 1 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 FULLDUP OFF From aafd9419e109b72dac1c19e5687104aa21567bf2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Feb 2026 17:05:00 -0500 Subject: [PATCH 0395/1744] Update direwolf-pacsatsim-pwm.conf txdelay 1000 txtail 10 --- direwolf/direwolf-pacsatsim-pwm.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 839bd4a4..c0890790 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -11,8 +11,8 @@ MODEM 1200 DWAIT 0 SLOTTIME 10 PERSIST 63 -#TXDELAY 1000 -TXDELAY 100 -#TXTAIL 10 -TXTAIL 1 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 FULLDUP OFF From 927b3ea288ea3c8e24a38832b47971043c18e882 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 11:54:46 -0500 Subject: [PATCH 0396/1744] Update direwolf-pacsatsim-pwm.conf add transmit LED --- direwolf/direwolf-pacsatsim-pwm.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index c0890790..d0649d2f 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,5 +1,6 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 +PTT GPIO 27 #Transmit LED MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 80dd6054aac275408efe098d5306c1e68b79855b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 11:55:02 -0500 Subject: [PATCH 0397/1744] Update direwolf-fm-pacsat-pwm.conf add transmit LED --- groundstation/direwolf/direwolf-fm-pacsat-pwm.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf index b8a4929c..7e2a6ffa 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -1,6 +1,7 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 +PTT GPIO 27 #Transmit LED CHANNEL 0 MODEM 1200 KISSPORT 8100 From 51a6f6b3d2ce5abd72caebf3c4aaf64ed1e368b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 11:57:13 -0500 Subject: [PATCH 0398/1744] Update direwolf-fm-pacsat-pwm.conf put transmit LED ptt on same line --- groundstation/direwolf/direwolf-fm-pacsat-pwm.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf index 7e2a6ffa..c1d5f5f9 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf @@ -1,7 +1,6 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO -20 -PTT GPIO 27 #Transmit LED +PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 KISSPORT 8100 From 28dc67fd50495d9f20341322b0c6d0a2d735a407 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:30:06 -0500 Subject: [PATCH 0399/1744] Create PacSatSim.dat --- spacecraft/acSatGround_0.46o/PacSatSim.dat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spacecraft/acSatGround_0.46o/PacSatSim.dat diff --git a/spacecraft/acSatGround_0.46o/PacSatSim.dat b/spacecraft/acSatGround_0.46o/PacSatSim.dat new file mode 100644 index 00000000..92ae8f93 --- /dev/null +++ b/spacecraft/acSatGround_0.46o/PacSatSim.dat @@ -0,0 +1,15 @@ +Pacsat Telemetry Decoder Properties +#Sat Nov 26 18:12:20 EST 2016 +numberOfLookupTables=0 +measurementsFileName=measurements.csv +model=1 +layout0.filename=PACSAT_rttelemetry.csv +layout0.name=TLMI_LAYOUT +passMeasurementsFileName=passmeasurements.csv +name=PacSatSim +description=PacSatSim +numberOfLayouts=1 +satId=3 +catalogNumber=0 +conversionCoefficients=pacsat-coef.csv +layoutsUseBits=True From aa3c303990b6d6019ec860845049c8ddc35865e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:31:27 -0500 Subject: [PATCH 0400/1744] Delete spacecraft/acSatGround_0.46o directory --- spacecraft/acSatGround_0.46o/PacSatSim.dat | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 spacecraft/acSatGround_0.46o/PacSatSim.dat diff --git a/spacecraft/acSatGround_0.46o/PacSatSim.dat b/spacecraft/acSatGround_0.46o/PacSatSim.dat deleted file mode 100644 index 92ae8f93..00000000 --- a/spacecraft/acSatGround_0.46o/PacSatSim.dat +++ /dev/null @@ -1,15 +0,0 @@ -Pacsat Telemetry Decoder Properties -#Sat Nov 26 18:12:20 EST 2016 -numberOfLookupTables=0 -measurementsFileName=measurements.csv -model=1 -layout0.filename=PACSAT_rttelemetry.csv -layout0.name=TLMI_LAYOUT -passMeasurementsFileName=passmeasurements.csv -name=PacSatSim -description=PacSatSim -numberOfLayouts=1 -satId=3 -catalogNumber=0 -conversionCoefficients=pacsat-coef.csv -layoutsUseBits=True From 71c285371b66d5b04b8ba9a4908eef05c1058b45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:32:15 -0500 Subject: [PATCH 0401/1744] Create PacSatSim.dat --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim.dat diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat new file mode 100644 index 00000000..92ae8f93 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -0,0 +1,15 @@ +Pacsat Telemetry Decoder Properties +#Sat Nov 26 18:12:20 EST 2016 +numberOfLookupTables=0 +measurementsFileName=measurements.csv +model=1 +layout0.filename=PACSAT_rttelemetry.csv +layout0.name=TLMI_LAYOUT +passMeasurementsFileName=passmeasurements.csv +name=PacSatSim +description=PacSatSim +numberOfLayouts=1 +satId=3 +catalogNumber=0 +conversionCoefficients=pacsat-coef.csv +layoutsUseBits=True From 84d823a5bdfb54554d58763525ef534b201956e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:32:59 -0500 Subject: [PATCH 0402/1744] Create PacSatSim.properties --- .../PacSatGround_0.46o/PacSatSim.properties | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim.properties diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.properties b/spacecraft/PacSatGround_0.46o/PacSatSim.properties new file mode 100644 index 00000000..e4ccad24 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.properties @@ -0,0 +1,20 @@ +#PacSat Ground Station Properties +#Sun Feb 17 18:25:06 EST 2019 +sequence_num=3 +name=PacSatSim +digiCallsign=AMSAT-1 +description=PacSatSim +broadcastCallsign=AMSAT-11 +DIR_AGE=10 +bbsCallsign=AMSAT-12 +telemLayoutFile=PacSatSim.dat +telem_server=tlm.amsatfox.org +web_site_url=http://CubeSatSim.org +show_system_files_on_dir_tab=false +show_user_files=true +supports_file_upload=true +norad_id=30776 +psf_header_check_sums=false +commandsFile=pacsat.commands +is_command_station=true +secret_key=ScKQLp2ZMvCaCTK5jAmOmKmA0JiSyJ6Y15+Yfg\=\= From 89e8991aad6e4647f3b5bb070e826b6511fd2769 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 17:36:00 -0500 Subject: [PATCH 0403/1744] Update PacSatSim.properties add command file --- spacecraft/PacSatGround_0.46o/PacSatSim.properties | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.properties b/spacecraft/PacSatGround_0.46o/PacSatSim.properties index e4ccad24..f719eb84 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.properties +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.properties @@ -1,5 +1,5 @@ #PacSat Ground Station Properties -#Sun Feb 17 18:25:06 EST 2019 +#Fri Feb 6 18:25:06 EST 2026 sequence_num=3 name=PacSatSim digiCallsign=AMSAT-1 @@ -17,4 +17,6 @@ norad_id=30776 psf_header_check_sums=false commandsFile=pacsat.commands is_command_station=true -secret_key=ScKQLp2ZMvCaCTK5jAmOmKmA0JiSyJ6Y15+Yfg\=\= +secret_key=Not-required +commandsFile=PacSatSim.commands +echo_to_stdout=true From 103a98c3e5d88882de1f366f79116c4fa69e4d60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 22:38:30 -0500 Subject: [PATCH 0404/1744] Create PacSatSim.commands --- .../PacSatGround_0.46o/PacSatSim.commands | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim.commands diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.commands b/spacecraft/PacSatGround_0.46o/PacSatSim.commands new file mode 100644 index 00000000..4e7a8073 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.commands @@ -0,0 +1,37 @@ +# This is a list of commands that can be sent to the spacecraft +# args are 16 bit except the special code 99099099 which is replaced with the unix time, or when special code MSB32BIT is used to combine two fields +LIST, namespaces, None, Operations, Telem, File System +LIST, IMAGE FOLDER, sstv_queue 1, sstv_queue 2, sstv_queue 3, sstv_queue 4, sstv_queue 5, sstv_queue 6, sstv_queue 7, sstv_queue 8, sstv_queue 9 +LIST, FOLDER, bin, lib, config, PACSAT dir, upload queue, wod queue, log queue, text queue, sensor wod queue, data1, data2, data3, data4, data5, data6, data7, data8, data9 +LIST, ENABLE, false, true +LIST, ROLL AT STARTUP, false, true +LIST, OVERWRITE, false, true +LIST, FSK, false, true +LIST, REMOVE ORPHAN FILES, false, true +LIST, STATE, stop, start +LIST, UPLINK MODE, Off, All stations, Command Stations Only +LIST, FILENAME, use id for file name, user file name +LIST, SHUTDOWN, reboot, shutdown +LIST, RESET, reboot +LIST, RATE, 1200, 9600 +LIST, FEC, Off, On +LIST, FULL DUPLEX, false, true +LIST, LOG NAME, Log, WOD +LIST, LOG LEVEL, None, Error, Warnings, Info +# Name, Name space, cmd, arg0, arg1, arg2, arg3, argName0, argName1, argName2, argName3, confirm, use reset/uptime, description +# +# PACSAT +# +Pacsat Broadcast,3,1,0,0,0,0,State,Period(sec),Timeout(sec),NONE,false,false,Enable or disable the Pacsat Broadcast module. The directory entries and individual files will be broadcast based on commands from ground stations. +File Uploads,3,2,0,0,0,0,Uplink Mode,Period(sec),Timeout(sec),NONE,false,false,Enable or disable File Uploads. Limit file uploads to command stations that authenticate with a secret key. +Install File,3,3,0,0,0,0,FileId,MSB32BIT,Folder,NONE,false,false,Copy a file from the PACSAT Directory to a folder and name it with a 4 byte hex name that matches the id or the user filename. +Execute File,3,13,0,0,0,0,FileId,MSB32BIT,Arg1,Arg2,true,false,Execute a file on the ARISS-PI. The file must already be installed in the bin folder +Delete File,3,4,0,0,0,0,FileId,MSB32BIT,Folder,NONE,true,false,Delete a file on the ARISS-PI. Typically this leaves the original copy in the PACSAT dir. To delete the original copy specify the PACSAT Dir folder +Delete Folder Contents,3,5,0,0,0,0,Folder,Remove Orphan Files,NONE,NONE,true,false,Remove all files from the folder. The original files will remain in the PACSAT Directory unless deleted seperately. Orphan files are files in a folder without a corresponding Pacsat Dir file. NB: Deleting the entire Pacsat Dir is a desperate measure perhaps only useful in testing! +Default File Expiry Period,3,6,0,0,0,0,Period(days),NONE,NONE,NONE,false,false,Set the default expiry period for files without a specific expiry time. The new value will be applied to all files. +File Expiry Period,3,7,0,0,0,0,FileId,MSB32BIT,Date,MSB32BIT,false,false,Set the expiry date for a specific file`. +Directory Maintenence Period,3,8,0,0,0,0,Period(s),NONE,NONE,NONE,false,false,Period between checks to each node in the directory for file expiry. +Uplink queue maintenance Period,3,9,0,0,0,0,Period(s),NONE,NONE,NONE,false,false,Period to check the entire uplink queue for expired files. +Int File Que Check Period,3,10,0,0,0,0,Period(s),NONE,NONE,NONE,false,false,Period to check the ingestion queues for newly generated internal files. +Max File Size,3,11,0,0,0,0,Size(kb),NONE,NONE,NONE,false,false,Maximum size for an uploaded file +Max Upload File Age,3,12,0,0,0,0,Age(days),NONE,NONE,NONE,false,false,Partially uploaded files not modified for more than this period will be removed from the upload queue. From d3f8697120116ba513f27809b152d3e2e551e5ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:20:41 -0500 Subject: [PATCH 0405/1744] Add renamed BPSK telem files from FoxTelem --- .../PacSatSim_Type1_HEALTH.frame | 13 ++++ .../PacSatSim_Type2_MINMAX.frame | 13 ++++ .../PacSatSim_conversion_curves.csv | 13 ++++ .../PacSatSim_maxtelemetry.csv | 62 +++++++++++++++++++ .../PacSatSim_mintelemetry.csv | 62 +++++++++++++++++++ .../PacSatSim_rttelemetry.csv | 62 +++++++++++++++++++ .../PacSatSim_wodtelemetry.csv | 62 +++++++++++++++++++ 7 files changed, 287 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame new file mode 100644 index 00000000..050ff88a --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame @@ -0,0 +1,13 @@ +number_of_payloads=6 +payload0.name=rttelemetry +payload0.length=78 +payload1.name=rttelemetry +payload1.length=78 +payload2.name=rttelemetry +payload2.length=78 +payload3.name=rttelemetry +payload3.length=78 +payload4.name=rttelemetry +payload4.length=78 +payload5.name=wodtelemetry +payload5.length=78 diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame new file mode 100644 index 00000000..a69be045 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame @@ -0,0 +1,13 @@ +number_of_payloads=6 +payload0.name=rttelemetry +payload0.length=78 +payload1.name=rttelemetry +payload1.length=78 +payload2.name=rttelemetry +payload2.length=78 +payload3.name=maxtelemetry +payload3.length=78 +payload4.name=mintelemetry +payload4.length=78 +payload5.name=wodtelemetry +payload5.length=78 diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv new file mode 100644 index 00000000..30f05985 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_conversion_curves.csv @@ -0,0 +1,13 @@ +CurveName,a,bx,cx^2,dx^3,ex^4,fx^5,Description +cubesatsim_voltage,0,0.01,0,0,0,0,Converts voltages read from the INA219 sensors +cubesatsim_current,-2048,1,0,0,0,0,Converts positive and negative currents read from the INA219 sensors +cubesatsim_temperature,0,0.1,0,0,0,0,Converts temperature of Pi +cubesatsim_rotation,-2048,1,0,0,0,0,Converts positive and negative dps rotation +cubesatsim_acceleration,-20.48,0.01,0,0,0,0,Converts positive and negative g acceleration +cubesatsim_altitude,0,0.1,0,0,0,0,Converts altitude +cubesatsim_pressure,0,1,0,0,0,0,Converts pressure +cubesatsim_sensor1,0,1,0,0,0,0,Conversion of Sensor 1 +cubesatsim_sensor2,-2048,1,0,0,0,0,Conversion of Sensor 2 +cubesatsim_sensor3,-20.48,0.01,0,0,0,0,Conversion of Sensor 3 +cubesatsim_rpm,-204.8,0.1,0,0,0,0,Conversion of calculated RPM +cubesatsim_rssi,-2048,1,0,0,0,0,Conversion of Received Signal Strength diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv new file mode 100644 index 00000000..9bf2f291 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage +3,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current +7,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +8,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage +9,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage +12,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage +14,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current +15,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current +16,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current +17,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current +18,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current +19,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current +20,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage +21,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication +26,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity +31,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current +32,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +35,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +37,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +38,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator +42,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received +43,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status +44,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status +45,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status +46,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +48,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +49,MAX,rf6,12,-,0,NONE,0,0,0,None,None +50,MAX,rf7,12,-,0,NONE,0,0,0,None,None +51,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +53,MAX,pad,4,-,34,NONE,0,0,0,None,Unused +54,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +55,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler +56,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +57,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +58,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +59,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +60,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv new file mode 100644 index 00000000..adf24a04 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,MIN,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,MIN,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,MIN,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage +3,MIN,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,MIN,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,MIN,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,MIN,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current +7,MIN,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +8,MIN,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage +9,MIN,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,MIN,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,MIN,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage +12,MIN,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,MIN,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage +14,MIN,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current +15,MIN,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current +16,MIN,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current +17,MIN,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current +18,MIN,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current +19,MIN,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current +20,MIN,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage +21,MIN,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,MIN,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,MIN,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,MIN,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,MIN,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication +26,MIN,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,MIN,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,MIN,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,MIN,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,MIN,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity +31,MIN,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current +32,MIN,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,MIN,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,MIN,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +35,MIN,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,MIN,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +37,MIN,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +38,MIN,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,MIN,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,MIN,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,MIN,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator +42,MIN,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received +43,MIN,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status +44,MIN,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status +45,MIN,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status +46,MIN,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,MIN,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +48,MIN,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +49,MIN,rf6,12,-,0,NONE,0,0,0,None,None +50,MIN,rf7,12,-,0,NONE,0,0,0,None,None +51,MIN,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,MIN,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +53,MIN,pad,4,-,34,NONE,0,0,0,None,Unused +54,MIN,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +55,MIN,pad1,1,-,0,NONE,0,0,0,NONE,Filler +56,MIN,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +57,MIN,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +58,MIN,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +59,MIN,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +60,MIN,pad2,27,-,0,NONE,0,0,0,NONE,Filler diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv new file mode 100644 index 00000000..f9301dbe --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +2,realTime,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current +7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +8,realTime,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +9,realTime,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,realTime,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,realTime,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +12,realTime,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,realTime,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current +15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current +18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +20,realTime,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,realTime,rssi,12,dBm,cubesatsim_rssi|INT,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,realTime,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,realTime,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,BME280 Humidity +31,realTime,BAT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,realTime,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +35,realTime,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,realTime,SimulatedTelemetry,1,-,STATUS_ON_OFF,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +37,realTime,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +38,realTime,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,realTime,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +40,realTime,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +41,realTime,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator +42,realTime,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +45,realTime,C2CStatus,2,-,COMMAND_STATUS,Computer Software,3,5,0,Command Control, Command & Control Status +46,realTime,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,realTime,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +48,realTime,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +49,realTime,rf6,12,-,0,NONE,0,0,0,None,None +50,realTime,rf7,12,-,0,NONE,0,0,0,None,None +51,realTime,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,realTime,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +53,realTime,pad,4,-,34,NONE,0,0,0,None,Unused +54,realTime,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +55,realTime,pad1,1,-,0,NONE,0,0,0,NONE,Filler +56,realTime,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +57,realTime,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv new file mode 100644 index 00000000..d1b53340 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv @@ -0,0 +1,62 @@ +61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,WOD,BATT_A_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Cell A,Battery A voltage (0-2.5V scale) +1,WOD,BATT_B_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,2,3,Cell A+B,Battery A+B voltage (0-3.3V scale) +2,WOD,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Cell A+B+C Voltage,Battery A+B+C voltage (0-5.0V scale) +3,WOD,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,Acceleration around X Axis +4,WOD,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,Acceleration around Y Axis +5,WOD,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,Acceleration around Z Axis +6,WOD,battCurr,12,mA,cubesatsim_current,Battery,4,2,4,Current,Total Battery DC current +7,WOD,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,Temperature,STEM Payload Sensor Temperature +8,WOD,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,+X solar Panel voltage +9,WOD,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,+Y solar Panel voltage +10,WOD,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,+Z solar Panel voltage +11,WOD,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,-X solar Panel voltage +12,WOD,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,-Y solar Panel voltage +13,WOD,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,-Z solar Panel voltage +14,WOD,posXi,12,mA,cubesatsim_current,+X Panel,7,2,4,Current,+X solar Panel current +15,WOD,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,4,Current,+Y solar Panel current +16,WOD,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,4,Current,+Z solar Panel current +17,WOD,negXi,12,mA,cubesatsim_current,-X Panel,10,2,4,Current,-X solar Panel current +18,WOD,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,4,Current,-Y solar Panel current +19,WOD,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,4,Current,-Z solar Panel current +20,WOD,PSUVoltage,12,V,cubesatsim_voltage|FLOAT2,PSU,5,1,3,Voltage,Power Supply Voltage +21,WOD,spin,12,rpm,12,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,WOD,Pressure,12,bar,cubesatsim_pressure,Experiments,6,3,3,Pressure,STEM Payload Sensor Pressure +23,WOD,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,Altitude,STEM Payload Sensor Altitude +24,WOD,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +25,WOD,rssi,12,dBm,14,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,WOD,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,Temperature,Internal Temperature of IHU +27,WOD,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,Angular Veolcity around X Axis +28,WOD,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,Angular Veolcity around Y Axis +29,WOD,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,Angular Veolcity around Z Axis +30,WOD,Sensor1,12,raw,cubesatsim_sensor1|INT,Experiments,6,5,3,Sensor 1,STEM Payload Extra Sensor 1 +31,WOD,PSUCurrent,12,mA,cubesatsim_current,PSU,5,2,3,Current,Power Supply DC Current +32,WOD,Sensor2,12,signed raw,cubesatsim_sensor2|INT,Experiments,6,6,3,Sensor 2,STEM Payload Extra Sensor 2 +33,WOD,Sensor3,12,signed scaled,cubesatsim_sensor3|FLOAT2,Experiments,6,7,3,Sensor 3,STEM Payload Extra Sensor 3 +34,WOD,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload Board Failure Indicator +35,WOD,Nominal Mode,1,-,17,Computer Software,3,2,0,Nominal Mode, Nominal Mode (Not Safe Mode) +36,WOD,PayloadStatus1,1,-,17,NONE,6,7,0,Exp 2,STEM Payload status 1 failure indicator +37,WOD,PayloadStatus2,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 2 failure indicator +38,WOD,I2CBus0Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +39,WOD,I2CBus1Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 1,I2C bus 1 failure indicator +40,WOD,I2CBus3Failure,1,-,17,Computer Hardware,2,4,0,I2C Bus 3,I2C bus 3 failure indicator +41,WOD,CameraFailure,1,-,17,Computer Hardware,2,5,0,Camera,Camera failure indicator +42,WOD,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,WOD,RxAntDeploy,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +44,WOD,TxAntDeploy,2,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +45,WOD,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +46,WOD,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +47,WOD,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +48,WOD,rf6,12,-,0,NONE,0,0,0,None,None +49,WOD,rf7,12,-,0,NONE,0,0,0,None,None +50,WOD,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +51,WOD,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +52,WOD,pad,4,-,34,NONE,0,0,0,None,Unused +53,WOD,WODTimeStampReset,16,-,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected +54,WOD,pad1,17,-,0,NONE,0,0,0,NONE,Filler +55,WOD,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +56,WOD,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +57,WOD,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +58,WOD,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +59,WOD,WODTimeStampUpTime,25,s,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected +60,WOD,pad2,3,-,0,NONE,0,0,0,NONE,Filler From 54cb74d30bcab55634041f664f15ee7a51f56a62 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:26:19 -0500 Subject: [PATCH 0406/1744] Update PacSatSim.dat change to PacSatSim_ filenames --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat index 92ae8f93..f7e30e65 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -3,7 +3,7 @@ Pacsat Telemetry Decoder Properties numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PACSAT_rttelemetry.csv +layout0.filename=PacSatSim_rttelemetry.csv layout0.name=TLMI_LAYOUT passMeasurementsFileName=passmeasurements.csv name=PacSatSim @@ -11,5 +11,5 @@ description=PacSatSim numberOfLayouts=1 satId=3 catalogNumber=0 -conversionCoefficients=pacsat-coef.csv +conversionCoefficients=PacSatSim_conversion_curves.csv layoutsUseBits=True From 98d1f69a3c09260ffaee67e3e0016532e73ff573 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:32:17 -0500 Subject: [PATCH 0407/1744] Update PacSatSim.dat updated for PacSatSim_ file names --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat index 92ae8f93..8db7d5ae 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -1,15 +1,18 @@ -Pacsat Telemetry Decoder Properties -#Sat Nov 26 18:12:20 EST 2016 +#Pacsat Telemetry Decoder Properties +#Fri Feb 6 18:12:20 EST 2026 numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PACSAT_rttelemetry.csv -layout0.name=TLMI_LAYOUT +layoutsUseToCallsignAsType=true +numberOfLayouts=2 +layout0.filename=PacSatSim_rttelemetry.csv +layout0.name=TLMP1 +layout1.filename=PacSatSim_rttelemetry.csv +layout1.name=WOD passMeasurementsFileName=passmeasurements.csv -name=PacSatSim -description=PacSatSim -numberOfLayouts=1 +name=ISS +description=PacSatSim satId=3 catalogNumber=0 -conversionCoefficients=pacsat-coef.csv +conversionCoefficients=PacSatSim_conversion_curves.csv layoutsUseBits=True From f9a59597a5b92e1002224610bcfbf3e9ddbf75ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Feb 2026 23:33:23 -0500 Subject: [PATCH 0408/1744] Update PacSatSim.dat revert --- spacecraft/PacSatGround_0.46m/PacSatSim.dat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46m/PacSatSim.dat b/spacecraft/PacSatGround_0.46m/PacSatSim.dat index f7e30e65..92ae8f93 100644 --- a/spacecraft/PacSatGround_0.46m/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46m/PacSatSim.dat @@ -3,7 +3,7 @@ Pacsat Telemetry Decoder Properties numberOfLookupTables=0 measurementsFileName=measurements.csv model=1 -layout0.filename=PacSatSim_rttelemetry.csv +layout0.filename=PACSAT_rttelemetry.csv layout0.name=TLMI_LAYOUT passMeasurementsFileName=passmeasurements.csv name=PacSatSim @@ -11,5 +11,5 @@ description=PacSatSim numberOfLayouts=1 satId=3 catalogNumber=0 -conversionCoefficients=PacSatSim_conversion_curves.csv +conversionCoefficients=pacsat-coef.csv layoutsUseBits=True From 6ae0a0dbbd61ae5048946d152dafa4f0a568a7aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 08:42:50 -0500 Subject: [PATCH 0409/1744] Update PacSatSim_rttelemetry.csv remove FLOAT2 and INT --- .../PacSatSim_rttelemetry.csv | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index f9301dbe..cca6a65f 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,34 +1,34 @@ 61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,realTime,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage -3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +2,realTime,BATT_V,12,V,cubesatsim_voltage,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis 6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current 7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,realTime,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage -9,realTime,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,realTime,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,realTime,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage -12,realTime,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,realTime,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +8,realTime,posXv,12,V,cubesatsim_voltage,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +9,realTime,posYv,12,V,cubesatsim_voltage,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,realTime,posZv,12,V,cubesatsim_voltage,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,realTime,negXv,12,V,cubesatsim_voltage,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +12,realTime,negYv,12,V,cubesatsim_voltage,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,realTime,negZv,12,V,cubesatsim_voltage,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage 14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current 15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current 16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current 17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current 18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current 19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current -20,realTime,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +20,realTime,BATT2_V,12,V,cubesatsim_voltage,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells 22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,realTime,rssi,12,dBm,cubesatsim_rssi|INT,Radio,1,1,3,RSSI,Received Signal Strength Indication +25,realTime,rssi,12,dBm,cubesatsim_rssi,Radio,1,1,3,RSSI,Received Signal Strength Indication 26,realTime,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis 30,realTime,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,BME280 Humidity 31,realTime,BAT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 32,realTime,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature @@ -60,3 +60,4 @@ 58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 048c8a8a92e2960291db67db895d26e7ed66f075 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 08:47:32 -0500 Subject: [PATCH 0410/1744] Create PacSatSim-coef.csv --- .../PacSatGround_0.46o/PacSatSim-coef.csv | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv new file mode 100644 index 00000000..c76d5b42 --- /dev/null +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -0,0 +1,32 @@ +0,-,NONE,0,1,0,0,0,0,None,0,4096,None +1,-,Boolean,0,1,0,0,0,0,Boolean,0,1,A Boolean value that prints TRUE or FALSE +2,-,Counts,0,1,0,0,0,0,Counts,0,4096,An integer count value +3,-,Date,0,1,0,0,0,0,Date,0,4096,A Unix epoch date time integer +4,-,TXPower,0,1,0,0,0,0,None,0,4096,None +5,-,IHUSpeed,0,0.1,0,0,0,0,None,0,4096,None +6,-,RSSI_1,0,-1,0,0,0,0,Counts,0,4096,Signed 8 bit +7,-,Mode,0,0,0,0,0,0,Enum,0,4096,SAFE:CREW:TELEM:X BAND RPT:APRS:SSTV:FS +8,-,Battery,0,0.001,0,0,0,0,None,0,4096,Battery Voltage +9,-,IHUTemp,0,0.1,0,0,0,0,None,0,4096,None +10,-,Mode,0,1,0,0,0,0,None,0,4096,The spacecraft Mode +11,-,FS_BYTES_PER_BLK,0,128,0,0,0,0,Counts,0,4096,The number of bytes per block in RED FS +12,-,FS_FILE_NUMBER,-4,1,0,0,0,0,Counts,0,4096,The number of files in the FS excluding core OS folders +13,-,SHTC3Temp,-45,0.002670288,0,0,0,0,None,0,4096,SHTC3 Temperature sensor +14,-,SHTC3Humidity,0,0.001525879,0,0,0,0,None,0,4096,SHTC3 Humidity sensor +15,-,LPS22Pressure,0,0.000244141,0,0,0,0,None,0,4096,LPS22 Pressure sensor +16,-,LPS22Temp,0,0.01,0,0,0,0,None,0,4096,LPS22 Temperature of sensor +17,-,IMUTemp,0,0.00390625,0,0,0,0,None,0,4096,Temperature of IMU = raw/256 +18,-,Acc,0,6.10E-05,0,0,0,0,Sint16,0,4096,Accelerometer is 2g full scale +19,-,Gyro,0,0.000976563,0,0,0,0,Sint16,0,4096,Gyro scale for 32dps +20,-,Mag,0,0.149975574,0,0,0,0,Sint16,0,4096,Mag is 4912 full scale +21,-,AntMode,0,0,0,0,0,0,Enum,0,4096,MANUAL:AUTO:ORBIT +22,-,ResetReason,0,0,0,0,0,0,Enum,0,4096,NONE:SHUTDOWN:REBOOT:RADIO:TNC:TNC LISTEN:RUN TWICE:RADIO REBOOT:TNC PS REBOOT:TNC REBOOT:SOFT:THERMAL +23,-,LogLevel,0,0,0,0,0,0,Enum,0,4096,NONE:ERROR:WARN:INFO +24,-,O2FromVolts,86.434,-0.0354,0,0,0,0,None,0,4096,O2 Conc from raw voltage as a percentage +25,-,SensorState,0,0,0,0,0,0,Enum,0,4096,OFF:ON:ERR +26,-,SPARE2,0,0,0,0,0,0,Counts,0,4096,SPARE +27,-,O2Conc,0,0.01,0,0,0,0,Sint16,0,4096,O2 concentration as percentage +28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW +NOTES:,,,,,,,,,,,, +Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment +Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 2fe1fc6e7e96ad27e89895c1591be8c6ba489713 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 11:49:02 -0500 Subject: [PATCH 0411/1744] Update PacSatSim-coef.csv add divide by 100 field --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index c76d5b42..cea11ef8 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -27,6 +27,7 @@ 26,-,SPARE2,0,0,0,0,0,0,Counts,0,4096,SPARE 27,-,O2Conc,0,0.01,0,0,0,0,Sint16,0,4096,O2 concentration as percentage 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW +29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 1fbee01b9dfa0ff0fec4ca015eab257e963b6d92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 11:50:28 -0500 Subject: [PATCH 0412/1744] Update PacSatSim.dat change to PacSatSim-coef.csv --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat index 8db7d5ae..1e5abfff 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -14,5 +14,5 @@ name=ISS description=PacSatSim satId=3 catalogNumber=0 -conversionCoefficients=PacSatSim_conversion_curves.csv +conversionCoefficients=PacSatSim-coef.csv layoutsUseBits=True From 21ab4e1f1877a841e7dfa9718db05c1195c7171e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 11:56:14 -0500 Subject: [PATCH 0413/1744] Update PacSatSim_rttelemetry.csv changed voltage to 29 --- .../PacSatSim_rttelemetry.csv | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index cca6a65f..39187d50 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,25 +1,25 @@ 61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,realTime,BATT_V,12,V,cubesatsim_voltage,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +2,realTime,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage 3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis 4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis 5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis 6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current 7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,realTime,posXv,12,V,cubesatsim_voltage,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage -9,realTime,posYv,12,V,cubesatsim_voltage,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,realTime,posZv,12,V,cubesatsim_voltage,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,realTime,negXv,12,V,cubesatsim_voltage,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage -12,realTime,negYv,12,V,cubesatsim_voltage,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,realTime,negZv,12,V,cubesatsim_voltage,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +8,realTime,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +9,realTime,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +10,realTime,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +11,realTime,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +12,realTime,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +13,realTime,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage 14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current 15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current 16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current 17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current 18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current 19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current -20,realTime,BATT2_V,12,V,cubesatsim_voltage,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +20,realTime,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells 22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude @@ -61,3 +61,4 @@ 59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 36feace03a32b125a7b4a78f4388d54dedc7ae8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:09:03 -0500 Subject: [PATCH 0414/1744] Update PacSatSim_rttelemetry.csv replace rest of cubesatsim_ conversations --- .../PacSatSim_rttelemetry.csv | 45 ++++++++++--------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 39187d50..251badf4 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -2,36 +2,36 @@ 0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 2,realTime,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage -3,realTime,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,realTime,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,realTime,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,realTime,BATT_I,12,mA,cubesatsim_current,Battery,4,2,3,Battery Current,INA219 Battery Current -7,realTime,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +3,realTime,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +4,realTime,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +5,realTime,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +6,realTime,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current +7,realTime,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature 8,realTime,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage 9,realTime,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage 10,realTime,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage 11,realTime,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage 12,realTime,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage 13,realTime,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,realTime,posXi,12,mA,cubesatsim_current,+X Panel,7,2,3,Current,INA219 +X solar panel Current -15,realTime,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current -16,realTime,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current -17,realTime,negXi,12,mA,cubesatsim_current,-X Panel,10,2,3,Current,INA219 -X solar panel Current -18,realTime,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current -19,realTime,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +14,realTime,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current +15,realTime,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +16,realTime,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +17,realTime,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current +18,realTime,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +19,realTime,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current 20,realTime,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage -21,realTime,spin,12,rpm,cubesatsim_rpm,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,realTime,Pressure,12,hPa,cubesatsim_pressure,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,realTime,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +21,realTime,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +22,realTime,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,realTime,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,realTime,rssi,12,dBm,cubesatsim_rssi,Radio,1,1,3,RSSI,Received Signal Strength Indication -26,realTime,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,realTime,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,realTime,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,realTime,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,realTime,Humidity,12,%,cubesatsim_temperature,Experiments,6,5,3,BME280 Humidity,BME280 Humidity -31,realTime,BAT2_I,12,mA,cubesatsim_current,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current -32,realTime,DiodeTemp,12,C,cubesatsim_rpm,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +25,realTime,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication +26,realTime,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +27,realTime,SatelliteXAxisAngularVelocity,12,dps,31,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +28,realTime,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +29,realTime,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +30,realTime,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity +31,realTime,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,realTime,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature 33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 35,realTime,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) @@ -62,3 +62,4 @@ 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 4863d08f8486315a9f4acbfbd7a73daa7e43e7a8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:09:18 -0500 Subject: [PATCH 0415/1744] Update PacSatSim-coef.csv add rest of conversions --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index cea11ef8..854d2b56 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -28,6 +28,9 @@ 27,-,O2Conc,0,0.01,0,0,0,0,Sint16,0,4096,O2 concentration as percentage 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW 29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 +30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset +31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset +32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 437d65a4243a76d1bbacc2c7b9301b73cee9851d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:18:39 -0500 Subject: [PATCH 0416/1744] Update PacSatSim-coef.csv add Status enum 33 --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 854d2b56..0c6fd915 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -31,6 +31,7 @@ 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset +33,-,Status,0,0,0,0,0,0,Enum,0,4096,ON:OFF NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From db20b27839e5195761d7d1ae3b128c22d61750cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:19:21 -0500 Subject: [PATCH 0417/1744] Update PacSatSim_rttelemetry.csv add Status 33 --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 251badf4..a8d345d9 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -34,8 +34,8 @@ 32,realTime,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature 33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,realTime,SafeMode,1,-,STATUS_ON_OFF,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,realTime,SimulatedTelemetry,1,-,STATUS_ON_OFF,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +35,realTime,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +36,realTime,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator 37,realTime,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator 38,realTime,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator 39,realTime,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator @@ -63,3 +63,4 @@ + From a4f2c665c59bb46e0d9e77dd114b4c8bf61d496f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:24:09 -0500 Subject: [PATCH 0418/1744] Update PacSatSim_rttelemetry.csv add rest of enums --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index a8d345d9..e37be32a 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -44,7 +44,7 @@ 42,realTime,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received 43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status 44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status -45,realTime,C2CStatus,2,-,COMMAND_STATUS,Computer Software,3,5,0,Command Control, Command & Control Status +45,realTime,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status 46,realTime,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted 47,realTime,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V 48,realTime,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected @@ -64,3 +64,4 @@ + From 3d26d214526f812f0d89cb1d6a1cc3b6c4a61d12 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:24:17 -0500 Subject: [PATCH 0419/1744] Update PacSatSim-coef.csv add rest of enums --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 0c6fd915..46902f05 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -32,6 +32,7 @@ 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,ON:OFF +34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 5a7f1d9c0fcaa4f59e8a4a2187742a2633818a09 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:34:37 -0500 Subject: [PATCH 0420/1744] Update PacSatSim_rttelemetry.csv remove 42 and 43 --- .../PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index e37be32a..62f4b01f 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -45,13 +45,13 @@ 43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status 44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status 45,realTime,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status -46,realTime,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,realTime,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -48,realTime,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +46,realTime,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted +47,realTime,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V +48,realTime,ICR2dot5VProt,12,V,0,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected 49,realTime,rf6,12,-,0,NONE,0,0,0,None,None 50,realTime,rf7,12,-,0,NONE,0,0,0,None,None -51,realTime,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,realTime,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +51,realTime,MuxTest,12,V,0,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +52,realTime,LtVGACtl,12,V,0,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) 53,realTime,pad,4,-,34,NONE,0,0,0,None,Unused 54,realTime,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance 55,realTime,pad1,1,-,0,NONE,0,0,0,NONE,Filler @@ -65,3 +65,4 @@ + From 7358da25e7631281c519856e553be0fef233272f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 12:40:42 -0500 Subject: [PATCH 0421/1744] Update PacSatSim.properties --- spacecraft/PacSatGround_0.46o/PacSatSim.properties | 1 - 1 file changed, 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.properties b/spacecraft/PacSatGround_0.46o/PacSatSim.properties index f719eb84..8ff5be50 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.properties +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.properties @@ -15,7 +15,6 @@ show_user_files=true supports_file_upload=true norad_id=30776 psf_header_check_sums=false -commandsFile=pacsat.commands is_command_station=true secret_key=Not-required commandsFile=PacSatSim.commands From f526b10e7b63d4e752d3db599d2a82ededc77dea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:34:29 -0500 Subject: [PATCH 0422/1744] Create txLED.py --- txLED.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 txLED.py diff --git a/txLED.py b/txLED.py new file mode 100644 index 00000000..af9b6d51 --- /dev/null +++ b/txLED.py @@ -0,0 +1,25 @@ +import RPi.GPIO as GPIO +import subprocess +import time +import os +from time import sleep + +txPin = 27 +pttPin = 20 + +GPIO.setmode(GPIO.BCM) +GPIO.setwarnings(False) +GPIO.setup(txPin, GPIO.OUT) +GPIO.output(txPin, 0) +print("0") +GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) + +while (True): + sleep(0.1) + GPIO.wait_for_edge(pttPin, GPIO.FALLING) + GPIO.output(txPin, 1) + sleep(0.1) + print("1") + GPIO.wait_for_edge(pttPin, GPIO.RISING) + GPIO.output(txPin, 0) + print("0") From c341d5a3b46ae92207e6d538dd54555bd25da879 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:44:34 -0500 Subject: [PATCH 0423/1744] Update transmit.py add txLed control by PTT --- transmit.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/transmit.py b/transmit.py index d0301441..8a535fa7 100644 --- a/transmit.py +++ b/transmit.py @@ -423,16 +423,28 @@ if __name__ == "__main__": output(ptt, 1) if (mode == 'a'): print("AFSK") - elif (mode == 'p'): - print("Pacsat") -# system('/home/pi/CubeSatSim/pacsatsim.sh') -# system('sudo systemctl restart pacsatsim') - while True: - sleep(30) - elif (mode == 'P'): - print("Pacsat Ground Station") - while True: - sleep(30) + elif (mode == 'p') or (mode == 'P'): + if (mode == 'P'): + print("Pacsat Ground Station") + else: + print("Pacsat") +# txPin = 27 + pttPin = 20 + + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(txLed, GPIO.OUT) + GPIO.output(txLed, 0) + + GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) + + while (True): + sleep(0.1) + GPIO.wait_for_edge(pttPin, GPIO.FALLING) + GPIO.output(txLed, 1) + sleep(0.1) + GPIO.wait_for_edge(pttPin, GPIO.RISING) + GPIO.output(txLed, 1) else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From 61cec95c9733572abefe38bbb5f48bd56197e9a6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:54:29 -0500 Subject: [PATCH 0424/1744] Update transmit.py change pttPin from 1 to 0 --- transmit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 8a535fa7..6fe0bae4 100644 --- a/transmit.py +++ b/transmit.py @@ -435,6 +435,7 @@ if __name__ == "__main__": GPIO.setwarnings(False) GPIO.setup(txLed, GPIO.OUT) GPIO.output(txLed, 0) + print("0") GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) @@ -442,9 +443,11 @@ if __name__ == "__main__": sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.FALLING) GPIO.output(txLed, 1) + print("1") sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.RISING) - GPIO.output(txLed, 1) + GPIO.output(txLed, 0) + print("0") else: GPIO.output(powerPin, 0) print("Transmit APRS Commands") From 398fc71782eaf62fcbaab5bdbef3c3ec4ade53ec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 15:57:04 -0500 Subject: [PATCH 0425/1744] Update transmit.py remove pttPin set --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6fe0bae4..60036a26 100644 --- a/transmit.py +++ b/transmit.py @@ -437,7 +437,7 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") - GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) +# GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) while (True): sleep(0.1) From 7ae10fdbc5ea956bad80a69e7d58b84892660a91 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:17:41 -0500 Subject: [PATCH 0426/1744] Update transmit.service change to user pi --- systemd/transmit.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/transmit.service b/systemd/transmit.service index ab6dd815..0b77ff50 100644 --- a/systemd/transmit.service +++ b/systemd/transmit.service @@ -8,7 +8,7 @@ WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit Restart=always -User=root +User=pi [Install] WantedBy=default.target From 5c29fffe057d5a145494730c6c19e0b559050f1e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:19:47 -0500 Subject: [PATCH 0427/1744] Update transmit.py remove pull-up on pttPin --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 60036a26..13d2bc1a 100644 --- a/transmit.py +++ b/transmit.py @@ -437,8 +437,8 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") -# GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) - + GPIO.setup(pttPin, GPIO.IN) + while (True): sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.FALLING) From a3e3464f031d23efa591f39bd618ce392159bee9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:51:48 -0500 Subject: [PATCH 0428/1744] Update transmit.py try around txLed --- transmit.py | 200 ++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 140 insertions(+), 60 deletions(-) diff --git a/transmit.py b/transmit.py index 4375bff2..087dd629 100644 --- a/transmit.py +++ b/transmit.py @@ -209,7 +209,10 @@ else: GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 GPIO.setwarnings(False) -GPIO.setup(txLed, GPIO.OUT) +try: + GPIO.setup(txLed, GPIO.OUT) +except: + print("Can't set txLed") GPIO.setup(pd, GPIO.OUT) #output(pd, 1) @@ -225,9 +228,13 @@ else: print("TXC not present") # txc = False # forcing it off -output(txLed, txLedOn) -sleep(1) -output(txLed, txLedOff) + +try: + output(txLed, txLedOn) + sleep(1) + output(txLed, txLedOff) +except: + print("Can't set txLed") battery_saver_check() @@ -434,9 +441,12 @@ if __name__ == "__main__": print(callsign) GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - print(txLed) - print(txLedOn) - GPIO.setup(txLed, GPIO.OUT) + try: + print(txLed) + print(txLedOn) + GPIO.setup(txLed, GPIO.OUT) + except: + print("Can't set txLed") card = "Headphones" # default using pcm audio output of Pi Zero # card = "Device" # using USB sound card for audio output @@ -486,9 +496,12 @@ if __name__ == "__main__": print("Don't transmit CW ID since APRS HAB mode is active") else: if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") print("Transmit CW ID") status = "" if not no_command: @@ -499,7 +512,10 @@ if __name__ == "__main__": system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") sleep(1) else: @@ -535,9 +551,12 @@ if __name__ == "__main__": system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # output(pd, 1) # output (ptt, 0) # sleep(.1) @@ -563,7 +582,10 @@ if __name__ == "__main__": sleep(0.1) # output (ptt, 1) # output(pd, 0) - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") system("sudo rm /home/pi/CubeSatSim/ready") f.close() @@ -595,7 +617,10 @@ if __name__ == "__main__": if (command_tx == True): GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + try: + output(txLed, txLedOn) + except: + print("Can't set txLed") if (txc): sim_failure_check() @@ -611,7 +636,10 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") # command_control_check() sleep(2) @@ -642,7 +670,10 @@ if __name__ == "__main__": camera_present = 0 # while 1: - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") # output (ptt, 1) # output(pd, 0) if (camera_present == 1): @@ -654,9 +685,12 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # battery_saver_check() if (txc): @@ -672,8 +706,11 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) - + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") + # sleep(1) except: print("image 2 did not load - copy from CubeSatSim/sstv directory") @@ -687,9 +724,12 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # battery_saver_check() if (txc): @@ -705,8 +745,10 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") # output (ptt, 1) # output(pd, 0) @@ -725,9 +767,12 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # battery_saver_check() @@ -743,8 +788,10 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") # output (ptt, 1) # output(pd, 0) sleep(1) @@ -763,9 +810,12 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + try: + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # battery_saver_check() if (txc): @@ -780,8 +830,10 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") # output (ptt, 1) # output(pd, 0) sleep(10) @@ -794,9 +846,12 @@ if __name__ == "__main__": if (command_tx == True): # command_control_check() - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # battery_saver_check() @@ -809,8 +864,10 @@ if __name__ == "__main__": # output (pd, 0) else: sleep(60) - - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") # output (ptt, 1) # output(pd, 0) sleep(10) @@ -824,9 +881,11 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) - - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) + try: + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 + GPIO.setup(txLed, GPIO.OUT) + except: + print("Can't set txLed") if (command_tx == True): # system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &") @@ -836,7 +895,10 @@ if __name__ == "__main__": print("Initial image_id: " + str(image_id) + "\n") while 1: # print ("LED on") - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") sleep(0.4) # if (command_tx == False): # output(txLed, txLedOn) @@ -845,9 +907,12 @@ if __name__ == "__main__": # command_control_check() if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # print(txLed) # print(txLedOn) @@ -886,7 +951,10 @@ if __name__ == "__main__": output(pd, 1) output(ptt, 1) GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) + try: + GPIO.setup(txLed, GPIO.OUT) + except: + print("Can't set txLed") # GPIO.setup(powerPin, GPIO.OUT) GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected # GPIO.output(powerPin, 1) # was 0 @@ -899,16 +967,22 @@ if __name__ == "__main__": while True: if (GPIO.input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + try: + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") while (GPIO.input(squelch) == False): sleep(1) print("No carrier detected, stopping repeater") - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") system("sudo rpitx -i null > /dev/null 2>&1") system("sudo killall -9 arecord > /dev/null 2>&1") system("sudo killall -9 nc > /dev/null 2>&1") @@ -931,17 +1005,23 @@ if __name__ == "__main__": system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") print("Turning LED on/off and listening for carrier") while 1: - output(txLed, txLedOff) + try: + output(txLed, txLedOff) + except: + print("Can't set txLed") sleep(0.4) # if (command_tx == False): # output(txLed, txLedOn) # sleep(0.03) # output(txLed, txLedOff) # command_control_check() - if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) + if (command_tx == True): + try: + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + GPIO.setup(txLed, GPIO.OUT) + output(txLed, txLedOn) + except: + print("Can't set txLed") # print(txLed) # print(txLedOn) sleep(4.2) From 9c0dfef26fb3b85208c73f205d19d52762385134 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:54:34 -0500 Subject: [PATCH 0429/1744] Update transmit.py add try --- transmit.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/transmit.py b/transmit.py index 087dd629..9a9f35e1 100644 --- a/transmit.py +++ b/transmit.py @@ -184,14 +184,17 @@ powerPin = 16 command_tx = True -GPIO.setmode(GPIO.BCM) -GPIO.setwarnings(False) -GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(green, GPIO.OUT) -GPIO.output(powerPin, 1) +try: + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) + GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) + GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) + GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) + GPIO.setup(green, GPIO.OUT) + GPIO.output(powerPin, 1) +except: + print("Can't set txLed") transmit = False txLed = 27 From 0d8eca3dd557c34662b8048f8a709423a3f22121 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:56:49 -0500 Subject: [PATCH 0430/1744] Update transmit.py another try --- transmit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 9a9f35e1..cc0fafac 100644 --- a/transmit.py +++ b/transmit.py @@ -189,10 +189,13 @@ try: GPIO.setwarnings(False) GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) - GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(green, GPIO.OUT) GPIO.output(powerPin, 1) +except: + print("GPIO setup problem") +try: + GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) except: print("Can't set txLed") From 8a19fe4fcbfac509623b9217b73a338269f6db90 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 17:59:15 -0500 Subject: [PATCH 0431/1744] Update transmit.py one more try --- transmit.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index cc0fafac..eae474c2 100644 --- a/transmit.py +++ b/transmit.py @@ -1003,9 +1003,12 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) - - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) + + try: + GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 + GPIO.setup(txLed, GPIO.OUT) + except: + print("Can't set txLed") if (command_tx == True): system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") From 6f65d5efa57f9c9a0e7cfb129ea8333f8b5ce02d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 22:29:47 -0500 Subject: [PATCH 0432/1744] Update direwolf-pacsatsim-pwm.conf remove txled ptt --- direwolf/direwolf-pacsatsim-pwm.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index d0649d2f..c0890790 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,6 +1,5 @@ ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 PTT GPIO -20 -PTT GPIO 27 #Transmit LED MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 6532c062840569ccdb33481f42aa0856c9deafc9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 7 Feb 2026 22:46:08 -0500 Subject: [PATCH 0433/1744] Update pacsat.sh add pi user to gpio --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 6a00522a..5151e803 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -77,6 +77,8 @@ echo #direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & #/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" +sudo usermod -a -G gpio pi + /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & From b61dbe25a53a4c87a074fa7cc32c842d6d439cfa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 10:12:56 -0500 Subject: [PATCH 0434/1744] Update transmit.py change to USB audio instead of PCM since doesn't work yet --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index eae474c2..7f5a85f8 100644 --- a/transmit.py +++ b/transmit.py @@ -454,8 +454,8 @@ if __name__ == "__main__": except: print("Can't set txLed") - card = "Headphones" # default using pcm audio output of Pi Zero -# card = "Device" # using USB sound card for audio output +# card = "Headphones" # default using pcm audio output of Pi Zero + card = "Device" # using USB sound card for audio output query = ["sudo", "systemctl", "is-active", "gpsd.socket"] try: From 95cca814ab8d5867553d346675e9707f206ab66a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 10:24:25 -0500 Subject: [PATCH 0435/1744] Update transmit.py change card to Device --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 7f5a85f8..597c67d6 100644 --- a/transmit.py +++ b/transmit.py @@ -45,7 +45,8 @@ def sim_failure_check(): sim_mode = True except: print("No failure mode") - card = "Headphones" +# card = "Headphones" + card = "Device" if sim_config: sim_mode = True From 595bdcf1e3fe69b206af6b1cc15c30b2ab1e7d7a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 10:40:42 -0500 Subject: [PATCH 0436/1744] Update transmit.py try txLed 17 --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 597c67d6..90c5b14e 100644 --- a/transmit.py +++ b/transmit.py @@ -201,7 +201,8 @@ except: print("Can't set txLed") transmit = False -txLed = 27 +# txLed = 27 +txLed = 17 txLedOn = 1 txLedOff = 0 if GPIO.input(12) == False: From 1b6e526028e19947d408f54032e12747d990865e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 10:54:13 -0500 Subject: [PATCH 0437/1744] change to Bookworm detection and /boot/firmware --- install | 114 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/install b/install index b71cde89..2b81c3d3 100755 --- a/install +++ b/install @@ -2,23 +2,23 @@ echo -e "\ninstallation script for CubeSatSim v2.2\n" - if [[ $(grep '11.' /etc/debian_version) ]]; then - echo "Installing on Debian 11 (Bullseye)" + if [[ $(grep '12.' /etc/debian_version) ]]; then + echo "Installing on Debian 12 (Bookworm)" else - echo "The OS is not Debian 11 (Bullseye)!" + echo "The OS is not Debian 12 (Bookworm)!" echo "Installation is not likely to work." echo "It is recommended you start with" - echo "Bullseye as your OS." + echo "Bookworm as your OS." echo sleep 10 fi -if [[ $(grep 'bullseye' /etc/os-release) ]]; then - echo "Bullseye detected, installation continuing." +if [[ $(grep 'bookworm' /etc/os-release) ]]; then + echo "Bookworm detected, installation continuing." else - echo "Your Pi OS version is not Bullseye." + echo "Your Pi OS version is not Bookworm." echo "The software installation will likely not work." - echo "See the README.md for how to install using Bullseye." + echo "See the README.md for how to install using Bookworm." echo echo "Are you sure you want to continue the installation (y/n)?" @@ -201,9 +201,9 @@ sudo systemctl enable command sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf -sudo cp /boot/config.txt /boot/config.txt.0 +sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 -sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 +sudo cp /boot/firmware/cmdline.txt /boot/firmware/cmdline.txt.0 sudo raspi-config nonint do_i2c 0 @@ -215,90 +215,90 @@ sudo raspi-config nonint do_legacy 0 #if [ "$1" = "u" ]; then #fi -## sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt +## sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt + sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 - sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt - if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then - echo "dtoverlay=i2c-gpio already in /boot/config.txt" + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" else - echo "adding dtoverlay=i2c-gpio to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt' + echo "adding dtoverlay=i2c-gpio to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/firmware/config.txt' fi - if [[ $(grep 'enable_uart=1' /boot/config.txt) ]]; then - echo "enable_uart=1 already in /boot/config.txt" + if [[ $(grep 'enable_uart=1' /boot/firmware/config.txt) ]]; then + echo "enable_uart=1 already in /boot/firmware/config.txt" else - echo "adding enable_uart=1 to /boot/config.txt" - sudo sh -c 'echo "\nenable_uart=1" >> /boot/config.txt' + echo "adding enable_uart=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\nenable_uart=1" >> /boot/firmware/config.txt' fi - if [[ $(grep 'dtoverlay=disable-bt' /boot/config.txt) ]]; then - echo "dtoverlay=disable-bt already in /boot/config.txt" + if [[ $(grep 'dtoverlay=disable-bt' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=disable-bt already in /boot/firmware/config.txt" else - echo "adding dtoverlay=disable-bt to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/config.txt' + echo "adding dtoverlay=disable-bt to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/firmware/config.txt' fi - if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then - echo "dtoverlay=dwc2 aalready in /boot/config.txt" + if [[ $(grep 'dtoverlay=dwc2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=dwc2 aalready in /boot/firmware/config.txt" else - echo "adding dtoverlay=dwc2 to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + echo "adding dtoverlay=dwc2 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/firmware/config.txt' fi - if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then - echo "modules-load=dwc2,g_ether already in /boot/cmdline.txt" + if [[ $(grep 'modules-load=dwc2,g_ether' /boot/firmware/cmdline.txt) ]]; then + echo "modules-load=dwc2,g_ether already in /boot/firmware/cmdline.txt" else - echo "adding modules-load=dwc2,g_ether to /boot/cmdline.txt" - sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt + echo "adding modules-load=dwc2,g_ether to /boot/firmware/cmdline.txt" + sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/firmware/cmdline.txt fi - if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then - echo "dtparam=audio=on already in /boot/config.txt" + if [[ $(grep 'dtparam=audio=on' /boot/firmware/config.txt) ]]; then + echo "dtparam=audio=on already in /boot/firmware/config.txt" else - echo "adding dtparam=audio=on to /boot/config.txt" - sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' + echo "adding dtparam=audio=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/firmware/config.txt' fi - if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then - echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" + if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=audremap,enable_jack=on already in /boot/firmware/config.txt" else - echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' + echo "adding dtoverlay=audremap,enable_jack=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/firmware/config.txt' fi - if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then - echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" + if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=pwm,pin=18,func=2 already in /boot/firmware/config.txt" else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' + echo "adding to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/firmware/config.txt' fi - if [[ $(grep 'disable_splash=1 ' /boot/config.txt) ]]; then - echo "disable_splash=1 already in /boot/config.txt" + if [[ $(grep 'disable_splash=1 ' /boot/firmware/config.txt) ]]; then + echo "disable_splash=1 already in /boot/firmware/config.txt" else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' + echo "adding to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndisable_splash=1" >> /boot/firmware/config.txt' fi - if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then - echo "boot_delay=0 already in /boot/config.txt" + if [[ $(grep 'boot_delay=0' /boot/firmware/config.txt) ]]; then + echo "boot_delay=0 already in /boot/firmware/config.txt" else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' + echo "adding to /boot/firmware/config.txt" + sudo sh -c 'echo "\nboot_delay=0" >> /boot/firmware/config.txt' fi - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi + if ! grep -q force_turbo=1 /boot/firmware/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/firmware/config.txt'; fi -sudo sh -c 'echo "\n" >> /boot/config.txt' +sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' sudo sed -i 's/DEVICES=""/DEVICES="\/dev\/serial0"/g' /etc/default/gpsd From 242cb178e184ec6785b664b96643079e0f27dbc3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 11:05:51 -0500 Subject: [PATCH 0438/1744] Update install with missing text --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 2b81c3d3..8ceb4115 100755 --- a/install +++ b/install @@ -285,14 +285,14 @@ sudo raspi-config nonint do_legacy 0 if [[ $(grep 'disable_splash=1 ' /boot/firmware/config.txt) ]]; then echo "disable_splash=1 already in /boot/firmware/config.txt" else - echo "adding to /boot/firmware/config.txt" + echo "adding disable_splash=1 to /boot/firmware/config.txt" sudo sh -c 'echo "\ndisable_splash=1" >> /boot/firmware/config.txt' fi if [[ $(grep 'boot_delay=0' /boot/firmware/config.txt) ]]; then echo "boot_delay=0 already in /boot/firmware/config.txt" else - echo "adding to /boot/firmware/config.txt" + echo "adding boot_delay=0 to /boot/firmware/config.txt" sudo sh -c 'echo "\nboot_delay=0" >> /boot/firmware/config.txt' fi From c7862afaf48c2fec92ba1c307605370141a4e26d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 11:07:55 -0500 Subject: [PATCH 0439/1744] Update install add additional packages --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 8ceb4115..69038b6d 100755 --- a/install +++ b/install @@ -71,7 +71,7 @@ sudo apt-get update && sudo apt-get dist-upgrade -y sudo apt-get remove pulseaudio -y -sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev +sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev raspi-config libraspberrypi-dev cd From dcdc5f81a20e3fd3532f4fab40533698f8373803 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 11:27:44 -0500 Subject: [PATCH 0440/1744] Update transmit.py change raspistill to rpicam-still --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 90c5b14e..d1ba372b 100644 --- a/transmit.py +++ b/transmit.py @@ -138,7 +138,7 @@ def camera_photo(): system("sudo rm /home/pi/CubeSatSim/camera_out.jpg") stored_image = False try: - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1") + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Photo taken") @@ -666,7 +666,7 @@ if __name__ == "__main__": # from pysstv.sstv import SSTV # camera = PiCamera() print("Testing for camera") - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Camera present") From 4b2a2e3906d38ada614b5673f1680ee259db166b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 11:32:33 -0500 Subject: [PATCH 0441/1744] Update transmit.py set GPIO 27 to input --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index d1ba372b..4092237e 100644 --- a/transmit.py +++ b/transmit.py @@ -193,8 +193,10 @@ try: GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(green, GPIO.OUT) GPIO.output(powerPin, 1) + GPIO.setup(27, GPIO.IN) except: print("GPIO setup problem") + system("gpio -g mode 27 IN") try: GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) except: From bf2a758a61d8ff026967d8a96725aeee2a817e51 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 11:44:38 -0500 Subject: [PATCH 0442/1744] Update transmit.py fix rpicam-still parameters --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 4092237e..7a0d2362 100644 --- a/transmit.py +++ b/transmit.py @@ -138,7 +138,7 @@ def camera_photo(): system("sudo rm /home/pi/CubeSatSim/camera_out.jpg") stored_image = False try: - system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1") + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Photo taken") @@ -668,7 +668,7 @@ if __name__ == "__main__": # from pysstv.sstv import SSTV # camera = PiCamera() print("Testing for camera") - system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Camera present") From 821b68ced4a34d5486732d3cebdc9312d69f8a79 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 12:00:13 -0500 Subject: [PATCH 0443/1744] Update install add camera_auto_detect --- install | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install b/install index 69038b6d..68a577b3 100755 --- a/install +++ b/install @@ -296,6 +296,13 @@ sudo raspi-config nonint do_legacy 0 sudo sh -c 'echo "\nboot_delay=0" >> /boot/firmware/config.txt' fi + if [[ $(grep 'camera_auto_detect=1' /boot/firmware/config.txt) ]]; then + echo "camera_auto_detect=1 already in /boot/firmware/config.txt" + else + echo "adding camera_auto_detect=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ncamera_auto_detect=1" >> /boot/firmware/config.txt' + fi + if ! grep -q force_turbo=1 /boot/firmware/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/firmware/config.txt'; fi sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' From e1b916e4dea9b93608938be4931055e22b9cbac2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:14:00 -0500 Subject: [PATCH 0444/1744] Update pacsatsim.service change user to pi --- systemd/pacsatsim.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/pacsatsim.service b/systemd/pacsatsim.service index e65044af..d5163bd6 100644 --- a/systemd/pacsatsim.service +++ b/systemd/pacsatsim.service @@ -8,7 +8,7 @@ WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit Restart=always -User=root +User=pi [Install] WantedBy=default.target From 9302ac01b9619bab5ef5d8e1026567cef606bfd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:15:54 -0500 Subject: [PATCH 0445/1744] Update update add pacsatsim.service installation --- update | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/update b/update index a9188a67..3ae8add9 100755 --- a/update +++ b/update @@ -105,6 +105,22 @@ else FLAG=1 fi +FILE=/etc/systemd/system/pacsatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then + echo "changed command.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + FLAG=1 + else + echo "no change to pacsatsim.service." + fi +else + echo "creating pacsatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo systemctl enable pacsatsim + FLAG=1 +fi + FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg if [ ! -f "$FILE" ]; then echo "Copying SSTV image 1." From 65cd80f7f2608c802a3a7a26e7421bdb94aa90d8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:19:16 -0500 Subject: [PATCH 0446/1744] Update transmit.py start and stop pacsatsim.service --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 13d2bc1a..e1c6aa77 100644 --- a/transmit.py +++ b/transmit.py @@ -245,6 +245,7 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) + system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") @@ -428,6 +429,7 @@ if __name__ == "__main__": print("Pacsat Ground Station") else: print("Pacsat") + system("sudo systemctl restart pacsatsim") # txPin = 27 pttPin = 20 From 24d4b6c743492e44bcec91e68029595552a1362b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 13:24:38 -0500 Subject: [PATCH 0447/1744] Update config add pacsat text --- config | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/config b/config index 1929eee1..7759faed 100755 --- a/config +++ b/config @@ -1424,12 +1424,12 @@ elif [ "$1" = "-g" ]; then elif [ "$1" = "-G" ]; then - echo "Changing to Pacsat mode" + echo "Changing to PacSatSim mode" value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value - echo "changing CubeSatSim to Pacsat mode" +# echo "changing CubeSatSim to Pacsat mode" sudo echo "p" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver @@ -1444,12 +1444,14 @@ elif [ "$1" = "-G" ]; then elif [ "$1" = "-I" ]; then - echo "Changing to Pacsat Ground Station mode" - value=`cat /home/pi/CubeSatSim/.mode` + echo "Changing to PacSat Ground Station mode" + echo + echo "Run the Pacsat Ground Station in the Desktop" + value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value - echo "changing CubeSatSim to Pacsat mode" +# echo "changing CubeSatSim to Pacsat mode" sudo echo "P" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver @@ -1462,8 +1464,6 @@ elif [ "$1" = "-I" ]; then restart=1 fi - - elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -1500,8 +1500,8 @@ elif [ "$1" = "-h" ]; then echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings" - echo " -G Change to Pacsat mode" - echo " -I Changing to Pacsat Ground Station mode" + echo " -G Change to PacSatSim mode" + echo " -I Changing to PacSat Ground Station mode" echo exit From ca26dac60e88285bd048c91aeb4b5267b3e39c80 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 18:58:54 -0500 Subject: [PATCH 0448/1744] Update main.h add venv --- main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.h b/main.h index 7c8f2386..442c1bd7 100644 --- a/main.h +++ b/main.h @@ -200,7 +200,7 @@ char sensor_string[SENSOR_FIELDS][32]; int test_i2c_bus(int bus); //const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/python/voltcurrent.py "; -const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/ina219.py "; +const char pythonCmd[] = "/home/pi/venv/bin/python3 -u /home/pi/CubeSatSim/ina219.py "; char pythonStr[100], pythonConfigStr[100], busStr[10]; int map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; char src_addr[5] = ""; From d29fec987759a6be7f8c590342b7f7273a8875bf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Feb 2026 23:28:28 -0500 Subject: [PATCH 0449/1744] Update install move direwolf and libraspberrypi-dev installs --- install | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/install b/install index 68a577b3..3d5dc123 100755 --- a/install +++ b/install @@ -61,18 +61,6 @@ else echo "0\n" > /home/pi/CubeSatSim/command_count.txt fi -touch /home/pi/CubeSatSim/command_control_direwolf - -CubeSatSim/config -c -n - -CubeSatSim/config -l -n - -sudo apt-get update && sudo apt-get dist-upgrade -y - -sudo apt-get remove pulseaudio -y - -sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev raspi-config libraspberrypi-dev - cd git clone https://github.com/alanbjohnston/direwolf.git @@ -85,6 +73,20 @@ sudo make install make install-rpi +# + +touch /home/pi/CubeSatSim/command_control_direwolf + +CubeSatSim/config -c -n + +CubeSatSim/config -l -n + +sudo apt-get update && sudo apt-get dist-upgrade -y + +sudo apt-get remove pulseaudio -y + +sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev raspi-config + # removed wiringpi and python-picamera python3-picamera sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom gpsd gpsd-clients libgps-dev python3-gps @@ -355,6 +357,8 @@ cd raspberry-pi-bme280 git checkout payload make +sudo apt-get update -y libraspberrypi-dev + echo "Would you like to reboot to complete the installation (y/n)?" read -r ANS From 0c326b36b335539f30b586bd867ba4ae013faa3e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Feb 2026 15:41:34 -0500 Subject: [PATCH 0450/1744] Update install move add ina219 python install --- install | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/install b/install index 3d5dc123..084857f6 100755 --- a/install +++ b/install @@ -61,20 +61,6 @@ else echo "0\n" > /home/pi/CubeSatSim/command_count.txt fi -cd - -git clone https://github.com/alanbjohnston/direwolf.git - -cd direwolf - -make -j - -sudo make install - -make install-rpi - -# - touch /home/pi/CubeSatSim/command_control_direwolf CubeSatSim/config -c -n @@ -88,7 +74,21 @@ sudo apt-get remove pulseaudio -y sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev raspi-config # removed wiringpi and python-picamera python3-picamera -sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom gpsd gpsd-clients libgps-dev python3-gps +sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom + +cd + +git clone https://github.com/alanbjohnston/direwolf.git + +cd direwolf + +make -j + +sudo make install + +make install-rpi + +sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps sudo systemctl disable gpsd sudo systemctl disable gpsd.socket @@ -110,7 +110,7 @@ sudo dpkg -i debian-template/wiringpi-2.61-1.deb cd #changed to python3-smbus -sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff5 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev +sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff6 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev sudo pip3 install --upgrade setuptools @@ -359,6 +359,15 @@ make sudo apt-get update -y libraspberrypi-dev +sudo apt install python3-venv +sudo python3 -m venv venv +source venv/bin/activate + +curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 + +sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus +sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 + echo "Would you like to reboot to complete the installation (y/n)?" read -r ANS From 850c93d01293eb565f19de9c1ff549bb80340f44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Feb 2026 15:44:09 -0500 Subject: [PATCH 0451/1744] Update install move libraspberrypi-dev --- install | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/install b/install index 084857f6..22c32756 100755 --- a/install +++ b/install @@ -140,6 +140,8 @@ git checkout master ./script/install +sudo apt-get update -y libraspberrypi-dev + cd echo "Installing SSDV for FUNcube mode" @@ -173,16 +175,8 @@ cd PiSSTVpp make pisstvpp -echo "Copying SSTV image 1" -cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg - -echo "Copying SSTV image 2" -cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg - cd -git clone https://github.com/alanbjohnston/rpitx.git - cd rpitx ./install.sh @@ -357,8 +351,6 @@ cd raspberry-pi-bme280 git checkout payload make -sudo apt-get update -y libraspberrypi-dev - sudo apt install python3-venv sudo python3 -m venv venv source venv/bin/activate From 6a7ec693126126ce2b0a526b2de2e25ec5b1b961 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Feb 2026 15:58:16 -0500 Subject: [PATCH 0452/1744] Update install move config --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index 22c32756..a3bf5ea4 100755 --- a/install +++ b/install @@ -62,10 +62,6 @@ else fi touch /home/pi/CubeSatSim/command_control_direwolf - -CubeSatSim/config -c -n - -CubeSatSim/config -l -n sudo apt-get update && sudo apt-get dist-upgrade -y @@ -360,6 +356,10 @@ curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 +CubeSatSim/config -c -n + +CubeSatSim/config -l -n + echo "Would you like to reboot to complete the installation (y/n)?" read -r ANS From 6003f8ca9ad2fc50dc2e5ea2053a61490f1d6e9c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Feb 2026 16:35:38 -0500 Subject: [PATCH 0453/1744] Update install fix python venv --- install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install b/install index a3bf5ea4..3840ab3d 100755 --- a/install +++ b/install @@ -347,15 +347,18 @@ cd raspberry-pi-bme280 git checkout payload make +cd sudo apt install python3-venv sudo python3 -m venv venv -source venv/bin/activate +source /home/pi/venv/bin/activate curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 +cd + CubeSatSim/config -c -n CubeSatSim/config -l -n From be4eba429743b2eff1324c0bf4ad2051e01846e6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Feb 2026 16:40:24 -0500 Subject: [PATCH 0454/1744] Update install fix rpitx --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 3840ab3d..587262e3 100755 --- a/install +++ b/install @@ -173,6 +173,8 @@ make pisstvpp cd +git clone https://github.com/alanbjohnston/rpitx.git + cd rpitx ./install.sh From c68941383b19fbc3ef0bc67b721f09941d78fd9c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Feb 2026 16:49:24 -0500 Subject: [PATCH 0455/1744] Update install fix libraspberrypi-dev --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 587262e3..69317527 100755 --- a/install +++ b/install @@ -136,7 +136,7 @@ git checkout master ./script/install -sudo apt-get update -y libraspberrypi-dev +sudo apt-get install -y libraspberrypi-dev cd From 2d3643b9798b66902729df1ec06a5f634640a702 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Feb 2026 17:27:04 -0500 Subject: [PATCH 0456/1744] Update transmit.py change to PWM --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 7a0d2362..f319397b 100644 --- a/transmit.py +++ b/transmit.py @@ -45,8 +45,8 @@ def sim_failure_check(): sim_mode = True except: print("No failure mode") -# card = "Headphones" - card = "Device" + card = "Headphones" +# card = "Device" if sim_config: sim_mode = True From a0ae76979204e9950ac78e8ba7594fd1df30520e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 10 Feb 2026 09:47:22 -0500 Subject: [PATCH 0457/1744] Update main.c python INA219 read results --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 42aaa7e8..51959a58 100644 --- a/main.c +++ b/main.c @@ -590,7 +590,7 @@ int main(int argc, char * argv[]) { file1 = sopen(pythonConfigStr); // python sensor polling function fgets(cmdbuffer, 1000, file1); - fprintf(stderr, "pythonStr result: %s\n", cmdbuffer); + fprintf(stderr, "pythonStr INA219 read result: %s\n", cmdbuffer); } for (int i = 0; i < 9; i++) { @@ -667,7 +667,7 @@ int main(int argc, char * argv[]) { char * token; fputc('\n', file1); fgets(cmdbuffer, 1000, file1); -// fprintf(stderr, "Python read Result: %s\n", cmdbuffer); + fprintf(stderr, "Python INA219 read Result: %s\n", cmdbuffer); // serialPuts(uart_fd, cmdbuffer); // write INA data to Pico over serial From 99a280a6061d565e58324c4d6c96c4e5e810ff7f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Feb 2026 22:57:33 -0500 Subject: [PATCH 0458/1744] Update main.h change PACSAT to 8 --- main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.h b/main.h index 83f993ae..068d45d6 100644 --- a/main.h +++ b/main.h @@ -108,7 +108,7 @@ FILE *telem_file; #define BPSK 3 #define SSTV 4 #define CW 5 -#define PACSAT 6 +#define PACSAT 8 #define REPEATER 11 #define TXCOMMAND 12 #define PACSATGND 13 From 483af6e68216ebdc3c7c49c29d0cde1053403b41 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:21:32 -0500 Subject: [PATCH 0459/1744] change txLED to 17 --- dtmf_aprs_cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index cfa58788..dad50ce9 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -9,7 +9,7 @@ logging.basicConfig(format='%(message)s') if __name__ == "__main__": powerPin = 16 - txLed = 27 + txLed = 17 change_mode = False debug_mode = False counter = 1 From 47d4bc68acc8b269331340ef1cbeb6141f924a15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:27:17 -0500 Subject: [PATCH 0460/1744] Update dtmf_aprs_cc.py put try around GPIO setup --- dtmf_aprs_cc.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index dad50ce9..d52d2135 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -106,9 +106,14 @@ if __name__ == "__main__": if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(txLed, GPIO.OUT) - + try: + GPIO.setup(powerPin, GPIO.OUT) + except: + print("GPIO powerPin setup problem") + try: + GPIO.setup(txLed, GPIO.OUT) + except: + print("GPIO txLed setup problem") if (mode == 'f'): GPIO.output(powerPin, 0) # blink two times sleep(0.1) From 35271da068c83a562115b09e57b6015cfc0f09d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:37:39 -0500 Subject: [PATCH 0461/1744] Update dtmf_aprs_cc.py change from py GPIO to WiringPi gpio --- dtmf_aprs_cc.py | 145 +++++++++--------------------------------------- 1 file changed, 25 insertions(+), 120 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index d52d2135..dcce38b6 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,12 +1,21 @@ import sys from os import system -import RPi.GPIO as GPIO -from RPi.GPIO import output +# import RPi.GPIO as GPIO +# from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') +def blink(times): + for i in range(times): + system("gpio write 27 0") +# GPIO.output(27, 0) + sleep(0.1) + system("gpio write 27 1") +# GPIO.output(27, 1) + sleep(0.1) + if __name__ == "__main__": powerPin = 16 txLed = 17 @@ -104,141 +113,33 @@ if __name__ == "__main__": # if ((debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - try: - GPIO.setup(powerPin, GPIO.OUT) - except: - print("GPIO powerPin setup problem") - try: - GPIO.setup(txLed, GPIO.OUT) - except: - print("GPIO txLed setup problem") if (mode == 'f'): - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(2) sleep(1) elif (mode == 'b'): - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(3) sleep(1) - elif (mode == 's'): - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + elif + blink(4) sleep(1) elif (mode == 'm'): - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(5) sleep(1) elif (mode == 'e'): - GPIO.output(powerPin, 0) # blink six times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink6) sleep(1) elif (mode == 'j'): - GPIO.output(powerPin, 0) # blink seven times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(7) sleep(1) elif (mode == 'a'): mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) + blink(1) sleep(1) try: @@ -257,8 +158,12 @@ if __name__ == "__main__": print("Command_count: ") print(command_count) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) +# GPIO.output(txLed, 0) +# GPIO.output(powerPin, 0) + system("gpio write 27 0") + system("gpio write 0 0") + system("gpio write 2 0") + system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") From 596401fc2eef536ea988fb2c2af785c79c1e7331 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:38:09 -0500 Subject: [PATCH 0462/1744] Update dtmf_aprs_cc.py blink typo --- dtmf_aprs_cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index dcce38b6..d1bfe324 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -130,7 +130,7 @@ if __name__ == "__main__": sleep(1) elif (mode == 'e'): - blink6) + blink(6) sleep(1) elif (mode == 'j'): From fd1927762f0d8f5eedabde156dd9fe4b8ccf2e9a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:39:04 -0500 Subject: [PATCH 0463/1744] Update dtmf_aprs_cc.py missing 's' --- dtmf_aprs_cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index d1bfe324..6ef15251 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -121,7 +121,7 @@ if __name__ == "__main__": blink(3) sleep(1) - elif + elif (mode == 's'): blink(4) sleep(1) From d05f505e7927e8cb2e0f98cbbcc01089da4c911a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:40:55 -0500 Subject: [PATCH 0464/1744] Update dtmf_aprs_cc.py don't turn off green LED --- dtmf_aprs_cc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 6ef15251..a63045e6 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -161,8 +161,8 @@ if __name__ == "__main__": # GPIO.output(txLed, 0) # GPIO.output(powerPin, 0) system("gpio write 27 0") - system("gpio write 0 0") - system("gpio write 2 0") + # system("gpio write 0 0") + # system("gpio write 2 0") system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") From 4861dcb7563608be4580ba309f618756dba0f334 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:43:25 -0500 Subject: [PATCH 0465/1744] Update dtmf_aprs_cc.py turn on green LED at end --- dtmf_aprs_cc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index a63045e6..0fdd0351 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -161,8 +161,8 @@ if __name__ == "__main__": # GPIO.output(txLed, 0) # GPIO.output(powerPin, 0) system("gpio write 27 0") - # system("gpio write 0 0") - # system("gpio write 2 0") + system("gpio write 0 1") + system("gpio write 2 1") system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") From 79de1cc0b5743d9b8278c7d3d38b4e64fe7363e6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:44:14 -0500 Subject: [PATCH 0466/1744] Update dtmf_aprs_cc.py fix indent --- dtmf_aprs_cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 0fdd0351..327bb53d 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -161,7 +161,7 @@ if __name__ == "__main__": # GPIO.output(txLed, 0) # GPIO.output(powerPin, 0) system("gpio write 27 0") - system("gpio write 0 1") + system("gpio write 0 1") system("gpio write 2 1") system("sudo systemctl stop transmit") From 55261885bebca433cbd2d8abad910298b5209fe0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Feb 2026 15:47:40 -0500 Subject: [PATCH 0467/1744] Update dtmf_aprs_cc.py only turn transmit LEDs off --- dtmf_aprs_cc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 327bb53d..18ed491f 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -160,9 +160,9 @@ if __name__ == "__main__": # GPIO.output(txLed, 0) # GPIO.output(powerPin, 0) - system("gpio write 27 0") - system("gpio write 0 1") - system("gpio write 2 1") + system("gpio write 27 1") + system("gpio write 0 0") + system("gpio write 2 0") system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") From c428b7c32eab9482fc8119f67c593141a2e494a9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Feb 2026 14:02:06 -0500 Subject: [PATCH 0468/1744] Update install add Bullseye /boot changes --- install | 322 ++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 208 insertions(+), 114 deletions(-) diff --git a/install b/install index 69317527..39f769f2 100755 --- a/install +++ b/install @@ -2,19 +2,218 @@ echo -e "\ninstallation script for CubeSatSim v2.2\n" - if [[ $(grep '12.' /etc/debian_version) ]]; then - echo "Installing on Debian 12 (Bookworm)" - else - echo "The OS is not Debian 12 (Bookworm)!" - echo "Installation is not likely to work." - echo "It is recommended you start with" - echo "Bookworm as your OS." - echo - sleep 10 + if [[ $(grep '11.' /etc/debian_version) ]]; then + echo "Installing on Debian 11 (Bullseye)" + + sudo cp /boot/config.txt /boot/config.txt.0 + + sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 + + + sudo raspi-config nonint do_i2c 0 + + sudo raspi-config nonint do_camera 0 + + sudo raspi-config nonint do_legacy 0 + + #if [ "$1" = "u" ]; then + #fi + + ## sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt + + + sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt + + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt + + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then + echo "dtoverlay=i2c-gpio already in /boot/config.txt" + else + echo "adding dtoverlay=i2c-gpio to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt' + fi + + if [[ $(grep 'enable_uart=1' /boot/config.txt) ]]; then + echo "enable_uart=1 already in /boot/config.txt" + else + echo "adding enable_uart=1 to /boot/config.txt" + sudo sh -c 'echo "\nenable_uart=1" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=disable-bt' /boot/config.txt) ]]; then + echo "dtoverlay=disable-bt already in /boot/config.txt" + else + echo "adding dtoverlay=disable-bt to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then + echo "dtoverlay=dwc2 aalready in /boot/config.txt" + else + echo "adding dtoverlay=dwc2 to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + fi + + if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then + echo "modules-load=dwc2,g_ether already in /boot/cmdline.txt" + else + echo "adding modules-load=dwc2,g_ether to /boot/cmdline.txt" + sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt + fi + + if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then + echo "dtparam=audio=on already in /boot/config.txt" + else + echo "adding dtparam=audio=on to /boot/config.txt" + sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then + echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" + else + echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then + echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" + else + echo "adding to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' + fi + + if [[ $(grep 'disable_splash=1 ' /boot/config.txt) ]]; then + echo "disable_splash=1 already in /boot/config.txt" + else + echo "adding to /boot/config.txt" + sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' + fi + + if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then + echo "boot_delay=0 already in /boot/config.txt" + else + echo "adding to /boot/config.txt" + sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' + fi + + if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi + + sudo sh -c 'echo "\n" >> /boot/config.txt' fi if [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Bookworm detected, installation continuing." + + sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 + + sudo cp /boot/firmware/cmdline.txt /boot/firmware/cmdline.txt.0 + + + sudo raspi-config nonint do_i2c 0 + + sudo raspi-config nonint do_camera 0 + + sudo raspi-config nonint do_legacy 0 + + #if [ "$1" = "u" ]; then + #fi + + ## sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt + + + sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt + + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt + + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=i2c-gpio to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'enable_uart=1' /boot/firmware/config.txt) ]]; then + echo "enable_uart=1 already in /boot/firmware/config.txt" + else + echo "adding enable_uart=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\nenable_uart=1" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=disable-bt' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=disable-bt already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=disable-bt to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=dwc2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=dwc2 aalready in /boot/firmware/config.txt" + else + echo "adding dtoverlay=dwc2 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'modules-load=dwc2,g_ether' /boot/firmware/cmdline.txt) ]]; then + echo "modules-load=dwc2,g_ether already in /boot/firmware/cmdline.txt" + else + echo "adding modules-load=dwc2,g_ether to /boot/firmware/cmdline.txt" + sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/firmware/cmdline.txt + fi + + if [[ $(grep 'dtparam=audio=on' /boot/firmware/config.txt) ]]; then + echo "dtparam=audio=on already in /boot/firmware/config.txt" + else + echo "adding dtparam=audio=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=audremap,enable_jack=on already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=audremap,enable_jack=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=pwm,pin=18,func=2 already in /boot/firmware/config.txt" + else + echo "adding to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'disable_splash=1 ' /boot/firmware/config.txt) ]]; then + echo "disable_splash=1 already in /boot/firmware/config.txt" + else + echo "adding disable_splash=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndisable_splash=1" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'boot_delay=0' /boot/firmware/config.txt) ]]; then + echo "boot_delay=0 already in /boot/firmware/config.txt" + else + echo "adding boot_delay=0 to /boot/firmware/config.txt" + sudo sh -c 'echo "\nboot_delay=0" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'camera_auto_detect=1' /boot/firmware/config.txt) ]]; then + echo "camera_auto_detect=1 already in /boot/firmware/config.txt" + else + echo "adding camera_auto_detect=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ncamera_auto_detect=1" >> /boot/firmware/config.txt' + fi + + if ! grep -q force_turbo=1 /boot/firmware/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/firmware/config.txt'; fi + + sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' + else echo "Your Pi OS version is not Bookworm." echo "The software installation will likely not work." @@ -195,111 +394,6 @@ sudo systemctl enable command sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf -sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 - -sudo cp /boot/firmware/cmdline.txt /boot/firmware/cmdline.txt.0 - - -sudo raspi-config nonint do_i2c 0 - -sudo raspi-config nonint do_camera 0 - -sudo raspi-config nonint do_legacy 0 - -#if [ "$1" = "u" ]; then -#fi - -## sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - - - sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 - - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 - - sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt - - if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then - echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" - else - echo "adding dtoverlay=i2c-gpio to /boot/firmware/config.txt" - sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'enable_uart=1' /boot/firmware/config.txt) ]]; then - echo "enable_uart=1 already in /boot/firmware/config.txt" - else - echo "adding enable_uart=1 to /boot/firmware/config.txt" - sudo sh -c 'echo "\nenable_uart=1" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'dtoverlay=disable-bt' /boot/firmware/config.txt) ]]; then - echo "dtoverlay=disable-bt already in /boot/firmware/config.txt" - else - echo "adding dtoverlay=disable-bt to /boot/firmware/config.txt" - sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'dtoverlay=dwc2' /boot/firmware/config.txt) ]]; then - echo "dtoverlay=dwc2 aalready in /boot/firmware/config.txt" - else - echo "adding dtoverlay=dwc2 to /boot/firmware/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'modules-load=dwc2,g_ether' /boot/firmware/cmdline.txt) ]]; then - echo "modules-load=dwc2,g_ether already in /boot/firmware/cmdline.txt" - else - echo "adding modules-load=dwc2,g_ether to /boot/firmware/cmdline.txt" - sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/firmware/cmdline.txt - fi - - if [[ $(grep 'dtparam=audio=on' /boot/firmware/config.txt) ]]; then - echo "dtparam=audio=on already in /boot/firmware/config.txt" - else - echo "adding dtparam=audio=on to /boot/firmware/config.txt" - sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/firmware/config.txt) ]]; then - echo "dtoverlay=audremap,enable_jack=on already in /boot/firmware/config.txt" - else - echo "adding dtoverlay=audremap,enable_jack=on to /boot/firmware/config.txt" - sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/firmware/config.txt) ]]; then - echo "dtoverlay=pwm,pin=18,func=2 already in /boot/firmware/config.txt" - else - echo "adding to /boot/firmware/config.txt" - sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'disable_splash=1 ' /boot/firmware/config.txt) ]]; then - echo "disable_splash=1 already in /boot/firmware/config.txt" - else - echo "adding disable_splash=1 to /boot/firmware/config.txt" - sudo sh -c 'echo "\ndisable_splash=1" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'boot_delay=0' /boot/firmware/config.txt) ]]; then - echo "boot_delay=0 already in /boot/firmware/config.txt" - else - echo "adding boot_delay=0 to /boot/firmware/config.txt" - sudo sh -c 'echo "\nboot_delay=0" >> /boot/firmware/config.txt' - fi - - if [[ $(grep 'camera_auto_detect=1' /boot/firmware/config.txt) ]]; then - echo "camera_auto_detect=1 already in /boot/firmware/config.txt" - else - echo "adding camera_auto_detect=1 to /boot/firmware/config.txt" - sudo sh -c 'echo "\ncamera_auto_detect=1" >> /boot/firmware/config.txt' - fi - - if ! grep -q force_turbo=1 /boot/firmware/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/firmware/config.txt'; fi - -sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' sudo sed -i 's/DEVICES=""/DEVICES="\/dev\/serial0"/g' /etc/default/gpsd From ac8a348c0d2bed18518930d5c95a064ebb27bd23 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Feb 2026 14:03:27 -0500 Subject: [PATCH 0469/1744] Update install add prints --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index 39f769f2..74ccca77 100755 --- a/install +++ b/install @@ -82,21 +82,21 @@ echo -e "\ninstallation script for CubeSatSim v2.2\n" if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" else - echo "adding to /boot/config.txt" + echo "adding overlay=pwm,pin=18,func=2 to /boot/config.txt" sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' fi if [[ $(grep 'disable_splash=1 ' /boot/config.txt) ]]; then echo "disable_splash=1 already in /boot/config.txt" else - echo "adding to /boot/config.txt" + echo "adding disable_splash=1 to /boot/config.txt" sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' fi if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then echo "boot_delay=0 already in /boot/config.txt" else - echo "adding to /boot/config.txt" + echo "adding boot_delay=0 to /boot/config.txt" sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' fi From 5e9ec0b14c38bb212866a0d8b8e80ff31607e3a0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Feb 2026 14:05:39 -0500 Subject: [PATCH 0470/1744] Update install moved libtiff6 install --- install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install b/install index 74ccca77..9a71adb3 100755 --- a/install +++ b/install @@ -305,7 +305,10 @@ sudo dpkg -i debian-template/wiringpi-2.61-1.deb cd #changed to python3-smbus -sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff6 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev + +sudo apt install -y libtiff6 + +sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev sudo pip3 install --upgrade setuptools From 7bce0305183856cda0a88a5d6369e9083cf67c02 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Feb 2026 14:20:37 -0500 Subject: [PATCH 0471/1744] Update install adding copying of sstv still images --- install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install b/install index 9a71adb3..02c8b158 100755 --- a/install +++ b/install @@ -373,6 +373,12 @@ cd PiSSTVpp make pisstvpp +echo "Copying SSTV image 1" +cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg + +echo "Copying SSTV image 2" +cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg + cd git clone https://github.com/alanbjohnston/rpitx.git From 28a0e5dc56103186550e5c905838127011552e37 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Feb 2026 09:15:04 -0500 Subject: [PATCH 0472/1744] Update transmit.py add os_status print --- transmit.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/transmit.py b/transmit.py index f319397b..f4454929 100644 --- a/transmit.py +++ b/transmit.py @@ -461,6 +461,22 @@ if __name__ == "__main__": # card = "Headphones" # default using pcm audio output of Pi Zero card = "Device" # using USB sound card for audio output + query = ["grep", "bookworm", "/etc/os-release"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + os_status = result.stdout.strip() + print(f"Output of the command (stdout): {os_status}") + except subprocess.CalledProcessError as e: +# print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + os_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + if os_status != "bookworm": + os_status = "bullseye" + print (os_status) + query = ["sudo", "systemctl", "is-active", "gpsd.socket"] try: result = subprocess.run(query, capture_output=True, text=True, check=True) From bddc7e9d92b652a936e40bb0e38a2465da19c33a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Feb 2026 09:21:53 -0500 Subject: [PATCH 0473/1744] Update transmit.py add camera if --- transmit.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index f4454929..39173317 100644 --- a/transmit.py +++ b/transmit.py @@ -134,11 +134,15 @@ def increment_mode(): def camera_photo(): global cam_fail + global os_status sim_failure_check() system("sudo rm /home/pi/CubeSatSim/camera_out.jpg") stored_image = False try: - system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + if os_status == "bookworm": + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + else: + system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Photo taken") @@ -461,7 +465,7 @@ if __name__ == "__main__": # card = "Headphones" # default using pcm audio output of Pi Zero card = "Device" # using USB sound card for audio output - query = ["grep", "bookworm", "/etc/os-release"] + query = ["grep", "bullseye", "/etc/os-release"] try: result = subprocess.run(query, capture_output=True, text=True, check=True) print(f"Command run was: {query}") @@ -473,8 +477,8 @@ if __name__ == "__main__": os_status = e.stdout.strip() print(f"Output of the command (stdout): {e.stdout}") # print(f"Error output of the command (stderr): {e.stderr}") - if os_status != "bookworm": - os_status = "bullseye" + if os_status != "bullseye": + os_status = "bookworm" print (os_status) query = ["sudo", "systemctl", "is-active", "gpsd.socket"] From 4de06e4868741f5add82ca51cf463294e48deacd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Feb 2026 09:31:54 -0500 Subject: [PATCH 0474/1744] Update transmit.py fix camera check --- transmit.py | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/transmit.py b/transmit.py index 39173317..bc7cdf1f 100644 --- a/transmit.py +++ b/transmit.py @@ -178,6 +178,10 @@ def camera_photo(): draw.text((110, 10), telem_string, font=font2, fill='white') # was 120 img.save(file) + return True + else: + return False + print("CubeSatSim v2.2 transmit.py starting...") pd = 21 @@ -682,24 +686,17 @@ if __name__ == "__main__": print("SSTV") # command_control_check() output (ptt, 1) - output(pd, 1) - try: -# from picamera import PiCamera -# from pysstv.sstv import SSTV -# camera = PiCamera() - print("Testing for camera") - system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") - f = open("/home/pi/CubeSatSim/camera_out.jpg") - f.close() - print("Camera present") + output(pd, 1) + + print("Testing for camera") + if camera_photo(): camera_present = 1 -# camera.close() - except: + print("camera present") + else: + camera_present = 0 print("No camera available") print(" -> if camera plugged in, is software enabled?") - camera_present = 0 - -# while 1: + try: output(txLed, txLedOff) except: From 6eca0273c400f7ef6ba8d28153a63b5ffa68823d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Feb 2026 09:40:03 -0500 Subject: [PATCH 0475/1744] Update transmit.py fix OS test --- transmit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index bc7cdf1f..edb5d9c6 100644 --- a/transmit.py +++ b/transmit.py @@ -481,8 +481,10 @@ if __name__ == "__main__": os_status = e.stdout.strip() print(f"Output of the command (stdout): {e.stdout}") # print(f"Error output of the command (stderr): {e.stderr}") - if os_status != "bullseye": + if os_status != "VERSION_CODENAME=bullseye": os_status = "bookworm" + else: + os_status = "bullseye" print (os_status) query = ["sudo", "systemctl", "is-active", "gpsd.socket"] From 2d95f272e86b7923209b8dc0b720dca7d9e9fdd0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Feb 2026 09:41:52 -0500 Subject: [PATCH 0476/1744] Update transmit.py fix bullseye test --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index edb5d9c6..9ad167f0 100644 --- a/transmit.py +++ b/transmit.py @@ -469,7 +469,7 @@ if __name__ == "__main__": # card = "Headphones" # default using pcm audio output of Pi Zero card = "Device" # using USB sound card for audio output - query = ["grep", "bullseye", "/etc/os-release"] + query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] try: result = subprocess.run(query, capture_output=True, text=True, check=True) print(f"Command run was: {query}") From bc9739fb02b581548889f90aa37dfcc4d21b5d2f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 09:24:33 -0500 Subject: [PATCH 0477/1744] Update transmit.py change tx and power LED to wiringpi --- transmit.py | 58 ++++++++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/transmit.py b/transmit.py index 9ad167f0..a2456d64 100644 --- a/transmit.py +++ b/transmit.py @@ -65,9 +65,9 @@ def battery_saver_check(): def blink(times): powerPin = 16 for i in range(times): - GPIO.output(powerPin, 0) # blink two times + system("gpio -g write " + str(powerPin) + " 0") # blink two times sleep(0.1) - GPIO.output(powerPin, 1) + system("gpio -g write " + str(powerPin) + " 1") sleep(0.1) def increment_mode(): @@ -115,12 +115,12 @@ def increment_mode(): print(".mode file written") GPIO.setwarnings(False) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) + system("gpio -g write " + str(txLed) + " 0") + system("gpio -g write " + str(powerPin) + " 0") print("sudo reboot -h now") GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.output(powerPin, 0); + system("gpio -g mode " + str(powerPin) + " out") + system("gpio -g write " + str(powerPin) + " 0"); # system("reboot -h now") # release = True; @@ -200,11 +200,11 @@ try: GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(green, GPIO.OUT) - GPIO.output(powerPin, 1) + system("gpio -g write " + str(powerPin) + " 1") GPIO.setup(27, GPIO.IN) except: - print("GPIO setup problem") - system("gpio -g mode 27 IN") + print("gpio -g setup problem") + system("gpio -g -g mode 27 IN") try: GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) except: @@ -222,13 +222,13 @@ else: print("No LPF") -# GPIO.setup(txLed, GPIO.OUT) +# system("gpio -g mode " + str(txLed) + " out") # output(txLed, txLedOff) GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 GPIO.setwarnings(False) try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") except: print("Can't set txLed") @@ -462,7 +462,7 @@ if __name__ == "__main__": try: print(txLed) print(txLedOn) - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") except: print("Can't set txLed") @@ -534,7 +534,7 @@ if __name__ == "__main__": if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -570,7 +570,7 @@ if __name__ == "__main__": if (mode == 'a'): print("AFSK") else: -# GPIO.output(powerPin, 0) +# system("gpio -g write " + str(powerPin) + " 0") print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: @@ -589,7 +589,7 @@ if __name__ == "__main__": if (command_tx == True): GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -652,7 +652,7 @@ if __name__ == "__main__": ## chan = chan + 1 if (command_tx == True): GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") try: output(txLed, txLedOn) except: @@ -716,7 +716,7 @@ if __name__ == "__main__": print ("Sending SSTV image") GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -755,7 +755,7 @@ if __name__ == "__main__": print ("Sending SSTV image") GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -798,7 +798,7 @@ if __name__ == "__main__": print ("Sending SSTV image") GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -841,7 +841,7 @@ if __name__ == "__main__": print ("Sending SSTV image") try: GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -877,7 +877,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -912,7 +912,7 @@ if __name__ == "__main__": output(ptt, 1) try: GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") except: print("Can't set txLed") @@ -938,7 +938,7 @@ if __name__ == "__main__": if (command_tx == True): GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -981,12 +981,12 @@ if __name__ == "__main__": output(ptt, 1) GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") except: print("Can't set txLed") -# GPIO.setup(powerPin, GPIO.OUT) +# system("gpio -g mode " + str(powerPin) + " out") GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected -# GPIO.output(powerPin, 1) # was 0 +# system("gpio -g write " + str(powerPin) + " 1") # was 0 # txf = float(tx) - 288.9 # print("Transmit frequency: ",txf) if (command_tx != True): @@ -998,7 +998,7 @@ if __name__ == "__main__": print("Carrier detected, starting repeater") GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") @@ -1029,7 +1029,7 @@ if __name__ == "__main__": try: GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") except: print("Can't set txLed") @@ -1050,7 +1050,7 @@ if __name__ == "__main__": if (command_tx == True): try: GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) + system("gpio -g mode " + str(txLed) + " out") output(txLed, txLedOn) except: print("Can't set txLed") From de5839c5d5ae16f0975ca78c3d3008ac689d22bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 09:31:03 -0500 Subject: [PATCH 0478/1744] fix -g -g --- transmit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index a2456d64..0869d1eb 100644 --- a/transmit.py +++ b/transmit.py @@ -194,17 +194,17 @@ powerPin = 16 command_tx = True try: + system("gpio -g write " + str(powerPin) + " 1") GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(green, GPIO.OUT) - system("gpio -g write " + str(powerPin) + " 1") GPIO.setup(27, GPIO.IN) except: - print("gpio -g setup problem") - system("gpio -g -g mode 27 IN") + print("gpio setup problem") + system("gpio -g mode 27 IN") try: GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) except: From 7a09dc974c2415e0c444cf98cce3e1a0c8e88dae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 09:34:42 -0500 Subject: [PATCH 0479/1744] Update transmit.py replace remaining GPIO --- transmit.py | 60 ++++++++++++++++++++++++++--------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/transmit.py b/transmit.py index 0869d1eb..e1c22304 100644 --- a/transmit.py +++ b/transmit.py @@ -223,7 +223,7 @@ else: # system("gpio -g mode " + str(txLed) + " out") -# output(txLed, txLedOff) +# system("gpio -g write " + str(txLed) + " 0") ) GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 GPIO.setwarnings(False) @@ -248,9 +248,9 @@ else: # txc = False # forcing it off try: - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") sleep(1) - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") @@ -535,7 +535,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") print("Transmit CW ID") @@ -549,7 +549,7 @@ if __name__ == "__main__": else: system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") @@ -590,7 +590,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") # output(pd, 1) @@ -619,7 +619,7 @@ if __name__ == "__main__": # output (ptt, 1) # output(pd, 0) try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") system("sudo rm /home/pi/CubeSatSim/ready") @@ -654,7 +654,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 system("gpio -g mode " + str(txLed) + " out") try: - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") @@ -673,7 +673,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") @@ -700,7 +700,7 @@ if __name__ == "__main__": print(" -> if camera plugged in, is software enabled?") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") # output (ptt, 1) @@ -717,7 +717,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") # battery_saver_check() @@ -736,7 +736,7 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") @@ -756,7 +756,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") # battery_saver_check() @@ -775,7 +775,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") # output (ptt, 1) @@ -799,7 +799,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") @@ -818,7 +818,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") # output (ptt, 1) @@ -842,7 +842,7 @@ if __name__ == "__main__": try: GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") # battery_saver_check() @@ -860,7 +860,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") # output (ptt, 1) @@ -878,7 +878,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") @@ -894,7 +894,7 @@ if __name__ == "__main__": else: sleep(60) try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") # output (ptt, 1) @@ -925,21 +925,21 @@ if __name__ == "__main__": while 1: # print ("LED on") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") sleep(0.4) # if (command_tx == False): -# output(txLed, txLedOn) +# system("gpio -g write " + str(txLed) + " 1") # sleep(0.03) -# output(txLed, txLedOff) +# system("gpio -g write " + str(txLed) + " 0") ) # command_control_check() if (command_tx == True): GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") # print(txLed) @@ -999,7 +999,7 @@ if __name__ == "__main__": GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 try: system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") @@ -1009,7 +1009,7 @@ if __name__ == "__main__": sleep(1) print("No carrier detected, stopping repeater") try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") system("sudo rpitx -i null > /dev/null 2>&1") @@ -1038,20 +1038,20 @@ if __name__ == "__main__": print("Turning LED on/off and listening for carrier") while 1: try: - output(txLed, txLedOff) + system("gpio -g write " + str(txLed) + " 0") ) except: print("Can't set txLed") sleep(0.4) # if (command_tx == False): -# output(txLed, txLedOn) +# system("gpio -g write " + str(txLed) + " 1") # sleep(0.03) -# output(txLed, txLedOff) +# system("gpio -g write " + str(txLed) + " 0") ) # command_control_check() if (command_tx == True): try: GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 system("gpio -g mode " + str(txLed) + " out") - output(txLed, txLedOn) + system("gpio -g write " + str(txLed) + " 1") except: print("Can't set txLed") # print(txLed) From 37711b6a7772169b54c95c6a07ca48b848340fa2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 09:36:05 -0500 Subject: [PATCH 0480/1744] Update transmit.py remove extra ) --- transmit.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/transmit.py b/transmit.py index e1c22304..8ede6736 100644 --- a/transmit.py +++ b/transmit.py @@ -223,7 +223,7 @@ else: # system("gpio -g mode " + str(txLed) + " out") -# system("gpio -g write " + str(txLed) + " 0") ) +# system("gpio -g write " + str(txLed) + " 0") GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 GPIO.setwarnings(False) @@ -250,7 +250,7 @@ else: try: system("gpio -g write " + str(txLed) + " 1") sleep(1) - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") @@ -549,7 +549,7 @@ if __name__ == "__main__": else: system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") @@ -619,7 +619,7 @@ if __name__ == "__main__": # output (ptt, 1) # output(pd, 0) try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") system("sudo rm /home/pi/CubeSatSim/ready") @@ -673,7 +673,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") @@ -700,7 +700,7 @@ if __name__ == "__main__": print(" -> if camera plugged in, is software enabled?") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") # output (ptt, 1) @@ -736,7 +736,7 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") @@ -775,7 +775,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") # output (ptt, 1) @@ -818,7 +818,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") # output (ptt, 1) @@ -860,7 +860,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") # output (ptt, 1) @@ -894,7 +894,7 @@ if __name__ == "__main__": else: sleep(60) try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") # output (ptt, 1) @@ -925,14 +925,14 @@ if __name__ == "__main__": while 1: # print ("LED on") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") sleep(0.4) # if (command_tx == False): # system("gpio -g write " + str(txLed) + " 1") # sleep(0.03) -# system("gpio -g write " + str(txLed) + " 0") ) +# system("gpio -g write " + str(txLed) + " 0") # command_control_check() if (command_tx == True): @@ -1009,7 +1009,7 @@ if __name__ == "__main__": sleep(1) print("No carrier detected, stopping repeater") try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") system("sudo rpitx -i null > /dev/null 2>&1") @@ -1038,14 +1038,14 @@ if __name__ == "__main__": print("Turning LED on/off and listening for carrier") while 1: try: - system("gpio -g write " + str(txLed) + " 0") ) + system("gpio -g write " + str(txLed) + " 0") except: print("Can't set txLed") sleep(0.4) # if (command_tx == False): # system("gpio -g write " + str(txLed) + " 1") # sleep(0.03) -# system("gpio -g write " + str(txLed) + " 0") ) +# system("gpio -g write " + str(txLed) + " 0") # command_control_check() if (command_tx == True): try: From 1e97592a120be0533ed085b1d03cf7fa0c23f2e5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 09:39:48 -0500 Subject: [PATCH 0481/1744] Update transmit.py change back to txLed 27 --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 8ede6736..9a249d82 100644 --- a/transmit.py +++ b/transmit.py @@ -211,8 +211,8 @@ except: print("Can't set txLed") transmit = False -# txLed = 27 -txLed = 17 +txLed = 27 +# txLed = 17 txLedOn = 1 txLedOff = 0 if GPIO.input(12) == False: From 6d3aae36490cd2aacfdb2509c462549a97445a5f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 10:11:19 -0500 Subject: [PATCH 0482/1744] Update main.c add os test --- main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 51959a58..eb12ce98 100644 --- a/main.c +++ b/main.c @@ -322,7 +322,14 @@ int main(int argc, char * argv[]) { } else { snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); } - + + FILE * file4 = popen("cat /etc/os-release", "r"); + fgets(cmdbuffer, 1000, file4); + printf("os-release: %s\n", cmdbuffer); + char os_present[] = "bookworm"; + // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); + int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; + printf(os_status); // check for camera // char cmdbuffer1[1000]; @@ -331,6 +338,8 @@ int main(int argc, char * argv[]) { char camera_present[] = "supported=1 detected=1"; // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; + + printf("Camera result:%s camera: %d \n", & cmdbuffer, camera); pclose(file4); From 73ea641ab962b20bf55ab34c4f02bf220d28328f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 10:12:38 -0500 Subject: [PATCH 0483/1744] Update main.c change file desc --- main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index eb12ce98..e80ae81f 100644 --- a/main.c +++ b/main.c @@ -323,13 +323,14 @@ int main(int argc, char * argv[]) { snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); } - FILE * file4 = popen("cat /etc/os-release", "r"); - fgets(cmdbuffer, 1000, file4); + FILE * os-test = popen("cat /etc/os-release", "r"); + fgets(cmdbuffer, 1000, os-test); printf("os-release: %s\n", cmdbuffer); char os_present[] = "bookworm"; // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; - printf(os_status); + printf(os_status); + pclose (os-test); // check for camera // char cmdbuffer1[1000]; From a63c5aa656ee4a60124a2586509cffb405299923 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 10:13:49 -0500 Subject: [PATCH 0484/1744] Update main.c change file desc name --- main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index e80ae81f..94561044 100644 --- a/main.c +++ b/main.c @@ -323,14 +323,14 @@ int main(int argc, char * argv[]) { snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); } - FILE * os-test = popen("cat /etc/os-release", "r"); - fgets(cmdbuffer, 1000, os-test); - printf("os-release: %s\n", cmdbuffer); + FILE * os_test = popen("cat /etc/os-release", "r"); + fgets(cmdbuffer, 1000, os_test); + printf("os-release: %s\n" cmdbuffer); char os_present[] = "bookworm"; // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; printf(os_status); - pclose (os-test); + pclose (os_test); // check for camera // char cmdbuffer1[1000]; From 752ecae33736408c68663a0c6e89cb9b50efac90 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 10:14:22 -0500 Subject: [PATCH 0485/1744] Update main.c missing , --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 94561044..259f5b28 100644 --- a/main.c +++ b/main.c @@ -325,7 +325,7 @@ int main(int argc, char * argv[]) { FILE * os_test = popen("cat /etc/os-release", "r"); fgets(cmdbuffer, 1000, os_test); - printf("os-release: %s\n" cmdbuffer); + printf("os-release: %s\n", cmdbuffer); char os_present[] = "bookworm"; // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; From 2a73e5469311cc841fb5933662a55c5e17e1c835 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 10:16:35 -0500 Subject: [PATCH 0486/1744] Update main.c fix printf --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 259f5b28..bbbe2151 100644 --- a/main.c +++ b/main.c @@ -329,8 +329,8 @@ int main(int argc, char * argv[]) { char os_present[] = "bookworm"; // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; - printf(os_status); - pclose (os_test); + printf("os_status: %d\n", os_status); + pclose(os_test); // check for camera // char cmdbuffer1[1000]; From b70ea5c993d56dbcfcdcd8ad9576ee7d71458667 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 13:36:41 -0500 Subject: [PATCH 0487/1744] Update main.c tes for camera based on os --- main.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/main.c b/main.c index bbbe2151..748c9853 100644 --- a/main.c +++ b/main.c @@ -331,18 +331,27 @@ int main(int argc, char * argv[]) { int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; printf("os_status: %d\n", os_status); pclose(os_test); - - // check for camera -// char cmdbuffer1[1000]; - FILE * file4 = popen("vcgencmd get_camera", "r"); - fgets(cmdbuffer, 1000, file4); - char camera_present[] = "supported=1 detected=1"; - // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); - camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; + // check for camera + FILE *cam_test; + if (os_status == ON) { // bookworm + cam_test = popen("sudo rpicam-hello --list-cameras | grep 'No cameras available!'", "r"); + fgets(cmdbuffer, 1000, cam_test); + char no_camera_present[] = "No cameras available!"; + // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); + camera = (strstr( (const char *)& cmdbuffer, no_camera_present) != NULL) ? OFF : ON; + } + else // bullseye + { + cam_test = popen("vcgencmd get_camera", "r"); + fgets(cmdbuffer, 1000, cam_test); + char camera_present[] = "supported=1 detected=1"; + // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); + camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; + } printf("Camera result:%s camera: %d \n", & cmdbuffer, camera); - pclose(file4); + pclose(cam_test); #ifdef DEBUG_LOGGING printf("INFO: I2C bus status 0: %d 1: %d 3: %d camera: %d\n", i2c_bus0, i2c_bus1, i2c_bus3, camera); From 7559f63f47144181286012c8a39d3673a3a6d58e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Feb 2026 13:50:47 -0500 Subject: [PATCH 0488/1744] Update main.c cleanup --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 748c9853..573ccb5f 100644 --- a/main.c +++ b/main.c @@ -350,7 +350,7 @@ int main(int argc, char * argv[]) { camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; } - printf("Camera result:%s camera: %d \n", & cmdbuffer, camera); + printf("Camera result: %s camera: %d \n", & cmdbuffer, camera); pclose(cam_test); #ifdef DEBUG_LOGGING From ad3a12e4a16a14ec28e89f794840a135f9310855 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 08:22:55 -0500 Subject: [PATCH 0489/1744] Refactor GPIO handling with output and input functions Refactor GPIO handling by creating output and input functions. Replace direct GPIO calls with these functions for better abstraction and error handling. --- transmit.py | 402 ++++++++++++++++++++++------------------------------ 1 file changed, 168 insertions(+), 234 deletions(-) diff --git a/transmit.py b/transmit.py index 9a249d82..7353d1ad 100644 --- a/transmit.py +++ b/transmit.py @@ -1,7 +1,7 @@ #!/usr/bin/env python -import RPi.GPIO as GPIO -from RPi.GPIO import output +#import RPi.GPIO as GPIO +#from RPi.GPIO import output #import subprocess import time from time import sleep @@ -14,6 +14,41 @@ import serial import random import subprocess +def output(pin, value): + command = "gpio -g write " + str(pin) + " " + str(value) + system(command) + +def input(pin): + # command = "gpio -g read " + str(pin) + query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + print("Sucess!") + print(f"Output of the command (stdout): {result}") + return result + except subprocess.CalledProcessError as e: + print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + print(f"Output of the command (stdout): {e.stdout}") + print(f"Error output of the command (stderr): {e.stderr}") + return 0 + +def setup(pin, config): + if config == "in" or config == "out" or config == "up" or config == "down": + command = "gpio -g mode " + str(powerPin) + " " + config + system(command) + else + print(f"Unknown GPIO setup configuration: {config}") + +def blink(times): + powerPin = 16 + for i in range(times): + system("gpio -g write " + str(powerPin) + " 0") # blink two times + sleep(0.1) + system("gpio -g write " + str(powerPin) + " 1") + sleep(0.1) + def sim_failure_check(): try: global card @@ -46,7 +81,6 @@ def sim_failure_check(): except: print("No failure mode") card = "Headphones" -# card = "Device" if sim_config: sim_mode = True @@ -65,9 +99,9 @@ def battery_saver_check(): def blink(times): powerPin = 16 for i in range(times): - system("gpio -g write " + str(powerPin) + " 0") # blink two times + output(powerPin, 0) # blink sleep(0.1) - system("gpio -g write " + str(powerPin) + " 1") + output(powerPin, 1) sleep(0.1) def increment_mode(): @@ -114,13 +148,13 @@ def increment_mode(): file.close() print(".mode file written") - GPIO.setwarnings(False) - system("gpio -g write " + str(txLed) + " 0") - system("gpio -g write " + str(powerPin) + " 0") +# GPIO.setwarnings(False) + output(txLed, 0) + output(powerPin, 0) print("sudo reboot -h now") - GPIO.setwarnings(False) - system("gpio -g mode " + str(powerPin) + " out") - system("gpio -g write " + str(powerPin) + " 0"); +# GPIO.setwarnings(False) + setup(powerPin, "out") + output(powerPin, 0); # system("reboot -h now") # release = True; @@ -181,7 +215,7 @@ def camera_photo(): return True else: return False - + print("CubeSatSim v2.2 transmit.py starting...") pd = 21 @@ -193,70 +227,54 @@ powerPin = 16 command_tx = True -try: - system("gpio -g write " + str(powerPin) + " 1") - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) - GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) - GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) - GPIO.setup(green, GPIO.OUT) - GPIO.setup(27, GPIO.IN) -except: - print("gpio setup problem") - system("gpio -g mode 27 IN") -try: - GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) -except: - print("Can't set txLed") +GPIO.setmode(GPIO.BCM) +GPIO.setwarnings(False) +setup(13, "up") +setup(12, "up") +setup(27, "up") +setup(txc_pin, "up") +setup(green, "out") +output(powerPin, 1) transmit = False txLed = 27 -# txLed = 17 -txLedOn = 1 -txLedOff = 0 -if GPIO.input(12) == False: +1 = 1 +0 = 0 +if input(12) == False: print("LPF present") transmit = True else: print("No LPF") -# system("gpio -g mode " + str(txLed) + " out") -# system("gpio -g write " + str(txLed) + " 0") +# GPIO.setup(txLed, GPIO.OUT) +# output(txLed, 0) -GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 -GPIO.setwarnings(False) -try: - system("gpio -g mode " + str(txLed) + " out") -except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 +# GPIO.setwarnings(False) +setup(txLed, "out") -GPIO.setup(pd, GPIO.OUT) +setup(pd, "out") #output(pd, 1) output(pd, 0) -GPIO.setup(ptt, GPIO.OUT) +setup(ptt, "out") output (ptt, 1) txc = False -if GPIO.input(txc_pin) == False: +if input(txc_pin) == False: print("TXC is present") txc = True; else: print("TXC not present") # txc = False # forcing it off - -try: - system("gpio -g write " + str(txLed) + " 1") - sleep(1) - system("gpio -g write " + str(txLed) + " 0") -except: - print("Can't set txLed") +output(txLed, 1) +sleep(1) +output(txLed, 0) battery_saver_check() -# print(txLedOn) +# print(1) print(txLed) # GPIO.setup(27, GPIO.OUT) # GPIO.output(27, 0) @@ -440,10 +458,10 @@ if __name__ == "__main__": try: f = open("/home/pi/CubeSatSim/command_control", "r") f.close() - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected - if GPIO.input(squelch) == False: +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) + setup(squelch, "up") ## pull up in case pin is not connected + if input(squelch) == False: print("squelch not set correctly, no command input!") else: if (mode != 'n') and (mode != 'x'): @@ -458,34 +476,13 @@ if __name__ == "__main__": print(callsign) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - try: - print(txLed) - print(txLedOn) - system("gpio -g mode " + str(txLed) + " out") - except: - print("Can't set txLed") - -# card = "Headphones" # default using pcm audio output of Pi Zero - card = "Device" # using USB sound card for audio output +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# print(txLed) +# print(1) + setup(txLed, "out") - query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] - try: - result = subprocess.run(query, capture_output=True, text=True, check=True) - print(f"Command run was: {query}") - os_status = result.stdout.strip() - print(f"Output of the command (stdout): {os_status}") - except subprocess.CalledProcessError as e: -# print(f"Command failed with return code: {e.returncode}") - print(f"Command run was: {e.cmd}") - os_status = e.stdout.strip() - print(f"Output of the command (stdout): {e.stdout}") -# print(f"Error output of the command (stderr): {e.stderr}") - if os_status != "VERSION_CODENAME=bullseye": - os_status = "bookworm" - else: - os_status = "bullseye" - print (os_status) + card = "Headphones" # default using pcm audio output of Pi Zero +# card = "Device" # using USB sound card for audio output query = ["sudo", "systemctl", "is-active", "gpsd.socket"] try: @@ -532,12 +529,9 @@ if __name__ == "__main__": print("Don't transmit CW ID since APRS HAB mode is active") else: if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) print("Transmit CW ID") status = "" if not no_command: @@ -548,10 +542,7 @@ if __name__ == "__main__": system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + output(txLed, 0) sleep(1) else: @@ -570,7 +561,7 @@ if __name__ == "__main__": if (mode == 'a'): print("AFSK") else: -# system("gpio -g write " + str(powerPin) + " 0") +# GPIO.output(powerPin, 0) print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: @@ -587,12 +578,9 @@ if __name__ == "__main__": system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # output(pd, 1) # output (ptt, 0) # sleep(.1) @@ -618,10 +606,7 @@ if __name__ == "__main__": sleep(0.1) # output (ptt, 1) # output(pd, 0) - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + output(txLed, 0) system("sudo rm /home/pi/CubeSatSim/ready") f.close() @@ -651,12 +636,9 @@ if __name__ == "__main__": system(command) ## chan = chan + 1 if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - system("gpio -g mode " + str(txLed) + " out") - try: - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) if (txc): sim_failure_check() @@ -672,10 +654,7 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + output(txLed, 0) # command_control_check() sleep(2) @@ -688,21 +667,28 @@ if __name__ == "__main__": print("SSTV") # command_control_check() output (ptt, 1) - output(pd, 1) - - print("Testing for camera") - if camera_photo(): + output(pd, 1) + try: +# from picamera import PiCamera +# from pysstv.sstv import SSTV +# camera = PiCamera() + print("Testing for camera") + if os_status == "bookworm": + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + else: + system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + f = open("/home/pi/CubeSatSim/camera_out.jpg") + f.close() + print("Camera present") camera_present = 1 - print("camera present") - else: - camera_present = 0 +# camera.close() + except: print("No camera available") print(" -> if camera plugged in, is software enabled?") - - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + camera_present = 0 + +# while 1: + output(txLed, 0) # output (ptt, 1) # output(pd, 0) if (camera_present == 1): @@ -714,12 +700,9 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): @@ -735,11 +718,8 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") - + output(txLed, 0) + # sleep(1) except: print("image 2 did not load - copy from CubeSatSim/sstv directory") @@ -753,12 +733,9 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): @@ -774,10 +751,8 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + + output(txLed, 0) # output (ptt, 1) # output(pd, 0) @@ -796,12 +771,9 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # battery_saver_check() @@ -817,10 +789,8 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(1) @@ -839,12 +809,9 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - try: - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): @@ -859,10 +826,8 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3") else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(10) @@ -875,12 +840,9 @@ if __name__ == "__main__": if (command_tx == True): # command_control_check() - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # battery_saver_check() @@ -893,10 +855,8 @@ if __name__ == "__main__": # output (pd, 0) else: sleep(60) - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(10) @@ -910,11 +870,9 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) - try: - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - system("gpio -g mode " + str(txLed) + " out") - except: - print("Can't set txLed") + +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 + setup(txLed, "out") if (command_tx == True): # system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &") @@ -924,26 +882,20 @@ if __name__ == "__main__": print("Initial image_id: " + str(image_id) + "\n") while 1: # print ("LED on") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + output(txLed, 0) sleep(0.4) # if (command_tx == False): -# system("gpio -g write " + str(txLed) + " 1") +# output(txLed, 1) # sleep(0.03) -# system("gpio -g write " + str(txLed) + " 0") +# output(txLed, 0) # command_control_check() if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # print(txLed) -# print(txLedOn) +# print(1) if (mode == 'b'): sleep(4.2) @@ -979,14 +931,11 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - except: - print("Can't set txLed") -# system("gpio -g mode " + str(powerPin) + " out") - GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected -# system("gpio -g write " + str(powerPin) + " 1") # was 0 +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 + setup(txLed, "out") +# GPIO.setup(powerPin, GPIO.OUT) + setup(squelch, "up") ## pull up in case pin is not connected +# GPIO.output(powerPin, 1) # was 0 # txf = float(tx) - 288.9 # print("Transmit frequency: ",txf) if (command_tx != True): @@ -994,24 +943,18 @@ if __name__ == "__main__": print("Ready to detect carrier") while True: - if (GPIO.input(squelch) == False) and (command_tx == True): + if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - try: - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") - while (GPIO.input(squelch) == False): + while (input(squelch) == False): sleep(1) print("No carrier detected, stopping repeater") - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + output(txLed, 0) system("sudo rpitx -i null > /dev/null 2>&1") system("sudo killall -9 arecord > /dev/null 2>&1") system("sudo killall -9 nc > /dev/null 2>&1") @@ -1026,36 +969,27 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) - - try: - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - system("gpio -g mode " + str(txLed) + " out") - except: - print("Can't set txLed") + +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 + setup(txLed, "out") if (command_tx == True): system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") print("Turning LED on/off and listening for carrier") while 1: - try: - system("gpio -g write " + str(txLed) + " 0") - except: - print("Can't set txLed") + output(txLed, 0) sleep(0.4) # if (command_tx == False): -# system("gpio -g write " + str(txLed) + " 1") +# output(txLed, 1) # sleep(0.03) -# system("gpio -g write " + str(txLed) + " 0") +# output(txLed, 0) # command_control_check() - if (command_tx == True): - try: - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - system("gpio -g mode " + str(txLed) + " out") - system("gpio -g write " + str(txLed) + " 1") - except: - print("Can't set txLed") + if (command_tx == True): +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 + setup(txLed, "out") + output(txLed, 1) # print(txLed) -# print(txLedOn) +# print(1) sleep(4.2) else: print("No Low Pass Filter so no telemetry transmit. See http://cubesatsim.org/wiki for instructions on how to build the LPF.") From ea2a63d515cb7d0f99fcc12c29aaf6455c4b7f1b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 08:30:28 -0500 Subject: [PATCH 0490/1744] missing : --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 7353d1ad..e18b0a96 100644 --- a/transmit.py +++ b/transmit.py @@ -38,7 +38,7 @@ def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": command = "gpio -g mode " + str(powerPin) + " " + config system(command) - else + else: print(f"Unknown GPIO setup configuration: {config}") def blink(times): From 10147585a96dadcdc1f2b70a3d3fd1194cdbc76b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 08:32:19 -0500 Subject: [PATCH 0491/1744] remove txLedOn and Off Removed unnecessary assignments for transmit variables. --- transmit.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/transmit.py b/transmit.py index e18b0a96..4bea6822 100644 --- a/transmit.py +++ b/transmit.py @@ -238,8 +238,6 @@ output(powerPin, 1) transmit = False txLed = 27 -1 = 1 -0 = 0 if input(12) == False: print("LPF present") transmit = True From e7b66a1a65dfc780acb55d6faf9eefd595dca3cd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 08:32:57 -0500 Subject: [PATCH 0492/1744] Comment out GPIO setup mode and warnings Comment out GPIO setup lines for power management. --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 4bea6822..e390db0f 100644 --- a/transmit.py +++ b/transmit.py @@ -227,8 +227,8 @@ powerPin = 16 command_tx = True -GPIO.setmode(GPIO.BCM) -GPIO.setwarnings(False) +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) setup(13, "up") setup(12, "up") setup(27, "up") From 04cdbd68a15a37f25f8e7fe2b694db290607bc5a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 08:37:08 -0500 Subject: [PATCH 0493/1744] input return integer not string Change return type of subprocess result to int and update error handling. --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index e390db0f..67d4c314 100644 --- a/transmit.py +++ b/transmit.py @@ -26,13 +26,13 @@ def input(pin): print(f"Command run was: {query}") print("Sucess!") print(f"Output of the command (stdout): {result}") - return result + return int(result) except subprocess.CalledProcessError as e: print(f"Command failed with return code: {e.returncode}") print(f"Command run was: {e.cmd}") print(f"Output of the command (stdout): {e.stdout}") print(f"Error output of the command (stderr): {e.stderr}") - return 0 + return -1 def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": From eae73235b45ad19adeec2b10f7fa75be7ed9c527 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 08:39:21 -0500 Subject: [PATCH 0494/1744] input return int of stdout --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 67d4c314..b5e99fff 100644 --- a/transmit.py +++ b/transmit.py @@ -25,8 +25,8 @@ def input(pin): result = subprocess.run(query, capture_output=True, text=True, check=True) print(f"Command run was: {query}") print("Sucess!") - print(f"Output of the command (stdout): {result}") - return int(result) + print(f"Output of the command (stdout): {result.stdout}") + return int(result.stdout) except subprocess.CalledProcessError as e: print(f"Command failed with return code: {e.returncode}") print(f"Command run was: {e.cmd}") From 7cf32b6d554524618c556a9710ee9ae8892dcfcc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 15:31:40 -0500 Subject: [PATCH 0495/1744] start merging update into install Updated installation script for CubeSatSim to handle various OS versions and improved configuration handling for sim.cfg. --- install | 146 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 100 insertions(+), 46 deletions(-) diff --git a/install b/install index 02c8b158..af233f2d 100755 --- a/install +++ b/install @@ -1,6 +1,35 @@ #!/bin/bash -echo -e "\ninstallation script for CubeSatSim v2.2\n" +FLAG=0 +checkout=0 + +if [ ! -d "/home/pi/CubeSatSim" ]; then + + echo -e "\nInstallation script for CubeSatSim v2.2\n" + + touch /home/pi/CubeSatSim/command_control_direwolf + +else + + echo -e "\nUpdate script for CubeSatSim v2.2\n" + + if [ -z "$1" ] ; then + checkout=0 + else + checkout=1 + branch="$1" + echo -n "changing to branch " + echo $branch + FLAG=1 + fi + + if [ "$2" = "n" ] ; then + noreboot=1 + else + noreboot=0 + fi + +fi if [[ $(grep '11.' /etc/debian_version) ]]; then echo "Installing on Debian 11 (Bullseye)" @@ -9,19 +38,12 @@ echo -e "\ninstallation script for CubeSatSim v2.2\n" sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 - sudo raspi-config nonint do_i2c 0 sudo raspi-config nonint do_camera 0 sudo raspi-config nonint do_legacy 0 - - #if [ "$1" = "u" ]; then - #fi - - ## sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 @@ -112,19 +134,12 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo cp /boot/firmware/cmdline.txt /boot/firmware/cmdline.txt.0 - sudo raspi-config nonint do_i2c 0 sudo raspi-config nonint do_camera 0 sudo raspi-config nonint do_legacy 0 - #if [ "$1" = "u" ]; then - #fi - - ## sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - - sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 @@ -214,8 +229,10 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' -else - echo "Your Pi OS version is not Bookworm." +elif [[ $(grep 'trixie' /etc/os-release) ]]; then + + echo "Trixie detected, installation continuing." + echo "Your Pi OS version is not Bookworm or Bullseye." echo "The software installation will likely not work." echo "See the README.md for how to install using Bookworm." echo @@ -232,9 +249,41 @@ fi FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." + + changed=0 + value=`cat /home/pi/CubeSatSim/sim.cfg` + # echo "$value" + echo "$value" > /dev/null + set -- $value + + if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign + if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count + if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat + if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon + if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode + if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch + if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency + if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency + if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode + if [ -z "${10}" ] ; then m1="0" ; changed=1 ; else m1=${10} ; fi # rx pl code + if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code + if [ -z "${12}" ] ; then m1="no" ; changed=1 ; else m1=${12} ; fi # random fail + if [ -z "${13}" ] ; then m2="60" ; changed=1 ; else m2=${13} ; fi # random fail period + + if [ $changed -eq 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 -e "\nCubeSatSim configuration sim.cfg file updated to: \n" + echo + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4 + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4> /home/pi/CubeSatSim/sim.cfg + echo + fi + else echo "creating $FILE" - echo "AMSAT 1 0.0 0.0" > /home/pi/CubeSatSim/sim.cfg + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg fi if [[ $(grep 'cubesatsim' /etc/motd) ]]; then @@ -260,7 +309,6 @@ else echo "0\n" > /home/pi/CubeSatSim/command_count.txt fi -touch /home/pi/CubeSatSim/command_control_direwolf sudo apt-get update && sudo apt-get dist-upgrade -y @@ -271,36 +319,42 @@ sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-c # removed wiringpi and python-picamera python3-picamera sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom -cd - -git clone https://github.com/alanbjohnston/direwolf.git - -cd direwolf - -make -j - -sudo make install - -make install-rpi - -sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps +if [ ! -d "/home/pi/direwolf" ]; then -sudo systemctl disable gpsd -sudo systemctl disable gpsd.socket - -cd /tmp - -# wget https://project-downloads.drogon.net/wiringpi-latest.deb - -# sudo dpkg -i wiringpi-latest.deb - -cd + cd + + git clone https://github.com/alanbjohnston/direwolf.git + + cd direwolf + + make -j + + sudo make install + + make install-rpi + + sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps + + sudo systemctl disable gpsd + sudo systemctl disable gpsd.socket +fi -git clone https://github.com/alanbjohnston/WiringPi -cd WiringPi -./build debian +if [ ! -d "/home/pi/WiringPi" ]; then -sudo dpkg -i debian-template/wiringpi-2.61-1.deb + cd /tmp + + # wget https://project-downloads.drogon.net/wiringpi-latest.deb + + # sudo dpkg -i wiringpi-latest.deb + + cd + + git clone https://github.com/alanbjohnston/WiringPi + cd WiringPi + ./build debian + + sudo dpkg -i debian-template/wiringpi-2.61-1.deb +fi cd From af9afad6acf4891965930341d64d6935bdf6e6a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Feb 2026 16:10:15 -0500 Subject: [PATCH 0496/1744] rest of changes to merge update into install --- install | 364 ++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 250 insertions(+), 114 deletions(-) diff --git a/install b/install index af233f2d..dd79d8d1 100755 --- a/install +++ b/install @@ -3,13 +3,8 @@ FLAG=0 checkout=0 -if [ ! -d "/home/pi/CubeSatSim" ]; then - - echo -e "\nInstallation script for CubeSatSim v2.2\n" - - touch /home/pi/CubeSatSim/command_control_direwolf - -else +FILE=/home/pi/CubeSatSim/cubesatsim # code has already been compiled +if [ -f "$FILE" ]; then echo -e "\nUpdate script for CubeSatSim v2.2\n" @@ -29,9 +24,19 @@ else noreboot=0 fi +else + + echo -e "\nInstallation script for CubeSatSim v2.2\n" + + touch /home/pi/CubeSatSim/command_control_direwolf + + /home/piCubeSatSim/config -c -n + + /home/piCubeSatSim/config -l -n + fi - if [[ $(grep '11.' /etc/debian_version) ]]; then +if [[ $(grep '11.' /etc/debian_version) ]]; then echo "Installing on Debian 11 (Bullseye)" sudo cp /boot/config.txt /boot/config.txt.0 @@ -308,7 +313,6 @@ else echo "creating $FILE" echo "0\n" > /home/pi/CubeSatSim/command_count.txt fi - sudo apt-get update && sudo apt-get dist-upgrade -y @@ -321,34 +325,21 @@ sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev l if [ ! -d "/home/pi/direwolf" ]; then - cd - + cd git clone https://github.com/alanbjohnston/direwolf.git - - cd direwolf - + cd direwolf make -j - - sudo make install - + sudo make install make install-rpi - +fi + sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps - sudo systemctl disable gpsd sudo systemctl disable gpsd.socket -fi if [ ! -d "/home/pi/WiringPi" ]; then - cd /tmp - - # wget https://project-downloads.drogon.net/wiringpi-latest.deb - - # sudo dpkg -i wiringpi-latest.deb - cd - git clone https://github.com/alanbjohnston/WiringPi cd WiringPi ./build debian @@ -368,9 +359,17 @@ sudo pip3 install --upgrade setuptools sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 -cd ~/CubeSatSim +cd /home/pi/CubeSatSim -git pull --no-rebase +git pull --no-rebase > .updated + +if [ $checkout -eq 1 ]; then + git checkout $branch + git pull --no-rebase > .updated + FLAG=1 + echo "Running update script again" + /home/pi/CubeSatSim/install +fi make debug @@ -382,81 +381,133 @@ else echo "b" > .mode fi -cd - -git clone https://github.com/alanbjohnston/pi-power-button.git - -cd pi-power-button - -git checkout master - -./script/install - -sudo apt-get install -y libraspberrypi-dev - -cd - -echo "Installing SSDV for FUNcube mode" -git clone https://github.com/alanbjohnston/ssdv.git # install ssdv for FUNcube images -cd ssdv -make -cd - -echo "Installing fctelem binary v0.2 for FUNcube mode" -mkdir /home/pi/fctelem -mkdir /home/pi/fctelem/public_html -cd fctelem -wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip -unzip -u fctelem.zip - -cd -echo "Installing fcdctl to set FUNcubeDongle Pro gain" -# sudo rm /var/lib/dpkg/info/python3-pip.list -# sudo apt install python3-pip --reinstall -# sudo apt-get install -y python3-smbus libusb-1.0 -cd -git clone https://github.com/csete/fcdctl.git -cd fcdctl -make fcdpp - -cd +if [ ! -d "/home/pi/pi-power-button" ]; then -git clone https://github.com/alanbjohnston/PiSSTVpp.git + cd + git clone https://github.com/alanbjohnston/pi-power-button.git + cd pi-power-button + git checkout master + ./script/install + sudo apt-get install -y libraspberrypi-dev -cd PiSSTVpp +fi -make pisstvpp +cd /home/pi/pi-power-button -echo "Copying SSTV image 1" -cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg +git pull --no-rebase > .updated_p +git checkout master +grep 'changed' /home/pi/pi-power-button/.updated_p +if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then -echo "Copying SSTV image 2" -cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg + echo "updating pi-power-button." + script/install + FLAG=1 +fi cd -git clone https://github.com/alanbjohnston/rpitx.git +if [ ! -d "/home/pi/PiSSTVpp" ]; then -cd rpitx + sudo apt-get update -y + sudo apt-get install -y python-picamera python3-picamera build-essential libgd-dev libmagic-dev + cd + git clone https://github.com/alanbjohnston/PiSSTVpp.git + cd PiSSTVpp + make pisstvpp -./install.sh +fi -cd +if [ ! -d "/home/pi/rpitx" ]; then -sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + cd + git clone https://github.com/alanbjohnston/rpitx.git + cd rpitx + ./install.sh + cd +else -sudo systemctl enable cubesatsim + if [[ $(grep 'SYNCWITHPWM' /home/pi/rpitx/src/librpitx/src/fskburst.h) ]]; then + echo "rpitx library already updated" + else + echo "updating rpitx" + cd /home/pi/rpitx + git pull + ./update.sh + cd + fi +fi -sudo cp ~/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service +if [[ $(diff systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then + echo "changed cubesatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + FLAG=1 +else + echo "no changes to cubesatsim.service." +fi -# sudo systemctl enable transmit +FILE=/etc/systemd/system/rpitx.service +if [ -f "$FILE" ]; then + sudo systemctl disable rpitx + sudo rm /etc/systemd/system/rpitx.service +fi -sudo cp ~/CubeSatSim/systemd/command.service /etc/systemd/system/command.service +FILE=/etc/systemd/system/transmit.service +if [ -f "$FILE" ]; then + if [[ $(diff systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then + echo "changed transmit.service." + sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service + FLAG=1 + else + echo "no change to transmit.service." + fi +else + echo "creating transmit.service." + sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service + FLAG=1 +fi -sudo systemctl enable command +FILE=/etc/systemd/system/command.service +if [ -f "$FILE" ]; then + if [[ $(diff systemd/command.service /etc/systemd/system/command.service) ]]; then + echo "changed command.service." + sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service + FLAG=1 + else + echo "no change to command.service." + fi +else + echo "creating command.service." + sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service + sudo systemctl enable command + FLAG=1 +fi -sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf +FILE=/etc/asound.conf +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/asound.conf /etc/asound.conf) ]]; then + echo "changed /etc/asound.conf." + sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf + FLAG=1 + else + echo "no change to /etc/asound.conf." + fi +else + echo "creating /etc/asound.conf." + sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf + FLAG=1 +fi +FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg +if [ ! -f "$FILE" ]; then + echo "Copying SSTV image 1." + cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg +fi + +FILE=/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg +if [ ! -f "$FILE" ]; then + echo "Copying SSTV image 2." + cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg +fi sudo sed -i 's/DEVICES=""/DEVICES="\/dev\/serial0"/g' /etc/default/gpsd @@ -490,48 +541,133 @@ if [ $changed -eq 1 ]; then echo fi -echo "Installing MPU6050-C-CPP-Library-for-Raspberry-Pi" -sudo apt-get install -y libi2c-dev -cd -git clone https://github.com/alanbjohnston/MPU6050-C-CPP-Library-for-Raspberry-Pi.git -cd MPU6050-C-CPP-Library-for-Raspberry-Pi -sudo make install -make payload +if [ ! -d "/home/pi/fctelem" ]; then + echo "Installing fctelem binary v0.2 for FUNcube mode" + cd + mkdir /home/pi/fctelem + mkdir /home/pi/fctelem/public_html + cd fctelem + wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip + unzip -u fctelem.zip + FLAG=1 +elif [ ! -f "/home/pi/fctelem/v0.2" ]; then + echo "Updating fctelem binary to version v0.2 for FUNcube mode" + cd + cd /home/pi/fctelem + sudo mv fctelem fctelem.bk + sudo mv fcdecode.conf fcdecode.conf.bk + sudo mv fctelem.zip fctelem.zip.1 + wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip + unzip -u fctelem.zip + FLAG=1 +fi -echo "Installing raspberry-pi-bme280" -sudo apt-get install -y libi2c-dev -cd -git clone https://github.com/alanbjohnston/raspberry-pi-bme280.git -cd raspberry-pi-bme280 +if [ ! -f "/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/mpu6050" ]; then + echo "Installing MPU6050-C-CPP-Library-for-Raspberry-Pi" + sudo apt-get install -y libi2c-dev + cd + git clone https://github.com/alanbjohnston/MPU6050-C-CPP-Library-for-Raspberry-Pi.git + cd MPU6050-C-CPP-Library-for-Raspberry-Pi + sudo make install + make payload +fi + +cd /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi +git checkout master +git pull --no-rebase > .updated_p + +if [[ $(grep 'changed' /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/.updated_p) ]]; then + echo "updating MPU6050-C-CPP-Library-for-Raspberry-Pi" + sudo make install + make payload +else + echo "nothing to do for MPU6050-C-CPP-Library-for-Raspberry-Pi." +fi + +if [ ! -f "/home/pi/raspberry-pi-bme280/bme280" ]; then + echo "Installing raspberry-pi-bme280" + sudo apt-get install -y libi2c-dev + cd + git clone https://github.com/alanbjohnston/raspberry-pi-bme280.git + cd raspberry-pi-bme280 + git checkout payload + make +fi + +cd /home/pi/raspberry-pi-bme280 git checkout payload -make +git pull --no-rebase > .updated_p -cd -sudo apt install python3-venv -sudo python3 -m venv venv -source /home/pi/venv/bin/activate +if [[ $(grep 'changed' /home/pi/raspberry-pi-bme280/.updated_p) ]]; then -curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 + echo "updating raspberry-pi-bme280" + make -sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus -sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 +else + echo "nothing to do for raspberry-pi-bme280." +fi + +if [ ! -f "/home/pi/fcdctl/fcdctl" ]; then + echo "Installing fcdctl to set FUNcubeDongle Pro gain" + sudo rm /var/lib/dpkg/info/python3-pip.list + sudo apt install python3-pip --reinstall + sudo apt-get install -y python3-smbus libusb-1.0 + cd + git clone https://github.com/csete/fcdctl.git + cd fcdctl + make fcdpp +fi -cd -CubeSatSim/config -c -n +if [ ! -d "/home/pi/venv" ]; then -CubeSatSim/config -l -n + cd + sudo apt install python3-venv + sudo python3 -m venv venv + source /home/pi/venv/bin/activate + + curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 + + sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus + sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 -echo "Would you like to reboot to complete the installation (y/n)?" +fi -read -r ANS +cd -if [ "$ANS" = "y" ]; then +#echo "Would you like to reboot to complete the installation (y/n)?" - sudo reboot now +#read -r ANS -else +#if [ "$ANS" = "y" ]; then + +# sudo reboot now + +#else - echo "The CubeSatSim software will start next time you reboot" + # echo "The CubeSatSim software will start next time you reboot" +#fi + +if [ "$noreboot" = "0" ] ; then + + if [ $FLAG -eq 1 ]; then + echo "systemctl daemon-reload and reboot" + sudo systemctl daemon-reload + sudo reboot -h now +# sudo cubesatsim + else + grep 'changed' /home/pi/CubeSatSim/.updated + if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then + echo "reboot due to code changes " | wall + sudo reboot -h now +# sudo cubesatsim + else + echo "nothing to do." + fi + fi +else + if [ $FLAG -eq 1 ]; then + echo "reboot needed for changes to take effect" | wall + fi fi From 666c4af6e13fa69e50ae193991316215b0350dd1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 09:37:57 -0500 Subject: [PATCH 0497/1744] move venv to start of script Added support for Bullseye OS and updated installation steps for Python virtual environment and dependencies. --- install | 77 ++++++++++++++++++--------------------------------------- 1 file changed, 24 insertions(+), 53 deletions(-) diff --git a/install b/install index dd79d8d1..433952e6 100755 --- a/install +++ b/install @@ -2,6 +2,7 @@ FLAG=0 checkout=0 +BULLSEYE=0 FILE=/home/pi/CubeSatSim/cubesatsim # code has already been compiled if [ -f "$FILE" ]; then @@ -133,6 +134,7 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then fi if [[ $(grep 'bookworm' /etc/os-release) ]]; then + BULLSEYE=1 echo "Bookworm detected, installation continuing." sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 @@ -251,6 +253,20 @@ elif [[ $(grep 'trixie' /etc/os-release) ]]; then fi fi +if [ ! -d "/home/pi/venv" ]; then + + cd + sudo apt install -y python3-venv + sudo python3 -m venv venv + source /home/pi/venv/bin/activate + + curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 + + sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus + sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 + +fi + FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." @@ -272,8 +288,8 @@ if [ -f "$FILE" ]; then if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode if [ -z "${10}" ] ; then m1="0" ; changed=1 ; else m1=${10} ; fi # rx pl code if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code - if [ -z "${12}" ] ; then m1="no" ; changed=1 ; else m1=${12} ; fi # random fail - if [ -z "${13}" ] ; then m2="60" ; changed=1 ; else m2=${13} ; fi # random fail period + if [ -z "${12}" ] ; then m3="no" ; changed=1 ; else m3=${12} ; fi # random fail + if [ -z "${13}" ] ; then m4="60" ; changed=1 ; else m4=${13} ; fi # random fail period if [ $changed -eq 1 ]; then echo -e "Current sim.cfg configuration file:" @@ -338,20 +354,18 @@ fi sudo systemctl disable gpsd.socket if [ ! -d "/home/pi/WiringPi" ]; then - cd git clone https://github.com/alanbjohnston/WiringPi cd WiringPi ./build debian - sudo dpkg -i debian-template/wiringpi-2.61-1.deb fi cd -#changed to python3-smbus - -sudo apt install -y libtiff6 +if [ ! $BULLSEYE -eq 1 ]; then + sudo apt install -y libtiff6 +fi sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev @@ -437,7 +451,7 @@ else fi fi -if [[ $(diff systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then +if [[ $(diff /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then echo "changed cubesatsim.service." sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service FLAG=1 @@ -453,7 +467,7 @@ fi FILE=/etc/systemd/system/transmit.service if [ -f "$FILE" ]; then - if [[ $(diff systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then echo "changed transmit.service." sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service FLAG=1 @@ -468,7 +482,7 @@ fi FILE=/etc/systemd/system/command.service if [ -f "$FILE" ]; then - if [[ $(diff systemd/command.service /etc/systemd/system/command.service) ]]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service) ]]; then echo "changed command.service." sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service FLAG=1 @@ -513,34 +527,6 @@ sudo sed -i 's/DEVICES=""/DEVICES="\/dev\/serial0"/g' /etc/default/gpsd sudo sed -i 's/GPSD_OPTIONS=""/GPSD_OPTIONS="-s 9600"/g' /etc/default/gpsd -changed=0 -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign -if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count -if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat -if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon -if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode -if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch -if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency -if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency -if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode -if [ -z "${10}" ] ; then n10="0" ; changed=1 ; else n10=${10} ; fi # rx pl code -if [ -z "${11}" ] ; then n11="0" ; changed=1 ; else n11=${11} ; fi # tx pl code - -if [ $changed -eq 1 ]; then - echo -e "Current sim.cfg configuration file:" - echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" - echo - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11 - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11 > /home/pi/CubeSatSim/sim.cfg - echo -fi - if [ ! -d "/home/pi/fctelem" ]; then echo "Installing fctelem binary v0.2 for FUNcube mode" cd @@ -618,21 +604,6 @@ if [ ! -f "/home/pi/fcdctl/fcdctl" ]; then make fcdpp fi - -if [ ! -d "/home/pi/venv" ]; then - - cd - sudo apt install python3-venv - sudo python3 -m venv venv - source /home/pi/venv/bin/activate - - curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 - - sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus - sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 - -fi - cd #echo "Would you like to reboot to complete the installation (y/n)?" From 060cf095e358124ced8ca65c359466da4ca7f561 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 10:18:26 -0500 Subject: [PATCH 0498/1744] move venv again --- install | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/install b/install index 433952e6..ee4de9d6 100755 --- a/install +++ b/install @@ -38,7 +38,7 @@ else fi if [[ $(grep '11.' /etc/debian_version) ]]; then - echo "Installing on Debian 11 (Bullseye)" + echo "Debian 11 (Bullseye) detected" sudo cp /boot/config.txt /boot/config.txt.0 @@ -135,7 +135,7 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then if [[ $(grep 'bookworm' /etc/os-release) ]]; then BULLSEYE=1 - echo "Bookworm detected, installation continuing." + echo "Bookworm detected." sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 @@ -253,20 +253,6 @@ elif [[ $(grep 'trixie' /etc/os-release) ]]; then fi fi -if [ ! -d "/home/pi/venv" ]; then - - cd - sudo apt install -y python3-venv - sudo python3 -m venv venv - source /home/pi/venv/bin/activate - - curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 - - sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus - sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 - -fi - FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." @@ -332,6 +318,20 @@ fi sudo apt-get update && sudo apt-get dist-upgrade -y +if [ ! -d "/home/pi/venv" ]; then + + cd + sudo apt install -y python3-venv + sudo python3 -m venv venv + source /home/pi/venv/bin/activate + + curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 + + sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus + sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 + +fi + sudo apt-get remove pulseaudio -y sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev raspi-config From 140b76c9fbcded4d5b28e2d79c56234e27ea6ecc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 10:20:11 -0500 Subject: [PATCH 0499/1744] Update detection message for Debian 12 (Bookworm) --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index ee4de9d6..9e5d4bf9 100755 --- a/install +++ b/install @@ -135,7 +135,7 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then if [[ $(grep 'bookworm' /etc/os-release) ]]; then BULLSEYE=1 - echo "Bookworm detected." + echo "Debian 12 (Bookworm) detected" sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 From 53ffba11822ac3fa18de9fc438e9950debfd1058 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 10:45:22 -0500 Subject: [PATCH 0500/1744] fix splash --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 9e5d4bf9..596dc39c 100755 --- a/install +++ b/install @@ -114,7 +114,7 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' fi - if [[ $(grep 'disable_splash=1 ' /boot/config.txt) ]]; then + if [[ $(grep 'disable_splash=1' /boot/config.txt) ]]; then echo "disable_splash=1 already in /boot/config.txt" else echo "adding disable_splash=1 to /boot/config.txt" @@ -211,7 +211,7 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/firmware/config.txt' fi - if [[ $(grep 'disable_splash=1 ' /boot/firmware/config.txt) ]]; then + if [[ $(grep 'disable_splash=1' /boot/firmware/config.txt) ]]; then echo "disable_splash=1 already in /boot/firmware/config.txt" else echo "adding disable_splash=1 to /boot/firmware/config.txt" From 721b16c91c77ffae787aaea7828ae09c93a90e35 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 10:58:47 -0500 Subject: [PATCH 0501/1744] fix BULLSEYE variable --- install | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/install b/install index 596dc39c..6b2c9d69 100755 --- a/install +++ b/install @@ -38,6 +38,9 @@ else fi if [[ $(grep '11.' /etc/debian_version) ]]; then + + BULLSEYE=1 + echo "Debian 11 (Bullseye) detected" sudo cp /boot/config.txt /boot/config.txt.0 @@ -134,7 +137,7 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then fi if [[ $(grep 'bookworm' /etc/os-release) ]]; then - BULLSEYE=1 + echo "Debian 12 (Bookworm) detected" sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 From 7bee60873f94be0247f4ad8ee1cd6498e453ac99 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 11:10:15 -0500 Subject: [PATCH 0502/1744] add purge and reinstall python3-pip for bullseye --- install | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install b/install index 6b2c9d69..4f9beecb 100755 --- a/install +++ b/install @@ -368,8 +368,12 @@ cd if [ ! $BULLSEYE -eq 1 ]; then sudo apt install -y libtiff6 +else + sudo apt purge -y python3-pip + sudo apt install -y python3-pip fi + sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev sudo pip3 install --upgrade setuptools From 96d0b845d2f25a36b5812486b01b3362ec01d1d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 11:37:20 -0500 Subject: [PATCH 0503/1744] move purge pip --- install | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install b/install index 4f9beecb..5ca46688 100755 --- a/install +++ b/install @@ -321,6 +321,11 @@ fi sudo apt-get update && sudo apt-get dist-upgrade -y +if [ $BULLSEYE -eq 1 ]; then + sudo apt purge -y python3-pip + sudo apt install -y python3-pip +fi + if [ ! -d "/home/pi/venv" ]; then cd @@ -368,12 +373,8 @@ cd if [ ! $BULLSEYE -eq 1 ]; then sudo apt install -y libtiff6 -else - sudo apt purge -y python3-pip - sudo apt install -y python3-pip fi - sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev sudo pip3 install --upgrade setuptools From e680adc2ee97be0a83848721019dc97834150b88 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 13:09:52 -0500 Subject: [PATCH 0504/1744] Disable python3-pip purge for BULLSEYE Comment out the installation of python3-pip for BULLSEYE. --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index 5ca46688..ced94371 100755 --- a/install +++ b/install @@ -321,10 +321,10 @@ fi sudo apt-get update && sudo apt-get dist-upgrade -y -if [ $BULLSEYE -eq 1 ]; then - sudo apt purge -y python3-pip - sudo apt install -y python3-pip -fi +# if [ $BULLSEYE -eq 1 ]; then +# sudo apt purge -y python3-pip +# sudo apt install -y python3-pip +# fi if [ ! -d "/home/pi/venv" ]; then From 4bf37051869c05e966e58c4e720842038141d7bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 16:52:51 -0500 Subject: [PATCH 0505/1744] only do pip3 install if bullseye or initial install Added update check for CubeSatSim installation script. --- install | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/install b/install index ced94371..ea757f88 100755 --- a/install +++ b/install @@ -3,10 +3,13 @@ FLAG=0 checkout=0 BULLSEYE=0 +UPDATE=0 FILE=/home/pi/CubeSatSim/cubesatsim # code has already been compiled if [ -f "$FILE" ]; then + UPDATE=1 + echo -e "\nUpdate script for CubeSatSim v2.2\n" if [ -z "$1" ] ; then @@ -377,9 +380,13 @@ fi sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev -sudo pip3 install --upgrade setuptools +if [ $BULLSEYE -eq 1 ] || [ $UPDATE -eq 0] ; then + + sudo pip3 install --upgrade setuptools + + sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 -sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 +fi cd /home/pi/CubeSatSim From 92730d5b7cb3146fde4e97db2c402dd5b3b158a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 17:04:18 -0500 Subject: [PATCH 0506/1744] Add debug print statements in transmit.py and fix setup to use pin Added print statements to output and setup functions for debugging. --- transmit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index b5e99fff..3dbcd5c1 100644 --- a/transmit.py +++ b/transmit.py @@ -17,6 +17,7 @@ import subprocess def output(pin, value): command = "gpio -g write " + str(pin) + " " + str(value) system(command) + print(command) def input(pin): # command = "gpio -g read " + str(pin) @@ -36,8 +37,9 @@ def input(pin): def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": - command = "gpio -g mode " + str(powerPin) + " " + config + command = "gpio -g mode " + str(pin) + " " + config system(command) + print(command) else: print(f"Unknown GPIO setup configuration: {config}") From 7d4d0d517f0b8725eede3e59234015c2f1ead713 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 17:20:44 -0500 Subject: [PATCH 0507/1744] Implement OS version check in transmit.py from master-b-cam Add OS version check and update os_status based on command output. --- transmit.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/transmit.py b/transmit.py index 3dbcd5c1..958985af 100644 --- a/transmit.py +++ b/transmit.py @@ -481,6 +481,24 @@ if __name__ == "__main__": # print(1) setup(txLed, "out") + query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + os_status = result.stdout.strip() + print(f"Output of the command (stdout): {os_status}") + except subprocess.CalledProcessError as e: +# print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + os_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + if os_status != "VERSION_CODENAME=bullseye": + os_status = "bookworm" + else: + os_status = "bullseye" + print (os_status) + card = "Headphones" # default using pcm audio output of Pi Zero # card = "Device" # using USB sound card for audio output From 8e958ffd4c1c06a520b315178355b792a57eff6d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Feb 2026 22:57:23 -0500 Subject: [PATCH 0508/1744] Comment out txLed extra setup calls Comment out setup calls for txLed --- transmit.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/transmit.py b/transmit.py index 958985af..0ba37e65 100644 --- a/transmit.py +++ b/transmit.py @@ -479,7 +479,7 @@ if __name__ == "__main__": # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 # print(txLed) # print(1) - setup(txLed, "out") +# setup(txLed, "out") query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] try: @@ -548,7 +548,7 @@ if __name__ == "__main__": else: if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) print("Transmit CW ID") status = "" @@ -597,7 +597,7 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # output(pd, 1) # output (ptt, 0) @@ -655,7 +655,7 @@ if __name__ == "__main__": ## chan = chan + 1 if (command_tx == True): # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) if (txc): @@ -719,7 +719,7 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -752,7 +752,7 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -790,7 +790,7 @@ if __name__ == "__main__": print ("Sending SSTV image") # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -828,7 +828,7 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -859,7 +859,7 @@ if __name__ == "__main__": # command_control_check() # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -890,7 +890,7 @@ if __name__ == "__main__": output(ptt, 1) # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - setup(txLed, "out") +# setup(txLed, "out") if (command_tx == True): # system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &") @@ -910,7 +910,7 @@ if __name__ == "__main__": if (command_tx == True): # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # print(txLed) # print(1) @@ -950,7 +950,7 @@ if __name__ == "__main__": output(pd, 1) output(ptt, 1) # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - setup(txLed, "out") +# setup(txLed, "out") # GPIO.setup(powerPin, GPIO.OUT) setup(squelch, "up") ## pull up in case pin is not connected # GPIO.output(powerPin, 1) # was 0 @@ -964,7 +964,7 @@ if __name__ == "__main__": if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) @@ -989,7 +989,7 @@ if __name__ == "__main__": output(ptt, 1) # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - setup(txLed, "out") +# setup(txLed, "out") if (command_tx == True): system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") @@ -1004,7 +1004,7 @@ if __name__ == "__main__": # command_control_check() if (command_tx == True): # GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - setup(txLed, "out") +# setup(txLed, "out") output(txLed, 1) # print(txLed) # print(1) From d62db52115dc858c796753a3aeac2a41f9c9b531 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Feb 2026 10:29:11 -0500 Subject: [PATCH 0509/1744] Fix path for CubeSatSim configuration commands at start --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index ea757f88..45831321 100755 --- a/install +++ b/install @@ -34,9 +34,9 @@ else touch /home/pi/CubeSatSim/command_control_direwolf - /home/piCubeSatSim/config -c -n + /home/pi/CubeSatSim/config -c -n - /home/piCubeSatSim/config -l -n + /home/pi/CubeSatSim/config -l -n fi From 0096541e8017b6c76f84ae527bd3f00a92078f92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Feb 2026 10:48:57 -0500 Subject: [PATCH 0510/1744] Update install script to create sim.cfg before config call Add configuration line to create sim.cfg file --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index 45831321..68897186 100755 --- a/install +++ b/install @@ -34,6 +34,9 @@ else touch /home/pi/CubeSatSim/command_control_direwolf + echo "creating $FILE" + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg + /home/pi/CubeSatSim/config -c -n /home/pi/CubeSatSim/config -l -n From 2c2fde9aa0f860d48fc801ec9b163c7622ad0e33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Feb 2026 11:30:43 -0500 Subject: [PATCH 0511/1744] fix cubesatsim.service install Refactor cubesatsim.service handling in install script. --- install | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/install b/install index 68897186..5d99333a 100755 --- a/install +++ b/install @@ -469,12 +469,21 @@ else fi fi -if [[ $(diff /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then - echo "changed cubesatsim.service." +FILE=/etc/systemd/system/cubesatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then + echo "changed cubesatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + FLAG=1 + else + echo "no changes to cubesatsim.service." + fi +else + echo "creating cubesatsim.service." sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + sudo systemctl enable command + FLAG=1 -else - echo "no changes to cubesatsim.service." fi FILE=/etc/systemd/system/rpitx.service From 7903b12cbd8893d7049a40e5fb2ddc776f045a78 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Feb 2026 11:41:15 -0500 Subject: [PATCH 0512/1744] Fix spacing in conditional statement for install script --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 5d99333a..0b90e65e 100755 --- a/install +++ b/install @@ -383,7 +383,7 @@ fi sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev -if [ $BULLSEYE -eq 1 ] || [ $UPDATE -eq 0] ; then +if [ $BULLSEYE -eq 1 ] || [ $UPDATE -eq 0 ] ; then sudo pip3 install --upgrade setuptools From 8fbe0ea4f5dd8c4c5f69d26118be405eb12a8ef8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Feb 2026 13:46:16 -0500 Subject: [PATCH 0513/1744] Implement SSDV installation if not present Add installation steps for SSDV in FUNcube mode. --- install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install b/install index 0b90e65e..a49022a0 100755 --- a/install +++ b/install @@ -631,6 +631,14 @@ if [ ! -f "/home/pi/fcdctl/fcdctl" ]; then make fcdpp fi +if [ ! -f "/home/pi/ssdv/ssdv" ]; then + cd + echo "Installing SSDV for FUNcube mode" + git clone https://github.com/alanbjohnston/ssdv.git # install ssdv for FUNcube images + cd ssdv + make +fi + cd #echo "Would you like to reboot to complete the installation (y/n)?" From 92a12d7866d670c429cd50c42f5922ca19228e63 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 24 Feb 2026 02:56:03 +0000 Subject: [PATCH 0514/1744] change update to link to install --- update | 482 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 481 deletions(-) mode change 100755 => 120000 update diff --git a/update b/update deleted file mode 100755 index 4fe1187a..00000000 --- a/update +++ /dev/null @@ -1,481 +0,0 @@ -#!/bin/bash - -echo -e "\nupdate script for CubeSatSim v2.2\n" - -FLAG=0 -checkout=0 - -if [ -z "$1" ] ; then - checkout=0 -else - checkout=1 - branch="$1" - echo -n "changing to branch " - echo $branch - FLAG=1 -fi - -if [ "$1" = "n" ] ; then - noreboot=1 -else - noreboot=0 -fi - -# echo "No reboot" -# echo $noreboot - -sudo rm /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/id.txt /home/pi/CubeSatSim/cw.txt > /dev/null 2>&1 - -#if [ "$1" = "u" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - - sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev python3-pip minicom gpsd gpsd-clients libgps-dev python3-gps - -#fi - -sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps - -# sudo apt-get install -y python3-smbus libusb-1.0 - -sudo sed -i 's/update.sh/update /g' /etc/motd - -sudo sed -i 's/installed and/installed\nand/g' /etc/motd - -sudo sed -i 's/more information/more\ninformation/g' /etc/motd - -sudo sed -i 's/update to/update\nto/g' /etc/motd - -sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 - -sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 - -sudo sed -i 's/DEVICES=""/DEVICES="\/dev\/serial0"/g' /etc/default/gpsd - -sudo sed -i 's/GPSD_OPTIONS=""/GPSD_OPTIONS="-s 9600"/g' /etc/default/gpsd - -sudo systemctl disable gpsd > /dev/null 2>&1 -sudo systemctl disable gpsd.socket > /dev/null 2>&1 - -cd /home/pi/CubeSatSim - -git pull --no-rebase > .updated - -if [ $checkout -eq 1 ]; then - git checkout $branch - git pull --no-rebase > .updated - FLAG=1 - echo "Running update script again" - /home/pi/CubeSatSim/update -fi - -make debug - -FILE=/home/pi/CubeSatSim/command_tx -if [ -f "$FILE" ]; then - echo "$FILE exists." -else - echo "creating $FILE" - echo "True\n" > /home/pi/CubeSatSim/command_tx -fi - -FILE=/home/pi/CubeSatSim/command_count.txt -if [ -f "$FILE" ]; then - echo "$FILE exists." -else - echo "creating $FILE" - echo "0\n" > /home/pi/CubeSatSim/command_count.txt -fi - -if [[ $(diff systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then - echo "changed cubesatsim.service." - sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service - FLAG=1 -else - echo "no changes to cubesatsim.service." -fi - -FILE=/etc/systemd/system/rpitx.service -if [ -f "$FILE" ]; then - sudo systemctl disable rpitx - sudo rm /etc/systemd/system/rpitx.service -fi - -FILE=/etc/systemd/system/transmit.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then - echo "changed transmit.service." - sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - FLAG=1 - else - echo "no change to transmit.service." - fi -else - echo "creating transmit.service." - sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - FLAG=1 -fi - -FILE=/etc/systemd/system/command.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/command.service /etc/systemd/system/command.service) ]]; then - echo "changed command.service." - sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - FLAG=1 - else - echo "no change to command.service." - fi -else - echo "creating command.service." - sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - sudo systemctl enable command - FLAG=1 -fi - -FILE=/etc/asound.conf -if [ -f "$FILE" ]; then - if [[ $(diff /home/pi/CubeSatSim/asound.conf /etc/asound.conf) ]]; then - echo "changed /etc/asound.conf." - sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf - FLAG=1 - else - echo "no change to /etc/asound.conf." - fi -else - echo "creating /etc/asound.conf." - sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf - FLAG=1 -fi - -FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg -if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 1." - cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg -fi - -FILE=/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg -if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 2." - cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg -fi - -grep 'update' /home/pi/CubeSatSim/.updated -if [[ $(grep 'update' /home/pi/CubeSatSim/.updated) ]]; then - echo "update script updated, running again" - /home/pi/CubeSatSim/update -fi - -if [ ! -d "/home/pi/PiSSTVpp" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - - sudo apt-get install -y python-picamera python3-picamera build-essential libgd-dev libmagic-dev - - - cd - - git clone https://github.com/alanbjohnston/PiSSTVpp.git - - cd PiSSTVpp - - make pisstvpp - - cd - - - sudo raspi-config nonint do_camera 0 - -fi - -if [ ! -d "/home/pi/rpitx" ]; then - - cd - git clone https://github.com/alanbjohnston/rpitx.git - cd rpitx - ./install.sh - cd -else - - if [[ $(grep 'SYNCWITHPWM' /home/pi/rpitx/src/librpitx/src/fskburst.h) ]]; then - echo "rpitx library already updated" - else - echo "updating rpitx" - cd /home/pi/rpitx - git pull - ./update.sh - cd - fi -fi - -if [ ! -d "/home/pi/WiringPi" ]; then - - cd - - git clone https://github.com/alanbjohnston/WiringPi - cd WiringPi - ./build debian - - sudo dpkg -i debian-template/wiringpi-2.61-1.deb - - cd - - cd CubeSatSim - make debug - - FLAG=1 - - cd - -fi - -if [ ! -d "/home/pi/ssdv" ]; then - - echo "Installing SSDV for FUNcube mode" - cd - git clone https://github.com/alanbjohnston/ssdv.git # install ssdv for FUNcube images - cd ssdv - make - cd - FLAG=1 -fi - -if [ ! -d "/home/pi/fctelem" ]; then - echo "Installing fctelem binary v0.2 for FUNcube mode" - cd - mkdir /home/pi/fctelem - mkdir /home/pi/fctelem/public_html - cd fctelem - wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip - unzip -u fctelem.zip - FLAG=1 -elif [ ! -f "/home/pi/fctelem/v0.2" ]; then - echo "Updating fctelem binary to version v0.2 for FUNcube mode" - cd - cd /home/pi/fctelem - sudo mv fctelem fctelem.bk - sudo mv fcdecode.conf fcdecode.conf.bk - sudo mv fctelem.zip fctelem.zip.1 - wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip - unzip -u fctelem.zip - FLAG=1 -fi - -if [ ! -f "/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/mpu6050" ]; then - echo "Installing MPU6050-C-CPP-Library-for-Raspberry-Pi" - sudo apt-get install -y libi2c-dev - cd - git clone https://github.com/alanbjohnston/MPU6050-C-CPP-Library-for-Raspberry-Pi.git - cd MPU6050-C-CPP-Library-for-Raspberry-Pi - sudo make install - make payload -fi - -cd /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi -git checkout master -git pull --no-rebase > .updated_p - -if [[ $(grep 'changed' /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/.updated_p) ]]; then - - echo "updating MPU6050-C-CPP-Library-for-Raspberry-Pi" - sudo make install - make payload -else - echo "nothing to do for MPU6050-C-CPP-Library-for-Raspberry-Pi." -fi - -if [ ! -f "/home/pi/raspberry-pi-bme280/bme280" ]; then - echo "Installing raspberry-pi-bme280" - sudo apt-get install -y libi2c-dev - cd - git clone https://github.com/alanbjohnston/raspberry-pi-bme280.git - cd raspberry-pi-bme280 - git checkout payload - make -fi - -cd /home/pi/raspberry-pi-bme280 -git checkout payload -git pull --no-rebase > .updated_p - -if [[ $(grep 'changed' /home/pi/raspberry-pi-bme280/.updated_p) ]]; then - - echo "updating raspberry-pi-bme280" - make - -else - echo "nothing to do for raspberry-pi-bme280." -fi - -if [ ! -f "/home/pi/fcdctl/fcdctl" ]; then - echo "Installing fcdctl to set FUNcubeDongle Pro gain" - sudo rm /var/lib/dpkg/info/python3-pip.list - sudo apt install python3-pip --reinstall - sudo apt-get install -y python3-smbus libusb-1.0 - cd - git clone https://github.com/csete/fcdctl.git - cd fcdctl - make fcdpp -fi - -cd /home/pi/pi-power-button - - git pull --no-rebase > .updated_p - - git checkout master - -# grep 'changed' /home/pi/pi-power-button/.updated_p -# if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then - - echo "updating pi-power-button." - - script/install - - FLAG=1 - - # else - # echo "nothing to do for pi-power-button." - # fi - -cd /home/pi/ssdv - - git checkout master - - git pull --no-rebase > .updated_p - - grep 'changed' /home/pi/ssdv/.updated_p - if [[ $(grep 'changed' /home/pi/ssdv/.updated_p) ]]; then - - echo "updating ssdv." - -# git checkout master - - script/install - - FLAG=1 - - else - echo "nothing to do for ssdv." - fi - - - if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then - echo "dtparam=audio=on already in /boot/config.txt" - else - echo "adding dtparam=audio=on to /boot/config.txt" - sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then - echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" - else - echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then - echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" - else - echo "adding dtoverlay=pwm,pin=18,func=2 to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' - FLAG=1 - -# cd /home/pi/pi-power-button -# git pull --no-rebase -# git checkout reboot-mode-change -# script/install - -## sudo apt-get update && sudo apt-get dist-upgrade -y -# sudo apt-get update -y -# sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 python3-pil -# sudo pip3 install -y adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 pillow - - fi - - if [[ $(grep 'disable_splash=1' /boot/config.txt) ]]; then - echo "disable_splash=1 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then - echo "boot_delay=0 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' - FLAG=1 - fi - - if ! grep -q force_turbo=1 /boot/config.txt ; then - sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt' - FLAG=1 - fi - -#if [ ! -f "/home/pi/CubeSatSim/telem_string.txt" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - -# sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 -y - -# sudo pip3 install pillow - -#fi - -changed=0 -value=`cat /home/pi/CubeSatSim/sim.cfg` -# echo "$value" -echo "$value" > /dev/null -set -- $value - -if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign -if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count -if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat -if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon -if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode -if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch -if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency -if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency -if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode -if [ -z "${10}" ] ; then m1="0" ; changed=1 ; else m1=${10} ; fi # rx pl code -if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code - -if [ $changed -eq 1 ]; then - echo -e "Current sim.cfg configuration file:" - echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" - echo - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 > /home/pi/CubeSatSim/sim.cfg - echo -fi - -if [ "$noreboot" = "0" ] ; then - - if [ $FLAG -eq 1 ]; then - echo "systemctl daemon-reload and reboot" - sudo systemctl daemon-reload - sudo reboot -h now -# sudo cubesatsim - else - grep 'changed' /home/pi/CubeSatSim/.updated - if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then - echo "reboot due to code changes " | wall - sudo reboot -h now -# sudo cubesatsim - else - echo "nothing to do." - fi - fi -else - if [ $FLAG -eq 1 ]; then - echo "reboot needed for changes to take effect" | wall - fi -fi - -echo "CubeSatSim update complete." diff --git a/update b/update new file mode 120000 index 00000000..f7ffc47a --- /dev/null +++ b/update @@ -0,0 +1 @@ +install \ No newline at end of file From 9518ba870ed4548fcaf00285b0578312a9a300c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 25 Feb 2026 16:04:55 -0500 Subject: [PATCH 0515/1744] Update GPIO output and setup for PTT pin 20 Refactor GPIO handling to use RPi.GPIO library for pin 20. --- transmit.py | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/transmit.py b/transmit.py index 0ba37e65..66973178 100644 --- a/transmit.py +++ b/transmit.py @@ -1,7 +1,7 @@ #!/usr/bin/env python -#import RPi.GPIO as GPIO -#from RPi.GPIO import output +import RPi.GPIO as GPIO +from RPi.GPIO import output #import subprocess import time from time import sleep @@ -15,9 +15,12 @@ import random import subprocess def output(pin, value): - command = "gpio -g write " + str(pin) + " " + str(value) - system(command) - print(command) + if (pin != 20): + command = "gpio -g write " + str(pin) + " " + str(value) + system(command) + print(command) + else: # ptt pin + GPIO.output(pin, value) def input(pin): # command = "gpio -g read " + str(pin) @@ -37,9 +40,17 @@ def input(pin): def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": - command = "gpio -g mode " + str(pin) + " " + config - system(command) - print(command) + if (pin != 20): + command = "gpio -g mode " + str(pin) + " " + config + system(command) + print(command) + else: # ptt pin + GPIO.setwarnings(False) + GPIO.setmode(GPIO.BCM) + if config == "out: + GPIO.setup(27, GPIO.OUT) + else: + GPIO.setup(27, GPIO.IN) else: print(f"Unknown GPIO setup configuration: {config}") From e14ec3569f179354936368e471dce808a232e7e6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 26 Feb 2026 11:06:05 -0500 Subject: [PATCH 0516/1744] Refactor telemetry CSV format and remove empty lines Removed unused lines and adjusted telemetry data format. --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 62f4b01f..cf5b8ff9 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -60,9 +60,3 @@ 58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler - - - - - - From 50d07574682d32187c9c4a11e8fae952654217ac Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 09:52:00 -0500 Subject: [PATCH 0518/1744] Implement telemetry binary file saving for PACSAT mode Added PACSAT mode handling to save telemetry data to a binary file. --- main.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index f520add1..25ae2ed0 100644 --- a/main.c +++ b/main.c @@ -873,9 +873,9 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV or PACSAT or PACSATGND + } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); sleep(30); } @@ -1562,7 +1562,22 @@ void get_tlm_fox() { encodeA(b, 63 + head_offset, 0x00); encodeA(b, 62 + head_offset, 0x01); encodeB(b, 74 + head_offset, 0xfff); - } + } + + if (mode == PACSAT) + { + telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); + if (telem_binary != NULL) { + int bytes_written = fwrite(b, 78, 1, telem_binary); + printf("Writing %d bytes to tlm.bin\n", bytes_written); + fclose(telem_binary); + } + else + printf("Error opening tlm.bin\n"); + } + else + + { short int data10[headerLen + rsFrames * (rsFrameLen + parityLen)]; short int data8[headerLen + rsFrames * (rsFrameLen + parityLen)]; @@ -1873,7 +1888,8 @@ void get_tlm_fox() { firstTime = 0; // else if (frames_sent > 0) //5) // firstTime = 0; - + + } return; } From d098731eca97ffeab210948a5b5dd0fd02a45257 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 09:52:35 -0500 Subject: [PATCH 0519/1744] Declare telem_binary variable at the point of use --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 25ae2ed0..6804af68 100644 --- a/main.c +++ b/main.c @@ -1566,7 +1566,7 @@ void get_tlm_fox() { if (mode == PACSAT) { - telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); + FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { int bytes_written = fwrite(b, 78, 1, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written); From a9c574d4ede56e7514d413043a38342ce644e012 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 10:11:13 -0500 Subject: [PATCH 0520/1744] Fix extra brackets in main.c Removed extra brackets that were unnecessary in the code. --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 6804af68..8d1b7615 100644 --- a/main.c +++ b/main.c @@ -1576,7 +1576,7 @@ void get_tlm_fox() { printf("Error opening tlm.bin\n"); } else - + { // extra bracket for some reason? { short int data10[headerLen + rsFrames * (rsFrameLen + parityLen)]; short int data8[headerLen + rsFrames * (rsFrameLen + parityLen)]; @@ -1890,6 +1890,7 @@ void get_tlm_fox() { // firstTime = 0; } + } // extra bracket for some reason? return; } From feab25f51c4cbbfaaa5fad494489b6e872c26e06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 10:12:51 -0500 Subject: [PATCH 0521/1744] Fix fwrite call to use sizeof(char) for byte count --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 8d1b7615..3ff0e941 100644 --- a/main.c +++ b/main.c @@ -1568,7 +1568,7 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { - int bytes_written = fwrite(b, 78, 1, telem_binary); + int bytes_written = fwrite(b, sizeof(char), 78, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written); fclose(telem_binary); } From e82b0fb7b5016c25221c90f1783ecb5e973117a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 10:39:20 -0500 Subject: [PATCH 0522/1744] Fix byte count for writing to tlm.bin to 70 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 3ff0e941..f1d491ac 100644 --- a/main.c +++ b/main.c @@ -1568,7 +1568,7 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { - int bytes_written = fwrite(b, sizeof(char), 78, telem_binary); + int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written); fclose(telem_binary); } From 195f8fac1a89969fca243deab970086cb257299b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:31:15 -0500 Subject: [PATCH 0523/1744] Add timestamp field to telemetry CSV Added a timestamp field to the telemetry data. --- .../PacSatSim_maxtelemetry.csv | 126 +++++++++--------- 1 file changed, 64 insertions(+), 62 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv index 9bf2f291..7713c778 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv @@ -1,62 +1,64 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -1,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage -3,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current -7,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage -9,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage -12,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current -15,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current -16,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current -17,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current -18,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current -19,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current -20,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage -21,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -24,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication -26,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity -31,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current -32,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature -33,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -34,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -37,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -38,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -40,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -41,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator -42,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received -43,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status -44,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status -45,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status -46,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -48,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -49,MAX,rf6,12,-,0,NONE,0,0,0,None,None -50,MAX,rf7,12,-,0,NONE,0,0,0,None,None -51,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -53,MAX,pad,4,-,34,NONE,0,0,0,None,Unused -54,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -55,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler -56,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -57,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -58,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -59,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -60,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler +62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds +1,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +3,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage +4,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +5,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +6,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +7,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current +8,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +9,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage +10,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage +11,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage +12,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage +13,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage +14,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage +15,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current +16,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current +17,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current +18,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current +19,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current +20,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current +21,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage +22,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +23,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +24,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +25,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +26,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication +27,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +28,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +29,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +30,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +31,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity +32,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current +33,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature +34,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +35,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +36,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +37,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +38,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +39,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +40,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +41,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +42,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator +43,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received +44,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status +45,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status +46,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status +47,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted +48,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V +49,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +50,MAX,rf6,12,-,0,NONE,0,0,0,None,None +51,MAX,rf7,12,-,0,NONE,0,0,0,None,None +52,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +53,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +54,MAX,pad,4,-,34,NONE,0,0,0,None,Unused +55,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +56,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler +57,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +58,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +59,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +60,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +61,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 903c4e1e1a269eef59e0999215199d1575d99a27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:38:13 -0500 Subject: [PATCH 0524/1744] Modify telemetry CSV to add timestamp and update data types Updated telemetry data format to include timestamp and change data types from integer to float for various sensors. --- .../PacSatSim_rttelemetry.csv | 125 +++++++++--------- 1 file changed, 63 insertions(+), 62 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index cf5b8ff9..818c8360 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,62 +1,63 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,realTime,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -1,realTime,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,realTime,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage -3,realTime,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,realTime,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,realTime,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,realTime,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current -7,realTime,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,realTime,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage -9,realTime,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,realTime,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,realTime,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage -12,realTime,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,realTime,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,realTime,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current -15,realTime,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current -16,realTime,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current -17,realTime,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current -18,realTime,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current -19,realTime,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current -20,realTime,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage -21,realTime,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,realTime,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,realTime,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -24,realTime,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,realTime,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication -26,realTime,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,realTime,SatelliteXAxisAngularVelocity,12,dps,31,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,realTime,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,realTime,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,realTime,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity -31,realTime,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current -32,realTime,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -33,realTime,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -34,realTime,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,realTime,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,realTime,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -37,realTime,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -38,realTime,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,realTime,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -40,realTime,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -41,realTime,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator -42,realTime,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received -43,realTime,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status -44,realTime,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status -45,realTime,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status -46,realTime,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,realTime,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V -48,realTime,ICR2dot5VProt,12,V,0,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -49,realTime,rf6,12,-,0,NONE,0,0,0,None,None -50,realTime,rf7,12,-,0,NONE,0,0,0,None,None -51,realTime,MuxTest,12,V,0,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,realTime,LtVGACtl,12,V,0,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -53,realTime,pad,4,-,34,NONE,0,0,0,None,Unused -54,realTime,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -55,realTime,pad1,1,-,0,NONE,0,0,0,NONE,Filler -56,realTime,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -57,realTime,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -58,realTime,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -59,realTime,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -60,realTime,pad2,27,-,0,NONE,0,0,0,NONE,Filler +62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION +0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds +1,float,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,float,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +3,float,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage +4,float,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis +5,float,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis +6,float,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis +7,float,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current +8,float,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature +9,float,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage +10,float,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage +11,float,posZv,12,V,29,+Z Panel,9,1,3,Voltage,INA219 +Z solar panel Voltage +12,float,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage +13,float,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage +14,float,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage +15,float,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current +16,float,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +17,float,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +18,float,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current +19,float,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +20,float,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage +22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells +23,float,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +24,float,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count +26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication +27,float,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi +28,float,SatelliteXAxisAngularVelocity,12,dps,31,+X Panel,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis +29,float,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis +30,float,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis +31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity +32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature +34,float,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +35,float,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) +37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator +38,float,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +39,float,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +40,float,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +41,float,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +42,float,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator +43,float,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +44,float,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status +45,float,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +46,float,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status +47,float,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted +48,float,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V +49,float,ICR2dot5VProt,12,V,0,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected +50,float,rf6,12,-,0,NONE,0,0,0,None,None +51,float,rf7,12,-,0,NONE,0,0,0,None,None +52,float,MuxTest,12,V,0,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR +53,float,LtVGACtl,12,V,0,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) +54,float,pad,4,-,34,NONE,0,0,0,None,Unused +55,float,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance +56,float,pad1,1,-,0,NONE,0,0,0,NONE,Filler +57,float,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds +58,float,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information +59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset +60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset +61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler From 1e484a3beb6d227d1ced3f7fa17cbb736ce5438f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:47:05 -0500 Subject: [PATCH 0525/1744] Add timestamp at start of tlm --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index f1d491ac..2e83cf63 100644 --- a/main.c +++ b/main.c @@ -1568,8 +1568,10 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { + time_t now = time(0); + fwrite(b, sizeof(how), 1, &now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); - printf("Writing %d bytes to tlm.bin\n", bytes_written); + printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); } else From e686d1bf17787a84152501fc8b73ff12e116ac19 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:47:45 -0500 Subject: [PATCH 0526/1744] Fix fwrite size argument for time variable --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 2e83cf63..aab0a37a 100644 --- a/main.c +++ b/main.c @@ -1569,7 +1569,7 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { time_t now = time(0); - fwrite(b, sizeof(how), 1, &now); + fwrite(b, sizeof(now), 1, &now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 19bed2ab7368a7dd65119379abbd129d7e70f2f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:48:42 -0500 Subject: [PATCH 0527/1744] Update main.c with correct time --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index aab0a37a..216b192e 100644 --- a/main.c +++ b/main.c @@ -1569,7 +1569,7 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { time_t now = time(0); - fwrite(b, sizeof(now), 1, &now); + fwrite(b, sizeof(now), 1, now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 5d2b573377c130b2a276cd5e0aa5647a284725ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:51:13 -0500 Subject: [PATCH 0528/1744] Update main.c fix timestamp --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 216b192e..b6e8c452 100644 --- a/main.c +++ b/main.c @@ -1568,8 +1568,8 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { - time_t now = time(0); - fwrite(b, sizeof(now), 1, now); + unsigned int now = (unsigned int)time(0); + fwrite(b, sizeof(now), 1, &now); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 67d4b97fde3034ec95f29596c9c38bbe63cb3c68 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 12:53:19 -0500 Subject: [PATCH 0529/1744] Update main.c fix timestamp write --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index b6e8c452..df40ddf3 100644 --- a/main.c +++ b/main.c @@ -1569,7 +1569,7 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { unsigned int now = (unsigned int)time(0); - fwrite(b, sizeof(now), 1, &now); + fwrite(&now, sizeof(now), 1, telem_binary); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); From 83ebcba750a1dde9c5ff3546808fd8060d191b38 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:06:04 -0500 Subject: [PATCH 0530/1744] print battery voltage for debugging --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index df40ddf3..e9f076ba 100644 --- a/main.c +++ b/main.c @@ -1342,6 +1342,7 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); encodeA(b, 3 + head_offset, batt_c_v); + printf("batt_c_v: %d \n", batt_c_v); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel From b6f3537debc4641a52af3dba50763d73b46d2a92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:12:01 -0500 Subject: [PATCH 0531/1744] Update main.c print b --- main.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.c b/main.c index e9f076ba..69f40426 100644 --- a/main.c +++ b/main.c @@ -1569,6 +1569,14 @@ void get_tlm_fox() { { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { + + int count; + printf("b is: \n"); + for (count = 0; count < 70; count++) { + printf("%02X", b[count]); + } + printf("\n"); + unsigned int now = (unsigned int)time(0); fwrite(&now, sizeof(now), 1, telem_binary); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); From 3f6dcead9befce80220eb856ba8205836cf5d047 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:18:35 -0500 Subject: [PATCH 0532/1744] Update main.c with index print --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 69f40426..5af47262 100644 --- a/main.c +++ b/main.c @@ -1342,7 +1342,7 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); encodeA(b, 3 + head_offset, batt_c_v); - printf("batt_c_v: %d \n", batt_c_v); + printf("batt_c_v: %d 3+head_offset: %d\n", batt_c_v, 3+head_offset); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel From 7ce0510324fe9949826a99b35b8da9ed7b31aca7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:29:59 -0500 Subject: [PATCH 0533/1744] Update main.c print first 5 bytes of b --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index 5af47262..af617292 100644 --- a/main.c +++ b/main.c @@ -1341,7 +1341,9 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); + printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); encodeA(b, 3 + head_offset, batt_c_v); + printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); printf("batt_c_v: %d 3+head_offset: %d\n", batt_c_v, 3+head_offset); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel From 3aee1d6a32287e1d23bd6ec996076718e114b94f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:35:39 -0500 Subject: [PATCH 0534/1744] Fix b declaration bug --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index af617292..27481725 100644 --- a/main.c +++ b/main.c @@ -1175,6 +1175,8 @@ void get_tlm_fox() { smaller = (int) (S_RATE / (2 * freq_Hz)); + if (mode == PACSAT) + dataLen = 78; short int b[dataLen]; short int b_max[dataLen]; short int b_min[dataLen]; @@ -1542,7 +1544,7 @@ void get_tlm_fox() { encodeA(b, 51 + head_offset, status); encodeB(b, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); - if (mode == BPSK) { + if ((mode == BPSK) || (mode == PACSAT)) { encodeA(b_max, 51 + head_offset, status); encodeA(b_min, 51 + head_offset, status); encodeB(b_max, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); From 536e03dd0e4d6ce538b2dd88759bb7433a20968f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:51:21 -0500 Subject: [PATCH 0535/1744] Update main.c print bytes of b[] --- main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 27481725..edd0ae0e 100644 --- a/main.c +++ b/main.c @@ -1574,16 +1574,18 @@ void get_tlm_fox() { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { + int bytes_written = 4; + unsigned int now = (unsigned int)time(0); + fwrite(&now, sizeof(now), 1, telem_binary); + int count; printf("b is: \n"); for (count = 0; count < 70; count++) { - printf("%02X", b[count]); + fwrite((char)b[count], 1, 1, telem_binary); + printf("%02X ", b[count]); + bytes_written++; } printf("\n"); - - unsigned int now = (unsigned int)time(0); - fwrite(&now, sizeof(now), 1, telem_binary); - int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); fclose(telem_binary); } From a6beb17b670109d09b455a60813fc9719ab955e0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 13:53:15 -0500 Subject: [PATCH 0536/1744] Update main.c change to bytes --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index edd0ae0e..5707acae 100644 --- a/main.c +++ b/main.c @@ -1579,10 +1579,12 @@ void get_tlm_fox() { fwrite(&now, sizeof(now), 1, telem_binary); int count; + char byte; printf("b is: \n"); for (count = 0; count < 70; count++) { - fwrite((char)b[count], 1, 1, telem_binary); - printf("%02X ", b[count]); + byte = b[count]; + fwrite(&byte, 1, 1, telem_binary); + printf("%02X ", byte); bytes_written++; } printf("\n"); From 2b82a75a8553aa0a79426a162dc1d4900fc57c00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 14:43:58 -0500 Subject: [PATCH 0537/1744] Update PacSatSim_rttelemetry.csv --- .../PacSatSim_rttelemetry.csv | 39 ++++++++++--------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 818c8360..6c4c6485 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,7 +1,7 @@ 62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds -1,float,Sensor 2,12,integer,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -2,float,Sensor 3,12,integer,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +1,int,Sensor 2,12,1,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,int,Sensor 3,12,1,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 3,float,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage 4,float,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis 5,float,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis @@ -14,15 +14,15 @@ 12,float,negXv,12,V,29,-X Panel,10,1,3,Voltage,INA219 -X solar panel Voltage 13,float,negYv,12,V,29,-Y Panel,11,1,3,Voltage,INA219 -Y solar panel Voltage 14,float,negZv,12,V,29,-Z Panel,12,1,3,Voltage,INA219 -Z solar panel Voltage -15,float,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current -16,float,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current -17,float,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current -18,float,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current -19,float,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current -20,float,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current +15,int,posXi,12,mA,31,+X Panel,7,2,3,Current,INA219 +X solar panel Current +16,int,posYi,12,mA,31,+Y Panel,8,2,3,Current,INA219 +Y solar panel Current +17,int,posZi,12,mA,31,+Z Panel,9,2,3,Current,INA219 +Z solar panel Current +18,int,negXi,12,mA,31,-X Panel,10,2,3,Current,INA219 -X solar panel Current +19,int,negYi,12,mA,31,-Y Panel,11,2,3,Current,INA219 -Y solar panel Current +20,int,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current 21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -23,float,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,int,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 24,float,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count 26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication @@ -33,18 +33,18 @@ 31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity 32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,float,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -35,float,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator +34,int,Sensor 1,1,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +35,float,STEMPayloadStatus,1,-,35,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) 37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -38,float,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -39,float,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -40,float,I2CBus1Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -41,float,I2CBus3Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -42,float,CameraFailure,1,-,17,Computer Hardware,2,4,0,Camera,Camera failure indicator -43,float,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received -44,float,RxAntenna,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status -45,float,TxAntenna,1,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status +38,float,PayloadStatus1,1,-,35,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator +39,float,I2CBus0Failure,1,-,35,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator +40,float,I2CBus1Failure,1,-,35,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator +41,float,I2CBus3Failure,1,-,35,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator +42,float,CameraFailure,1,-,35,Computer Hardware,2,4,0,Camera,Camera failure indicator +43,int,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +44,float,RxAntenna,1,-,36,Radio,1,3,0,RX Antenna,Receive antenna status +45,float,TxAntenna,1,-,36,Radio,1,2,0,TX Antenna,Transmit antenna status 46,float,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status 47,float,ICR3VProt,12,V,0,NONE,7,2,3,3V Prot,ICR 3V Proteted 48,float,ICR2dot5V,12,V,0,NONE,7,3,3,2.5V,ICR 2.5V @@ -61,3 +61,4 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From e9d485cf5111eb3d0aec5047029df6a8c5c57f50 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 14:44:09 -0500 Subject: [PATCH 0538/1744] Update PacSatSim-coef.csv --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 46902f05..a683c5cc 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -31,8 +31,10 @@ 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset -33,-,Status,0,0,0,0,0,0,Enum,0,4096,ON:OFF +33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:OFF 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS +35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,FAIL:OK +36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 836b45a86794828016a7db97e2f61d6f018552b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 14:49:11 -0500 Subject: [PATCH 0539/1744] Update PacSatSim_rttelemetry.csv remove blank lines at end --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 6c4c6485..84e00afd 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -61,4 +61,3 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From 501769acea9ba0630a5d4238b6cfd8321d39447a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 15:04:30 -0500 Subject: [PATCH 0540/1744] Update PacSatSim-coef.csv fix On/Off --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index a683c5cc..16ffe513 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -31,7 +31,7 @@ 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset 31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset -33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:OFF +33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,FAIL:OK 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED From 03a06b453dd50101a2ead16edd67fe7a40cfc9a6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 15:08:49 -0500 Subject: [PATCH 0541/1744] Update PacSatSim_rttelemetry.csv fix commands count --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 84e00afd..73c94314 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -42,7 +42,7 @@ 40,float,I2CBus1Failure,1,-,35,Computer Hardware,2,2,0,I2C Bus 1,I2C bus 1 failure indicator 41,float,I2CBus3Failure,1,-,35,Computer Hardware,2,3,0,I2C Bus 3,I2C bus 3 failure indicator 42,float,CameraFailure,1,-,35,Computer Hardware,2,4,0,Camera,Camera failure indicator -43,int,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received +43,int,GroundCommands,4,-,2,Computer Software,3,3,0,Ground Commands,Number of ground commands received 44,float,RxAntenna,1,-,36,Radio,1,3,0,RX Antenna,Receive antenna status 45,float,TxAntenna,1,-,36,Radio,1,2,0,TX Antenna,Transmit antenna status 46,float,C2CStatus,2,-,34,Computer Software,3,5,0,Command Control, Command & Control Status @@ -61,3 +61,4 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 18f67be38d80ea6ec1fa868927de225716050e71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 15:10:15 -0500 Subject: [PATCH 0542/1744] Update PacSatSim_rttelemetry.csv remove extra blank lines at end --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 1 - 1 file changed, 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index 73c94314..df8217cb 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -61,4 +61,3 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From ab26f6f34384a45505d0abbc40cfa50f9d95ea95 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:04:35 -0500 Subject: [PATCH 0544/1744] cleanup --- main.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index 5707acae..395d67db 100644 --- a/main.c +++ b/main.c @@ -1343,10 +1343,7 @@ void get_tlm_fox() { // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below // encodeB(b, 1 + head_offset, batt_b_v); - printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); encodeA(b, 3 + head_offset, batt_c_v); - printf("%02X%02X%02X%02X%02X\n", b[0],b[1],b[2],b[3],b[4]); - printf("batt_c_v: %d 3+head_offset: %d\n", batt_c_v, 3+head_offset); encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel @@ -1898,11 +1895,6 @@ void get_tlm_fox() { //transmitStatus = -1; } } - if (!transmit) { - fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); - fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); - } - if (socket_open == 1) firstTime = 0; // else if (frames_sent > 0) //5) @@ -1910,6 +1902,12 @@ void get_tlm_fox() { } } // extra bracket for some reason? + + if (!transmit) { + fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); + fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); + } + return; } From 9bb0dbac56135556156d01b2867ef50ccd8ce8ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:14:37 -0500 Subject: [PATCH 0545/1744] Update log with -h and r option for realtime --- log | 74 ++++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 56 insertions(+), 18 deletions(-) diff --git a/log b/log index f5b301c5..55f3c9c1 100755 --- a/log +++ b/log @@ -2,26 +2,64 @@ echo -e "\nLog file script for CubeSatSim\n" -echo "To exit, type Control-C" +if [ "$1" = "-h" ] ; then + echo "Displays systemd logs for the chose process. The choices are:" + echo " -d cubesatsim (also no choice gives you this)" + echo " -t transmit " + echo " -c command and control" + echo "Default is the log is dumpted to the screen and written to a file." + echo "If an additional r is included, the log is realtime, and exits with a Control-C" + echo + exit +fi + +REALTIME=0 +if [ "$2" = "r" ] ; then + REALTIME=1 +fi -echo +if [ "$REALTIME" = "1" ] ; then -sleep 2 + echo "To exit, type Control-C" + echo + sleep 2 + + if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then + sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt + # cat /home/pi/CubeSatSim/logt.txt + # echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" + elif [ "$1" = "-c" ]; then + sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt + cat /home/pi/CubeSatSim/logc.txt + # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" + elif [ "$1" = "-p" ]; then + sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt + cat /home/pi/CubeSatSim/logp.txt + # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" + else + sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt + # cat /home/pi/CubeSatSim/log.txt + # echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + fi -if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then - sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt -# cat /home/pi/CubeSatSim/logt.txt -# echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" -elif [ "$1" = "-c" ]; then - sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt - cat /home/pi/CubeSatSim/logc.txt -# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" -elif [ "$1" = "-p" ]; then - sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt - cat /home/pi/CubeSatSim/logp.txt -# echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else - sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt -# cat /home/pi/CubeSatSim/log.txt -# echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + + if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then + sudo journalctl -u transmit > /home/pi/CubeSatSim/logt.txt + cat /home/pi/CubeSatSim/logt.txt + echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" + elif [ "$1" = "-c" ]; then + sudo journalctl -u command > /home/pi/CubeSatSim/logc.txt + cat /home/pi/CubeSatSim/logc.txt + echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" + elif [ "$1" = "-p" ]; then + sudo journalctl -u pacsatsim > /home/pi/CubeSatSim/logp.txt + cat /home/pi/CubeSatSim/logp.txt + echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" + else + sudo journalctl -u cubesatsim > /home/pi/CubeSatSim/log.txt + cat /home/pi/CubeSatSim/log.txt + echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" + fi + fi From ef4627cd76a2dcc58c03c100d0daa48a8df1b59b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:16:49 -0500 Subject: [PATCH 0546/1744] Update log add back -a --- log | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/log b/log index 55f3c9c1..a516a3c0 100755 --- a/log +++ b/log @@ -5,8 +5,9 @@ echo -e "\nLog file script for CubeSatSim\n" if [ "$1" = "-h" ] ; then echo "Displays systemd logs for the chose process. The choices are:" echo " -d cubesatsim (also no choice gives you this)" - echo " -t transmit " + echo " -t transmit" echo " -c command and control" + echo " -p pacsat" echo "Default is the log is dumpted to the screen and written to a file." echo "If an additional r is included, the log is realtime, and exits with a Control-C" echo @@ -45,19 +46,19 @@ if [ "$REALTIME" = "1" ] ; then else if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then - sudo journalctl -u transmit > /home/pi/CubeSatSim/logt.txt + sudo journalctl -a -u transmit > /home/pi/CubeSatSim/logt.txt cat /home/pi/CubeSatSim/logt.txt echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then - sudo journalctl -u command > /home/pi/CubeSatSim/logc.txt + sudo journalctl -a -u command > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then - sudo journalctl -u pacsatsim > /home/pi/CubeSatSim/logp.txt + sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" else - sudo journalctl -u cubesatsim > /home/pi/CubeSatSim/log.txt + sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" fi From d20b8e625f009c370ca36b44b72779e26053152c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:26:21 -0500 Subject: [PATCH 0547/1744] Update main.c reset firstTime --- main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.c b/main.c index 395d67db..9eb4fe5d 100644 --- a/main.c +++ b/main.c @@ -1907,6 +1907,9 @@ void get_tlm_fox() { fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } + + if (firstTime && (mode == PACSAT)) + firstTime = 0; return; } From 377f9090d6b3e779c57a706db370a7a817898849 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:32:46 -0500 Subject: [PATCH 0548/1744] Update main.c print for first time off --- main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 9eb4fe5d..b848460b 100644 --- a/main.c +++ b/main.c @@ -1909,8 +1909,10 @@ void get_tlm_fox() { } if (firstTime && (mode == PACSAT)) - firstTime = 0; - + { + firstTime = OFF; + fprintf(stderr, "No longer first time\n"); + } return; } From da78c071f19ee39a12902c4a9170ba07f05bd3ba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:34:10 -0500 Subject: [PATCH 0549/1744] Update main.c add fflush --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index b848460b..8d67227e 100644 --- a/main.c +++ b/main.c @@ -1912,6 +1912,7 @@ void get_tlm_fox() { { firstTime = OFF; fprintf(stderr, "No longer first time\n"); + fflush(stdout); } return; } From 8e8a4b3dee1f881e26af3289c805dd99f2fedfb2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:37:57 -0500 Subject: [PATCH 0551/1744] Update main.c comment out first time --- main.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 8d67227e..a38404fe 100644 --- a/main.c +++ b/main.c @@ -1908,12 +1908,12 @@ void get_tlm_fox() { fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } - if (firstTime && (mode == PACSAT)) - { - firstTime = OFF; - fprintf(stderr, "No longer first time\n"); - fflush(stdout); - } +// if (firstTime && (mode == PACSAT)) +// { +// firstTime = OFF; +// fprintf(stderr, "No longer first time\n"); +// fflush(stdout); +// } return; } From 368883dcd97dc456f2523c7e404b0252aca7fed9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:41:32 -0500 Subject: [PATCH 0552/1744] Update main.c move sampleTime set --- main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/main.c b/main.c index a38404fe..e0395330 100644 --- a/main.c +++ b/main.c @@ -1883,8 +1883,7 @@ void get_tlm_fox() { printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); } } - sampleTime = (unsigned int) millis(); // resetting time for sleeping - fflush(stdout); + // if (firstTime == 1) // max -= 1; } @@ -1908,12 +1907,16 @@ void get_tlm_fox() { fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } -// if (firstTime && (mode == PACSAT)) -// { -// firstTime = OFF; -// fprintf(stderr, "No longer first time\n"); -// fflush(stdout); -// } + if (firstTime && (mode == PACSAT)) + { + firstTime = OFF; + fprintf(stderr, "No longer first time\n"); + fflush(stdout); + } + + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); + return; } From 8d9fb6b481b2731a3840588648276b705385acdb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:43:51 -0500 Subject: [PATCH 0553/1744] Update main.c revert last change --- main.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/main.c b/main.c index e0395330..a38404fe 100644 --- a/main.c +++ b/main.c @@ -1883,7 +1883,8 @@ void get_tlm_fox() { printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); } } - + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); // if (firstTime == 1) // max -= 1; } @@ -1907,16 +1908,12 @@ void get_tlm_fox() { fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); } - if (firstTime && (mode == PACSAT)) - { - firstTime = OFF; - fprintf(stderr, "No longer first time\n"); - fflush(stdout); - } - - sampleTime = (unsigned int) millis(); // resetting time for sleeping - fflush(stdout); - +// if (firstTime && (mode == PACSAT)) +// { +// firstTime = OFF; +// fprintf(stderr, "No longer first time\n"); +// fflush(stdout); +// } return; } From 2c7bfa025a53ab229ec02d3cf3e207f1f3b9c644 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:46:09 -0500 Subject: [PATCH 0554/1744] Update main.c try turning firstTime off a different place --- main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index a38404fe..42ea344c 100644 --- a/main.c +++ b/main.c @@ -1230,9 +1230,12 @@ void get_tlm_fox() { fflush(stdout); sampleTime = (unsigned int) millis(); - } else + } else + { printf("first time - no sleep\n"); - + firstTime = OFF; + } + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); loopTime = millis(); From 8b8ddc567b8bd499ff411f83759f07e2abbcad8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:47:59 -0500 Subject: [PATCH 0555/1744] Update main.c move sampleTime --- main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.c b/main.c index 42ea344c..07af1578 100644 --- a/main.c +++ b/main.c @@ -1228,13 +1228,12 @@ void get_tlm_fox() { /**/ printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, (unsigned int)frameTime - 750 + pi_zero_2_offset); fflush(stdout); - - sampleTime = (unsigned int) millis(); } else { printf("first time - no sleep\n"); firstTime = OFF; } + sampleTime = (unsigned int) millis(); printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); From 3a805cbfe0fdabcd98c1ccc34975807ef17ecd71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:49:37 -0500 Subject: [PATCH 0556/1744] Update main.c again revert --- main.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 07af1578..a38404fe 100644 --- a/main.c +++ b/main.c @@ -1228,13 +1228,11 @@ void get_tlm_fox() { /**/ printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, (unsigned int)frameTime - 750 + pi_zero_2_offset); fflush(stdout); - } else - { + + sampleTime = (unsigned int) millis(); + } else printf("first time - no sleep\n"); - firstTime = OFF; - } - sampleTime = (unsigned int) millis(); - + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); loopTime = millis(); From d05019609d05268f23a14809b455112f9d7de424 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 18:53:14 -0500 Subject: [PATCH 0557/1744] Update main.c write b to dataLen --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index a38404fe..f9c42d01 100644 --- a/main.c +++ b/main.c @@ -1578,7 +1578,7 @@ void get_tlm_fox() { int count; char byte; printf("b is: \n"); - for (count = 0; count < 70; count++) { + for (count = 0; count < dataLen; count++) { byte = b[count]; fwrite(&byte, 1, 1, telem_binary); printf("%02X ", byte); From 5d32e76ca90de74dc5b30f8200d90c38d7a8b710 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:10:02 -0500 Subject: [PATCH 0558/1744] Update pacsatsim.sh with pacsat_telem --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 76e37d1c..8e89588d 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -201,6 +201,8 @@ else echo fi +sudo /home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & + sleep 5 value=`aplay -l | grep "Loopback"` From 1721b465288d6eca23d017a4c91f869d56d3f751 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:32:14 -0500 Subject: [PATCH 0559/1744] Update install add pacsat_telem install --- install | 87 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 46 insertions(+), 41 deletions(-) diff --git a/install b/install index 40c70f12..1d4c8926 100755 --- a/install +++ b/install @@ -124,49 +124,54 @@ cd rpitx ./install.sh -cd - -git clone https://github.com/alanbjohnston/iors_common.git - -cd iors_common/Debug/ - -make all - -sudo ./install.sh - -cd - -#git clone https://github.com/alanbjohnston/pi_pacsat.git -git clone https://github.com/ac2cz/pi_pacsat.git - -cd pi_pacsat - -#git checkout master-debug - -cd Debug - -make all - -mkdir /home/pi/PacSat -mkdir /home/pi/PacSat/pacsat -mkdir /home/pi/PacSat/pacsat/dir -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=AMSAT-12" >> pacsat.config -echo "broadcast_callsign=AMSAT-11" >> pacsat.config -echo "digi_callsign=AMSAT-1" >> pacsat.config -echo "max_frames_in_tx_buffer=5" >> pacsat.config +FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled +if [ -f "$FILE" ]; then + cd + git clone https://github.com/alanbjohnston/iors_common.git + cd iors_common/Debug/ + make all + sudo ./install.sh + + cd + #git clone https://github.com/alanbjohnston/pi_pacsat.git + git clone https://github.com/ac2cz/pi_pacsat.git + cd pi_pacsat + #git checkout master-debug + cd Debug + make all + + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + + export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH + + #value=`cat /home/pi/CubeSatSim/sim.cfg` + #echo "$value" > /dev/null + #set -- $value + + echo "bit_rate=9600" > pacsat.config + echo "bbs_callsign=AMSAT-12" >> pacsat.config + echo "broadcast_callsign=AMSAT-11" >> pacsat.config + echo "digi_callsign=AMSAT-1" >> pacsat.config + echo "max_frames_in_tx_buffer=5" >> pacsat.config + + echo "pb_open=1" > pacsat.state + echo "uplink_open=1" >> pacsat.state + echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state + echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state +fi -echo "pb_open=1" > pacsat.state -echo "uplink_open=1" >> pacsat.state -echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state -echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state +FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled +if [ -f "$FILE" ]; then + cd + git clone https://github.com/alanbjohnston/pacsat_telem.git + cd pacsat_telem + git checkout master-fox + cd Debug + make all +fi sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt From c52a8854199aaff03320f72f3eb822414ae4234f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:37:12 -0500 Subject: [PATCH 0560/1744] Update PacSatSim_rttelemetry.csv fixed sensor 1 size --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index df8217cb..f6e7f4c4 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -33,7 +33,7 @@ 31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity 32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,int,Sensor 1,1,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,int,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 35,float,STEMPayloadStatus,1,-,35,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) 37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator @@ -61,3 +61,4 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler + From 3d2836c3acfbca162d490393fd2ade2893e6b7c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:49:39 -0500 Subject: [PATCH 0561/1744] Update main.c turn firstTime off with sleepTime set --- main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index f9c42d01..9b67d612 100644 --- a/main.c +++ b/main.c @@ -461,7 +461,8 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); - } else if (mode == BPSK) { +// } else if (mode == BPSK) { + } else { bitRate = 1200; rsFrames = 3; payloads = 6; @@ -873,7 +874,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (AT)) {// FSK or BPSK get_tlm_fox(); } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); @@ -1175,8 +1176,8 @@ void get_tlm_fox() { smaller = (int) (S_RATE / (2 * freq_Hz)); - if (mode == PACSAT) - dataLen = 78; +// if (mode == PACSAT) +// dataLen = 78; short int b[dataLen]; short int b_max[dataLen]; short int b_min[dataLen]; @@ -1231,7 +1232,10 @@ void get_tlm_fox() { sampleTime = (unsigned int) millis(); } else + { printf("first time - no sleep\n"); + firstTime = OFF; + } printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); fflush(stdout); From dc9cdb2034d2d33de9c5e1653479af19fa84e816 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:51:46 -0500 Subject: [PATCH 0562/1744] Update main.c fix missing mode == PACSAT --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 9b67d612..2ce98d40 100644 --- a/main.c +++ b/main.c @@ -874,7 +874,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (AT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACAT)) {// FSK or BPSK get_tlm_fox(); } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); From 74cdc3609a383d24e9fb95d7ce1bfd9cf9cee100 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 19:52:20 -0500 Subject: [PATCH 0563/1744] Update main.c PACAT typo --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 2ce98d40..42e07e43 100644 --- a/main.c +++ b/main.c @@ -874,7 +874,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (mode == PACAT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK get_tlm_fox(); } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); From f68ac4909508aece6c8a8285f8498660ff6921d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 20:23:12 -0500 Subject: [PATCH 0564/1744] Update main.c start and stop pacsatsim.service --- main.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 42e07e43..174a3bbb 100644 --- a/main.c +++ b/main.c @@ -236,7 +236,7 @@ int main(int argc, char * argv[]) { printf("Mode is Transmit Command\n"); } else if ( mode_string == 'p') { mode = PACSAT; - printf("Mode is Pacsat\n"); + printf("Mode is Pacsat\n"); } else if ( mode_string == 'P') { mode = PACSATGND; printf("Mode is Pacsat Ground Station\n"); @@ -246,6 +246,15 @@ int main(int argc, char * argv[]) { } } + if ( mode == PACSAT) { + FILE * pacsat_file = popen("sudo systemctl start cubesatsim", "r"); + pclose(pacsat_file); + } + else { + FILE * pacsat_file = popen("sudo systemctl stop cubesatsim", "r"); + pclose(pacsat_file); + } + // Open telemetry file with STEM Payload Data telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); if (telem_file == NULL) From 18ebea9d555765ada81226c8ae6876db2fd03c33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 20:30:30 -0500 Subject: [PATCH 0565/1744] Update main.c change to start/stop pacsatsim --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 174a3bbb..6634b079 100644 --- a/main.c +++ b/main.c @@ -247,11 +247,11 @@ int main(int argc, char * argv[]) { } if ( mode == PACSAT) { - FILE * pacsat_file = popen("sudo systemctl start cubesatsim", "r"); + FILE * pacsat_file = popen("sudo systemctl start pacsatsim", "r"); pclose(pacsat_file); } else { - FILE * pacsat_file = popen("sudo systemctl stop cubesatsim", "r"); + FILE * pacsat_file = popen("sudo systemctl stop pacsatsim", "r"); pclose(pacsat_file); } From 62fbf30df797265f7dd937ab49476ac7d652019d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 21:02:15 -0500 Subject: [PATCH 0566/1744] Update main.c print simulated telemetry mode --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 6634b079..f390000a 100644 --- a/main.c +++ b/main.c @@ -698,6 +698,7 @@ int main(int argc, char * argv[]) { } if (sim_mode) { // simulated telemetry + printf("Simulated telemetry mode\n"); double time = ((long int)millis() - time_start) / 1000.0; From e1b25b9aad53f10744d365ebeb20e77f15189f48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 21:05:24 -0500 Subject: [PATCH 0567/1744] Update main.c print simulated currents --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index f390000a..e09eb4b5 100644 --- a/main.c +++ b/main.c @@ -747,7 +747,7 @@ int main(int argc, char * argv[]) { current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; - // printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); + printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); batt -= (batt > 3.5) ? current[map[BAT]] / 30000 : current[map[BAT]] / 3000; if (batt < 3.0) { From 50c51e8993db6e730405a3eb49fe32004f1d1a8b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 28 Feb 2026 21:11:15 -0500 Subject: [PATCH 0568/1744] Update main.c fix simulated current --- main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index e09eb4b5..3561af56 100644 --- a/main.c +++ b/main.c @@ -745,7 +745,8 @@ int main(int argc, char * argv[]) { // float charging = current[map[PLUS_X]] + current[map[MINUS_X]] + current[map[PLUS_Y]] + current[map[MINUS_Y]] + current[map[PLUS_Z]] + current[map[MINUS_Z]]; float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0)); - current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; +// current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; + current[map[BAT]] = rnd_float(320, 510) - charging; printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); From 54f2e5eb373152caf955754719a56324a37eb438 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 07:52:29 -0500 Subject: [PATCH 0569/1744] Update PacSatSim_rttelemetry.csv from pacsat-v2.2-tlm2 --- .../PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index f6e7f4c4..ca11e389 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -1,12 +1,12 @@ 62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION 0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds -1,int,Sensor 2,12,1,1,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -2,int,Sensor 3,12,1,1,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 +1,int,Sensor 2,12,integer,2,Experiments,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 +2,int,Sensor 3,12,integer,2,Experiments,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 3,float,BATT_V,12,V,29,Battery,4,1,3,Battery Voltage,INA219 Battery Voltage 4,float,SatelliteXAxisAcceleration,12,g,30,+X Panel,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis 5,float,SatelliteYAxisAcceleration,12,g,30,+Y Panel,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis 6,float,SatelliteZAxisAcceleration,12,g,30,+Z Panel,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -7,float,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current +7,int,BATT_I,12,mA,31,Battery,4,2,3,Battery Current,INA219 Battery Current 8,float,Temperature,12,C,5,Experiments,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature 9,float,posXv,12,V,29,+X Panel,7,1,3,Voltage,INA219 +X solar panel Voltage 10,float,posYv,12,V,29,+Y Panel,8,1,3,Voltage,INA219 +Y solar panel Voltage @@ -31,9 +31,9 @@ 29,float,SatelliteYAxisAngularVelocity,12,dps,31,+Y Panel,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis 30,float,SatelliteZAxisAngularVelocity,12,dps,31,+Z Panel,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis 31,float,Humidity,12,%,5,Experiments,6,5,3,BME280 Humidity,BME280 Humidity -32,float,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current +32,int,BAT2_I,12,mA,31,Battery2,5,2,3,Battery2 Current,INA219 Battery2 Current 33,float,DiodeTemp,12,C,32,Experiments,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,int,Sensor 1,12,integer,1,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 +34,int,Sensor 1,12,integer,2,Experiments,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 35,float,STEMPayloadStatus,1,-,35,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator 36,float,SafeMode,1,-,33,Computer Software,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) 37,float,SimulatedTelemetry,1,-,33,Computer Software,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator @@ -61,4 +61,3 @@ 59,float,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset 60,float,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset 61,float,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From 3c7dc63dcdc1846252242b9ce00cd5564348cf1f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 07:59:26 -0500 Subject: [PATCH 0570/1744] Update main.c don't print BPSK config in PACSAT mode --- main.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 3561af56..edb162d7 100644 --- a/main.c +++ b/main.c @@ -493,8 +493,11 @@ int main(int argc, char * argv[]) { frameTime = ((float)((float)bufLen / (samples * frameCnt * bitRate))) * 1000; // frame time in ms - printf("\n BPSK Mode, bufLen: %d, %d bits per frame, %d bits per second, %d ms per frame %d ms sample period\n", - bufLen, bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); + if (mode == BPSK) + printf("\n BPSK Mode, bufLen: %d, %d bits per frame, %d bits per second, %d ms per frame %d ms sample period\n", + bufLen, bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); + else + printf("\n dataLen: %d \n", dataLen); sin_samples = S_RATE/freq_Hz; // printf("Sin map: "); @@ -510,7 +513,7 @@ int main(int argc, char * argv[]) { memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); - if (((mode == FSK) || (mode == BPSK))) // && !sim_mode) + if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored firstTime = 1; From 1cf2d7db43c24b8e647f2932ba61a187e31de252 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:02:04 -0500 Subject: [PATCH 0571/1744] Update PacSatSim-coef.csv swap FAIL and OK --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 16ffe513..48187077 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -33,7 +33,7 @@ 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS -35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,FAIL:OK +35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment From e1580b2962725b23de6431f302ac0032ea81ca81 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:22:41 -0500 Subject: [PATCH 0572/1744] Update install --- install | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/install b/install index 1d4c8926..d0f1ff2c 100755 --- a/install +++ b/install @@ -134,9 +134,9 @@ if [ -f "$FILE" ]; then sudo ./install.sh cd - #git clone https://github.com/alanbjohnston/pi_pacsat.git - git clone https://github.com/ac2cz/pi_pacsat.git - cd pi_pacsat + #git clone https://github.com/alanbjohnston/pi_.git + git clone https://github.com/ac2cz/pi_.git + cd pi_ #git checkout master-debug cd Debug make all @@ -166,6 +166,7 @@ fi FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled if [ -f "$FILE" ]; then cd + sudo apt-get install -y libbsd-dev git clone https://github.com/alanbjohnston/pacsat_telem.git cd pacsat_telem git checkout master-fox @@ -181,13 +182,13 @@ sudo raspi-config nonint do_vnc 0 cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46n.tar.gz +wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz -tar -xzf PacsatGround_unix_0_46n.tar.gz -C /home/pi/Desktop +tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop -rm PacsatGround_unix_0_46n.tar.gz +rm PacsatGround_unix_0_46o.tar.gz -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ +cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ mkdir /home/pi/PacSatGround From 72dca9aa1a3b94016ae552273824785e935a8cef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:24:26 -0500 Subject: [PATCH 0573/1744] Update install fix pi_pacsat directory --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index d0f1ff2c..76d31542 100755 --- a/install +++ b/install @@ -134,9 +134,9 @@ if [ -f "$FILE" ]; then sudo ./install.sh cd - #git clone https://github.com/alanbjohnston/pi_.git - git clone https://github.com/ac2cz/pi_.git - cd pi_ + #git clone https://github.com/alanbjohnston/pi_pacsat.git + git clone https://github.com/ac2cz/pi_pacsat.git + cd pi_pacsat #git checkout master-debug cd Debug make all From 7204051fb6fb68065c073652651165483790dad0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:25:19 -0500 Subject: [PATCH 0574/1744] Update pacsatsim.sh start/stop also --- pacsatsim.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8e89588d..68164d9e 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,6 +2,9 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + # export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH From 643eaac19ecaa7a81250d23e0a620df0a12f6997 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:32:47 -0500 Subject: [PATCH 0575/1744] Update main.c change to restart pacsatsim --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index edb162d7..678ebb8a 100644 --- a/main.c +++ b/main.c @@ -247,7 +247,7 @@ int main(int argc, char * argv[]) { } if ( mode == PACSAT) { - FILE * pacsat_file = popen("sudo systemctl start pacsatsim", "r"); + FILE * pacsat_file = popen("sudo systemctl restart pacsatsim", "r"); pclose(pacsat_file); } else { From 558765f560056ca4c39900949eec76eda2fff4aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:33:32 -0500 Subject: [PATCH 0576/1744] Update main.c missing ) --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 678ebb8a..e0fda7e1 100644 --- a/main.c +++ b/main.c @@ -513,7 +513,7 @@ int main(int argc, char * argv[]) { memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); - if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) // && !sim_mode) + if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored firstTime = 1; From 91ba8d3a10e3c9f799ed28f4d0fb4c8ac4c961ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:53:12 -0500 Subject: [PATCH 0577/1744] Create asound.conf --- asound.conf | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 asound.conf diff --git a/asound.conf b/asound.conf new file mode 100644 index 00000000..cf3cc9a0 --- /dev/null +++ b/asound.conf @@ -0,0 +1,46 @@ +pcm.!default { + type asym + playback.pcm "softvol" + capture.pcm "shared_mic" +} + +ctl.!default { + type hw + card "Device" +} + +# Playback with software volume and mixing +pcm.softvol { + type softvol + slave.pcm "shared_speaker" + control { + name "Master" + card "Device" + } +} + +pcm.shared_speaker { + type dmix + ipc_key 1024 + slave { + pcm "hw:CARD=Device,DEV=0" + rate 48000 + period_time 0 + period_size 1024 + buffer_size 4096 + } +} + +# Recording with input mixing +pcm.shared_mic { + type dsnoop + ipc_key 2048 + slave { + pcm "hw:CARD=Device,DEV=0" +# channels 1 + rate 48000 + period_time 0 + period_size 1024 + buffer_size 4096 + } +} From 3577400f7998f7b29c4cd7dfaf8c40e3abb04667 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 08:54:13 -0500 Subject: [PATCH 0578/1744] Update install add asound.conf --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 76d31542..459b7abc 100755 --- a/install +++ b/install @@ -124,6 +124,7 @@ cd rpitx ./install.sh +sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ -f "$FILE" ]; then From 4738ca2550268ce303619150a6157dd234700195 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:11:28 -0500 Subject: [PATCH 0579/1744] Update transmit.py don't do anything with pacsatsim.service --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index e1c6aa77..602dd3cd 100644 --- a/transmit.py +++ b/transmit.py @@ -245,7 +245,7 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) - system("sudo systemctl stop pacsatsim") +# system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") @@ -429,7 +429,7 @@ if __name__ == "__main__": print("Pacsat Ground Station") else: print("Pacsat") - system("sudo systemctl restart pacsatsim") +# system("sudo systemctl restart pacsatsim") # txPin = 27 pttPin = 20 From 6599bf9cd601dad7cdc6c54861e1cb9dd8471105 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:17:55 -0500 Subject: [PATCH 0580/1744] Update direwolf-pacsatsim-pwm.conf with shared_mic --- direwolf/direwolf-pacsatsim-pwm.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index c0890790..58667777 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,4 +1,5 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 6e063ee664d567303d2824179b723431fd29745a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:18:53 -0500 Subject: [PATCH 0581/1744] Update direwolf-pacsatsim-jp14.conf with shared_mic --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index cb0a1ce8..58667777 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#ADEVICE plughw:2,0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 +ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 414bb00be1f6b798654b6c79c39431fd1ec74443 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:20:07 -0500 Subject: [PATCH 0582/1744] Update direwolf-pacsatsim-jp14.conf fix Device --- direwolf/direwolf-pacsatsim-jp14.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf index 58667777..750c0fee 100644 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ b/direwolf/direwolf-pacsatsim-jp14.conf @@ -1,5 +1,5 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 +ADEVICE shared_mic plughw:CARD=Device,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 98d006ddeb61e915249fbf0ede15a92d8b7e8540 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:23:09 -0500 Subject: [PATCH 0583/1744] Update config always reboot for Pacsat mode changes --- config | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/config b/config index 7759faed..5f793cee 100755 --- a/config +++ b/config @@ -1430,17 +1430,19 @@ elif [ "$1" = "-G" ]; then set -- $value # echo "changing CubeSatSim to Pacsat mode" - sudo echo "p" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - else - restart=1 - fi + + reboot=1 +# sudo echo "p" > /home/pi/CubeSatSim/.mode +# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then +# FILE=/home/pi/CubeSatSim/battery_saver +# if [ -f "$FILE" ]; then +# restart=1 +# else +# reboot=1 +# fi +# else +# restart=1 +# fi elif [ "$1" = "-I" ]; then @@ -1452,17 +1454,19 @@ elif [ "$1" = "-I" ]; then set -- $value # echo "changing CubeSatSim to Pacsat mode" - sudo echo "P" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - else - restart=1 - fi + + reboot=1 +# sudo echo "P" > /home/pi/CubeSatSim/.mode +# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then +# FILE=/home/pi/CubeSatSim/battery_saver +# if [ -f "$FILE" ]; then +# restart=1 +# else +# reboot=1 +# fi +# else +# restart=1 +# fi elif [ "$1" = "-h" ]; then From 891f46ae724e7b3948cfa0b9f38dc809fd985ba8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 09:33:27 -0500 Subject: [PATCH 0584/1744] Update config add back Pacsat .mode changes --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 5f793cee..b9c1ba2f 100755 --- a/config +++ b/config @@ -1432,7 +1432,7 @@ elif [ "$1" = "-G" ]; then # echo "changing CubeSatSim to Pacsat mode" reboot=1 -# sudo echo "p" > /home/pi/CubeSatSim/.mode + sudo echo "p" > /home/pi/CubeSatSim/.mode # if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then # FILE=/home/pi/CubeSatSim/battery_saver # if [ -f "$FILE" ]; then @@ -1456,7 +1456,7 @@ elif [ "$1" = "-I" ]; then # echo "changing CubeSatSim to Pacsat mode" reboot=1 -# sudo echo "P" > /home/pi/CubeSatSim/.mode + sudo echo "P" > /home/pi/CubeSatSim/.mode # if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then # FILE=/home/pi/CubeSatSim/battery_saver # if [ -f "$FILE" ]; then From 11045fce4a70fa65b7d6ad7a76221bcb38b12e2e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:18:19 -0500 Subject: [PATCH 0585/1744] Update direwolf-cc.conf with shared_mic and change ports --- direwolf-cc.conf | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index 00eddffa..2a3b5ef9 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -1,7 +1,10 @@ -ADEVICE hw:CARD=Device,DEV=0 default +#ADEVICE hw:CARD=Device,DEV=0 default +ADEVICE shared_mic hw:CARD=Loopback,DEV=1 DTMF MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF TXDELAY 0 +AGWPORT 8200 +KISSPORT 8201 From 66d2dc3471d55005d3af332bd8eb0ea78e98a7d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:21:14 -0500 Subject: [PATCH 0586/1744] Update dtmf_aprs_cc.py try around stdin read for UTF-8 issue --- dtmf_aprs_cc.py | 346 ++++++++++++++++++++++++------------------------ 1 file changed, 174 insertions(+), 172 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index befe58c7..fd8bac6f 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -17,183 +17,185 @@ if __name__ == "__main__": # print("There are arguments!") if ('d' == sys.argv[1]): debug_mode = True - - for line in sys.stdin: -# if (debug_mode): - print(line, end =" ") - logging.warning(line) - -# if '^c' == line.rstrip(): -# break - - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t5#")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True -# Currently, C2C does not support Repeater mode e - if ((line.find("MODE=o")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t10#")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - - if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(txLed, GPIO.OUT) - if (mode == 'f'): - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'b'): - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 's'): - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'm'): - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - elif (mode == 'a'): + try: + for line in sys.stdin: + # if (debug_mode): + print(line, end =" ") + logging.warning(line) + + # if '^c' == line.rstrip(): + # break + + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t5#")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + # Currently, C2C does not support Repeater mode e + if ((line.find("MODE=o")) > 0): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t10#")) > 0): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + + if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(powerPin, GPIO.OUT) + GPIO.setup(txLed, GPIO.OUT) + + if (mode == 'f'): + GPIO.output(powerPin, 0) # blink two times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) - system("sudo systemctl stop rpitx") -# system("sudo systemctl stop cubesatsim") + elif (mode == 'b'): + GPIO.output(powerPin, 0) # blink three times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + elif (mode == 's'): + GPIO.output(powerPin, 0) # blink four times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - - - change_mode = False + elif (mode == 'm'): + GPIO.output(powerPin, 0) # blink five times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1); + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + elif (mode == 'a'): + mode = 'a' + GPIO.output(powerPin, 0) # blink one time + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + + GPIO.output(txLed, 0) + GPIO.output(powerPin, 0) + system("sudo systemctl stop rpitx") + # system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + change_mode = False + except: + print("Error reading line (probably due to UTF-8 issue)") print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") From a619e554a84bbfe751a47d02d3b7a55c0c4fb973 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:23:13 -0500 Subject: [PATCH 0587/1744] Update dtmf_aprs_cc.py ad while to keep trying --- dtmf_aprs_cc.py | 351 ++++++++++++++++++++++++------------------------ 1 file changed, 176 insertions(+), 175 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index fd8bac6f..4b8ba472 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -18,184 +18,185 @@ if __name__ == "__main__": if ('d' == sys.argv[1]): debug_mode = True - try: - for line in sys.stdin: - # if (debug_mode): - print(line, end =" ") - logging.warning(line) - - # if '^c' == line.rstrip(): - # break - - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t5#")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - # Currently, C2C does not support Repeater mode e - if ((line.find("MODE=o")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t10#")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - - if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(txLed, GPIO.OUT) - - if (mode == 'f'): - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'b'): - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 's'): - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - elif (mode == 'm'): - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - elif (mode == 'a'): + while True: + try: + for line in sys.stdin: + # if (debug_mode): + print(line, end =" ") + logging.warning(line) + + # if '^c' == line.rstrip(): + # break + + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(1) - - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t5#")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + # Currently, C2C does not support Repeater mode e + if ((line.find("MODE=o")) > 0): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find("DTMF>APDW15:t10#")) > 0): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + + if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice + GPIO.setmode(GPIO.BCM) + GPIO.setwarnings(False) + GPIO.setup(powerPin, GPIO.OUT) + GPIO.setup(txLed, GPIO.OUT) + + if (mode == 'f'): + GPIO.output(powerPin, 0) # blink two times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) - system("sudo systemctl stop rpitx") - # system("sudo systemctl stop cubesatsim") + elif (mode == 'b'): + GPIO.output(powerPin, 0) # blink three times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + elif (mode == 's'): + GPIO.output(powerPin, 0) # blink four times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - - - change_mode = False - except: - print("Error reading line (probably due to UTF-8 issue)") + elif (mode == 'm'): + GPIO.output(powerPin, 0) # blink five times + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1); + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + elif (mode == 'a'): + mode = 'a' + GPIO.output(powerPin, 0) # blink one time + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + + GPIO.output(txLed, 0) + GPIO.output(powerPin, 0) + system("sudo systemctl stop rpitx") + # system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + + change_mode = False + except: + print("Error reading line (probably due to UTF-8 issue)") print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") From 7e1b7e90cc450530eea8e696f2b9152fd8794017 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:27:08 -0500 Subject: [PATCH 0588/1744] Update dtmf_aprs_cc.py remove DTMF>APDW15 --- dtmf_aprs_cc.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 4b8ba472..094c5188 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -33,7 +33,7 @@ if __name__ == "__main__": mode = 'a' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t1#")) > 0): + if ((line.find(":t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True @@ -42,7 +42,7 @@ if __name__ == "__main__": mode = 'f' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t2#")) > 0): + if ((line.find(":t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True @@ -51,7 +51,7 @@ if __name__ == "__main__": mode = 'b' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t3#")) > 0): + if ((line.find(":t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True @@ -60,7 +60,7 @@ if __name__ == "__main__": mode = 's' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t4#")) > 0): + if ((line.find(":t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True @@ -69,7 +69,7 @@ if __name__ == "__main__": mode = 'm' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t5#")) > 0): + if ((line.find(":t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True @@ -78,7 +78,7 @@ if __name__ == "__main__": mode = 'n' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t11#")) > 0): + if ((line.find(":t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True @@ -88,7 +88,7 @@ if __name__ == "__main__": mode = 'o' change_mode = True counter = (counter + 1) % 2 - if ((line.find("DTMF>APDW15:t10#")) > 0): + if ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True From 8f09364a670585ac381c0335cf7dbb3aaee25182 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:34:05 -0500 Subject: [PATCH 0589/1744] Update command add loopback --- command | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command b/command index 989c71f5..dccd9382 100755 --- a/command +++ b/command @@ -2,6 +2,8 @@ echo -e "\nCommand and Control script for CubeSatSim v2.0\n" +sudo modprobe snd-aloop + FILE=/home/pi/CubeSatSim/command_control if [ -f "$FILE" ]; then echo "Radio command and control is ON" From 5ec12e9d59e2c8d1ca03abb177ed015f46e833c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:41:09 -0500 Subject: [PATCH 0590/1744] Update pacsatsim.sh don't stop command and control --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 68164d9e..2e5802d1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -13,7 +13,7 @@ export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH #sudo systemctl stop transmit -sudo systemctl stop command &>/dev/null +#sudo systemctl stop command &>/dev/null sudo modprobe snd-aloop From 384349e67807b8109e989be486c8ea3f05c0b963 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:50:17 -0500 Subject: [PATCH 0591/1744] Update dtmf_aprs_cc.py add PACSAT mode -g --- dtmf_aprs_cc.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 094c5188..d9eba04a 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -73,6 +73,15 @@ if __name__ == "__main__": system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True + if ((line.find("MODE=G")) > 0): + system("echo '\nPacSatSim Mode!!\n'") + mode = 'G' + change_mode = True + counter = (counter + 1) % 2 + if ((line.find(":t8#")) > 0): + system("echo '\nPacSatSim Mode!!\n'") + mode = 'G' + change_mode = True if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' From 86763119d6684ef6a326fd882eda4bae5b9ecddc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 10:58:44 -0500 Subject: [PATCH 0592/1744] Update dtmf_aprs_cc.py change from G to p for Pacsat mode --- dtmf_aprs_cc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index d9eba04a..818ab478 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -75,12 +75,12 @@ if __name__ == "__main__": change_mode = True if ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' + mode = 'p' change_mode = True counter = (counter + 1) % 2 if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' + mode = 'p' change_mode = True if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") From 474e3f618b2be9180add01a9e0cce347a27b079c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:08:48 -0500 Subject: [PATCH 0593/1744] Update config change -a, -f, -b to reboot for pacsat --- config | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/config b/config index b9c1ba2f..4552d516 100755 --- a/config +++ b/config @@ -369,7 +369,7 @@ elif [ "$1" = "-a" ]; then else echo "changing CubeSatSim to AFSK mode" - sudo echo "a" > /home/pi/CubeSatSim/.mode + sudo echo "a" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then @@ -377,6 +377,8 @@ elif [ "$1" = "-a" ]; then else reboot=1 fi + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 else restart=1 fi @@ -422,7 +424,10 @@ elif [ "$1" = "-f" ]; then echo "changing CubeSatSim to FSK mode" sudo echo "f" > /home/pi/CubeSatSim/.mode - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 fi elif [ "$1" = "-b" ]; then @@ -439,7 +444,10 @@ elif [ "$1" = "-b" ]; then echo "changing CubeSatSim to BPSK mode" sudo echo "b" > /home/pi/CubeSatSim/.mode - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 fi elif [ "$1" = "-s" ]; then From ca03c998717d41475eb2bd88c4bbe136b1564467 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:10:23 -0500 Subject: [PATCH 0594/1744] Update config fix fi --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 4552d516..4f479d21 100755 --- a/config +++ b/config @@ -428,6 +428,7 @@ elif [ "$1" = "-f" ]; then reboot=1 else restart=1 + fi fi elif [ "$1" = "-b" ]; then @@ -448,6 +449,7 @@ elif [ "$1" = "-b" ]; then reboot=1 else restart=1 + fi fi elif [ "$1" = "-s" ]; then From de19e5bc0c3da50449f3a445e5d459b4e915277c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:22:52 -0500 Subject: [PATCH 0595/1744] Update config with rest of modes for pacsat reboot --- config | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config b/config index 4f479d21..a9c9e7fc 100755 --- a/config +++ b/config @@ -405,6 +405,8 @@ elif [ "$1" = "-m" ]; then else reboot=1 fi + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 else restart=1 fi @@ -474,6 +476,8 @@ elif [ "$1" = "-s" ]; then else reboot=1 fi + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 else restart=1 fi @@ -1272,7 +1276,11 @@ elif [ "$1" = "-e" ]; then echo "changing CubeSatSim to Repeater mode" sudo echo "e" > /home/pi/CubeSatSim/.mode - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 + fi elif [ "$1" = "-n" ]; then From ea3a4f07e3a8fd6fd73521831227f68d1cccd421 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 11:26:43 -0500 Subject: [PATCH 0596/1744] Update dtmf_aprs_cc.py change to "G" --- dtmf_aprs_cc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 818ab478..d9eba04a 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -75,12 +75,12 @@ if __name__ == "__main__": change_mode = True if ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'p' + mode = 'G' change_mode = True counter = (counter + 1) % 2 if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'p' + mode = 'G' change_mode = True if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") From 4442bd61f37b8117c590ac8a856d252d89f79ff1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 14:51:17 -0500 Subject: [PATCH 0597/1744] Update config clear pacsatsim logs too --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index a9c9e7fc..6207cafa 100755 --- a/config +++ b/config @@ -739,6 +739,7 @@ elif [ "$1" = "-C" ]; then sudo systemctl stop cubesatsim sudo systemctl stop transmit sudo systemctl stop command + sudo systemctl stop pacsatsim sudo mv -f /home/pi/CubeSatSim/telem.txt /home/pi/CubeSatSim/telem.txt.bk From fb7e87529d0cc95ad007fdee42e5dbb1e0f27116 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 16:42:56 -0500 Subject: [PATCH 0598/1744] Create pacsat-run.sh --- groundstation/pacsat-run.sh | 147 ++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 groundstation/pacsat-run.sh diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh new file mode 100644 index 00000000..1bbe7dcb --- /dev/null +++ b/groundstation/pacsat-run.sh @@ -0,0 +1,147 @@ +#!/bin/bash +# script to run FoxTelem + +echo "Startup script to run the PacSat Ground Station for FIAB v4" + +echo + +source /home/pi/venv/bin/activate + +sudo killall -9 java &>/dev/null + +sudo killall -9 zenity &>/dev/null + +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") + + echo $profile + + if [ -z "$profile" ]; then + + echo "No choice made. Exiting." + + sleep 3 + + exit + + #echo "You need to choose your default FoxTelem profile." + #echo + #echo "The choices are:" + #echo + #echo "1. Fox-in-a-Box. Use this profile if you want to receive and decode telemetry from the AMSAT Fox satellites. If you enter a callsign and a grid square, you can upload to the AMSAT telemetry server." + #echo + #echo "2. CubeSatSim Ground Station. Use this profile if you want to receive and decode telemetry from an AMSAT CubeSatSim or CubeSatSim Lite." + #echo + #echo "Which profile do you choose? Enter 1 or 2" + + #read -r ANS + + fi + + 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 + + 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 + + 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 + + # 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 + + sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then + + echo "You have chosen the Loopback Simulated PacSat Ground Station profile." + echo "l" > /home/pi/.pacsatprofile + + else + + echo "Please enter only 1 or 2 or 3" + + 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 + +#$SHELL From 6418c63a9d3a43d3d11b0a47894f40c0ed6287a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:02:53 -0500 Subject: [PATCH 0599/1744] make pacsat scripts executable --- groundstation/pacsat-config.sh | 134 +++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 groundstation/pacsat-config.sh diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh new file mode 100644 index 00000000..e0723d41 --- /dev/null +++ b/groundstation/pacsat-config.sh @@ -0,0 +1,134 @@ +#!/bin/bash +# script to run FoxTelem + +echo "Startup script to configure the PacSat Ground Station for FIAB v4" + +echo + +source /home/pi/venv/bin/activate + +sudo killall -9 java &>/dev/null + +sudo killall -9 zenity &>/dev/null + +FILE=/home/pi/.pacsatprofile +if [ ! -f "$FILE" ]; then + + profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") + + echo $profile + + if [ -z "$profile" ]; then + + echo "No choice made. Exiting." + + sleep 3 + + exit + + fi + + if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then + + echo "You have chosen the PacSat profile." + 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 + + 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 + + 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 + + # 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 + + sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties + + elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then + + echo "You have chosen the Loopback Simulated PacSat Ground Station profile." + echo "l" > /home/pi/.pacsatprofile + + else + + echo "Please enter only 1 or 2 or 3" + + 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 + +#$SHELL From 83083636639e76e82cc39f98a4dcb942a6d85ed8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:05:49 -0500 Subject: [PATCH 0600/1744] make pacsat config executable --- groundstation/pacsat-config.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/pacsat-config.sh diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh old mode 100644 new mode 100755 From 985c817fa76dae4487e9b919c11e575da5439afd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:12:19 -0500 Subject: [PATCH 0601/1744] Update pacsat-config.sh change options --- groundstation/pacsat-config.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index e0723d41..2e7b6ea5 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -11,10 +11,10 @@ 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="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") + profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") echo $profile @@ -103,11 +103,11 @@ if [ ! -f "$FILE" ]; then fi -fi +#fi -value=`cat /home/pi/FoxTelemetryData/.foxprofile` -echo "$value" > /dev/null -set -- $value +#value=`cat /home/pi/FoxTelemetryData/.foxprofile` +#echo "$value" > /dev/null +#set -- $value sudo killall -9 java &>/dev/null From 794034151047e812eddb5582aa7bf9d154606df2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 1 Mar 2026 17:14:52 -0500 Subject: [PATCH 0602/1744] Update pacsat-config.sh fix popup menu --- groundstation/pacsat-config.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 2e7b6ea5..2963e4c6 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -14,8 +14,7 @@ sudo killall -9 zenity &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") - + profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") echo $profile if [ -z "$profile" ]; then From 7a7fb343201368fa98847d2729f47e3bbc5cc7f6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:07:26 -0500 Subject: [PATCH 0603/1744] Update pacsat-run.sh 3 options --- groundstation/pacsat-run.sh | 113 +++++++----------------------------- 1 file changed, 20 insertions(+), 93 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 1bbe7dcb..f41f44f7 100644 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -11,21 +11,21 @@ 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." - - sleep 3 - - exit - + echo "No choice made. Exiting." + + sleep 3 + + exit + #echo "You need to choose your default FoxTelem profile." #echo #echo "The choices are:" @@ -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 + echo "You have chosen to run the PacSat Ground Station" + # echo "p" > /home/pi/.pacsatprofile + echo + + /home/pi/CubeSatSim/groundstation/pacsat.sh - 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 + elif [ "$ANS" = "2" ] || [ "$profile" = "Configure" ] ; then + echo "You have chosen to configure the PacSat Ground Station" 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 - - sudo sed -i "s/retuneCenterFrequency=false/retuneCenterFrequency=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + /home/pi/CubeSatSim/groundstation/pacsat-config.sh - sudo sed -i "s/stationDetails=.*/stationDetails=FoxInABox/g" /home/pi/FoxTelemetryData/FoxTelem.properties + elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; 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 "You have chosen the Loopback Simulated PacSat Ground Station" - - - # 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 - - sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then - - 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 From b0df38ee0a3e4cc89b1e1a5d22d2294639e5b7b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:21:08 -0500 Subject: [PATCH 0604/1744] Update pacsat-config.sh prompt 1-5 configure options --- groundstation/pacsat-config.sh | 142 ++++++++++++--------------------- 1 file changed, 51 insertions(+), 91 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 2963e4c6..97382b39 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -1,132 +1,92 @@ #!/bin/bash # script to run FoxTelem -echo "Startup script to configure the PacSat Ground Station for FIAB v4" +echo "Script to configure the PacSat Ground Station for FIAB v4" echo -source /home/pi/venv/bin/activate +#source /home/pi/venv/bin/activate sudo killall -9 java &>/dev/null sudo killall -9 zenity &>/dev/null +sudo killall -9 direwolf &>/dev/null + #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") - echo $profile +# profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") +# echo $profile + + echo "Here are the PacSat Ground Station configuration choices:" + echo + echo "1. Set PacSat Ground Station Callsign" + echo + echo "2. Set PacSat Satellite Callsign" + echo + echo "3. Set Frequencies" + echo + echo "4. Reset PacSat Ground Station" + echo + echo "5. Reset PacSat Satellite" + echo + echo "Which do you choose? Enter 1 - 5" + + read -r ANS - if [ -z "$profile" ]; then + if [ -z "$ANS" ]; then - echo "No choice made. Exiting." - - sleep 3 - - exit + echo "No choice made. Exiting." + + sleep 3 + + exit fi - if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then - - echo "You have chosen the PacSat profile." - 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 + if [ "$ANS" = "1" ] ; then - sudo sed -i "s/uploadToServer=false/uploadToServer=true/g" /home/pi/FoxTelemetryData/FoxTelem.properties + echo "You have chosen to set the PacSat Ground Station Callsign" + echo - 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." - echo "c" > /home/pi/.pacsatprofile - - cp /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties.0 - - sudo sed -i "s/useCostas=false/useCostas=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - sudo sed -i "s/findSignal=false/findSignal=true/g" /home/pi/FoxTelemetryData-CubeSatSim/FoxTelem.properties - - elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then - - echo "You have chosen the Loopback Simulated PacSat Ground Station profile." - echo "l" > /home/pi/.pacsatprofile - + /home/pi/CubeSatSim/config -X n + else - echo "Please enter only 1 or 2 or 3" + echo "Please enter only 1 to 5" 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 From aac360630533a269c83ddb9aaa5ad5dac3ceb9cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:36:39 -0500 Subject: [PATCH 0605/1744] Update pacsat-config.sh add config commands --- groundstation/pacsat-config.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 97382b39..c4570ffc 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -50,6 +50,8 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the PacSat Ground Station Callsign" echo + /home/pi/CubeSatSim/config -J n + elif [ "$ANS" = "2" ] ; then echo "You have chosen to set the CubeSatSim PacSat Satellite callsign" @@ -71,7 +73,8 @@ sudo killall -9 direwolf &>/dev/null echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" echo - /home/pi/CubeSatSim/groundstation/pacsat-reset.sh +# /home/pi/CubeSatSim/groundstation/pacsat-reset.sh + /home/pi/CubeSatSim/config -K n elif [ "$ANS" = "5" ] ; then @@ -79,7 +82,7 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to reset the PacSat Satellite" echo - /home/pi/CubeSatSim/config -X n + /home/pi/CubeSatSim/config -k n else From bb6b966ad9b4ea968dff8a7e7adf7ea021903fc0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:48:35 -0500 Subject: [PATCH 0606/1744] Update pacsatsim.sh add default configuration if not present --- pacsatsim.sh | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 2e5802d1..8b395c34 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -1,6 +1,36 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat +# script to run PacsatSim + +if [ ! -d "/home/pi/PacSat" ]; then + + echo "Setting up PacSatSim default configuration" + echo + + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + + cd /home/pi/pi_pacsat/Debug + + sudo rm pacsat_last_command_time.dat + sudo rm pacsat_upload_table.dat + sudo rm pacsat.state + + echo "bit_rate=9600" > pacsat.config + echo "bbs_callsign=AMSAT-12" >> pacsat.config + echo "broadcast_callsign=AMSAT-11" >> pacsat.config + echo "digi_callsign=AMSAT-1" >> pacsat.config + echo "max_frames_in_tx_buffer=5" >> pacsat.config + + echo "pb_open=1" > pacsat.state + echo "uplink_open=1" >> pacsat.state + echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state + echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state + + touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + +fi sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start From 661ba1d115d20192f9f4cf763ed6edeedad49da5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:57:15 -0500 Subject: [PATCH 0607/1744] Update pacsat.sh create PacSatGround dir if not present --- groundstation/pacsat.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5151e803..c072d488 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -1,6 +1,17 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat +# script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station + +if [ ! -d "/home/pi/PacSatGround" ]; then + + mkdir /home/pi/PacSatGround + + echo + echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + + sleep 10 + +fi sudo modprobe snd-aloop From 43fdf9936c36dec8d1c1baa7bddb355af27a3f4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 10:58:21 -0500 Subject: [PATCH 0608/1744] add new configs --- config | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/config b/config index 6207cafa..29725c32 100755 --- a/config +++ b/config @@ -1487,6 +1487,27 @@ elif [ "$1" = "-I" ]; then # restart=1 # fi +elif [ "$1" = "-J" ]; then + + echo "Changing the PacSat Ground Station callsign" + echo + echo "Run the Pacsat Ground Station in the Desktop" + +elif [ "$1" = "-k" ]; then + + echo "Reset PacSat Ground Station configuration" + echo + sudo killall -9 java &>/dev/null + sudo rm -r /home/pi/PacSatGround + +elif [ "$1" = "-K" ]; then + + echo "Reset PacSatSim configuration" + echo + sudo systemctl stop pacsatsim + sudo rm -r /home/pi/PacSat + reboot=1 + elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -1501,13 +1522,16 @@ elif [ "$1" = "-h" ]; then echo " -s Change to SSTV mode" echo " -n Change to Transmit Commands mode" echo " -e Change to Repeater mode" + echo " -j Change to FUNcube mode" + echo " -G Change to PacSatSim mode" + echo " -I Change to PacSat Ground Station mode" echo " -i Restart CubeSatsim software" echo " -c Change the CALLSIGN in the configuration file sim.cfg" echo " -t Change the Simulated Telemetry setting in sim.cfg" echo " -r Change the Resets Count in the configuration file sim.cfg" echo " -l Change the Latitude and Longitude in the configuration file sim.cfg" echo " -S Scan both I2C buses on the Raspberry Pi" - echo " -C Clear logs" + echo " -C Clear logs and reboot" echo " -T Change command and control state" echo " -d Change command and control Direwolf state" echo " -R Change the Commands Count in the file command_count.txt" @@ -1517,14 +1541,15 @@ elif [ "$1" = "-h" ]; then echo " -H Change the Balloon (HAB) mode" echo " -p Display payload sensor data" echo " -v Display voltage and current data" - echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for RX and TX" + echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for FM RX and TX" echo " -A Transmit APRS control packets to control another CubeSatSim" echo " -D Change Transmit Commands state APRS or DTMF" echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" - echo " -g Reset configuration back to default settings" - echo " -G Change to PacSatSim mode" - echo " -I Changing to PacSat Ground Station mode" + echo " -g Reset configuration back to default settings and shutdown" + echo " -J Set the PacSat Ground Station callsign" + echo " -k Reset the PacSatSim Configuration" + echo " -K Reset the PacSatSim Ground Station Configuration" echo exit From 461e45dea67c3421f64845dfb7b6318632bc2ca2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 11:06:17 -0500 Subject: [PATCH 0609/1744] Update config swap k and K --- config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config b/config index 29725c32..98c40816 100755 --- a/config +++ b/config @@ -1489,22 +1489,25 @@ elif [ "$1" = "-I" ]; then elif [ "$1" = "-J" ]; then + echo echo "Changing the PacSat Ground Station callsign" echo echo "Run the Pacsat Ground Station in the Desktop" -elif [ "$1" = "-k" ]; then +elif [ "$1" = "-K" ]; then + echo echo "Reset PacSat Ground Station configuration" echo sudo killall -9 java &>/dev/null sudo rm -r /home/pi/PacSatGround -elif [ "$1" = "-K" ]; then +elif [ "$1" = "-k" ]; then + echo echo "Reset PacSatSim configuration" echo - sudo systemctl stop pacsatsim + sudo systemctl stop pacsatsim &>/dev/null sudo rm -r /home/pi/PacSat reboot=1 From e5eb43df5c692cb33928dc23432dc5a533836e94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 11:31:57 -0500 Subject: [PATCH 0610/1744] Update config add dev null to stop pacsatsim --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 98c40816..c4b9b497 100755 --- a/config +++ b/config @@ -566,7 +566,7 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo systemctl stop pacsatsim + sudo systemctl stop pacsatsim &>/dev/null sudo killall -9 java &>/dev/null sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config From eb23200e6794aef3fa542144b4a510df50d1788a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 11:34:35 -0500 Subject: [PATCH 0611/1744] Update config also change callsign if old is AMSAT --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index c4b9b497..c6b20f02 100755 --- a/config +++ b/config @@ -571,7 +571,9 @@ elif [ "$1" = "-c" ]; then sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then From eabb2bf9db495394b1361a0ec49cdc8cc54e7db3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:11:28 -0500 Subject: [PATCH 0612/1744] Update config fix pacsatsim callsign set when reset --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index c6b20f02..756baef0 100755 --- a/config +++ b/config @@ -570,6 +570,7 @@ elif [ "$1" = "-c" ]; then sudo killall -9 java &>/dev/null sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties From 336e0d9ed3a605974dff9e6df0c114f31f96cf30 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:40:18 -0500 Subject: [PATCH 0613/1744] Update pacsat-config.sh update change remote PacSat callsign --- groundstation/pacsat-config.sh | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index c4570ffc..6445f480 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -23,7 +23,7 @@ sudo killall -9 direwolf &>/dev/null echo echo "1. Set PacSat Ground Station Callsign" echo - echo "2. Set PacSat Satellite Callsign" + echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" echo echo "3. Set Frequencies" echo @@ -54,10 +54,34 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "2" ] ; then - echo "You have chosen to set the CubeSatSim PacSat Satellite callsign" + echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo - /home/pi/CubeSatSim/config -c n + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + + echo "Current value of remote PacSat callsign is" + echo $oldcallsign + echo + + echo "Enter new callsign in all capitals: " + read callsign + + if [ -z $callsign ] ; then + + callsign="$1" + echo "Keeping value of" $oldcallsign + + else + + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + echo + echo "Changing callsign to " + echo $callsign + echo + echo "You will see the change next time you run the PacSat Ground Station" + echo + fi + elif [ "$ANS" = "3" ] ; then From 74fee1252626dffa5e7bc3cec2fa789f939caa2a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:42:22 -0500 Subject: [PATCH 0614/1744] Update pacsat-config.sh don't sleep at end --- groundstation/pacsat-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 6445f480..014b4f8f 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -115,6 +115,6 @@ sudo killall -9 direwolf &>/dev/null fi -sleep 10 +# sleep 10 #$SHELL From 67b6c5f6bf7079dd1d9efc2a78a9e1fe16511a94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:44:35 -0500 Subject: [PATCH 0615/1744] Update config remove Ground callsign set, remove remote pacsat --- config | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/config b/config index 756baef0..038eb8d5 100755 --- a/config +++ b/config @@ -573,8 +573,8 @@ elif [ "$1" = "-c" ]; then sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties - sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties +# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties +# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi if [ "$norestart" = "1" ]; then @@ -1490,13 +1490,6 @@ elif [ "$1" = "-I" ]; then # restart=1 # fi -elif [ "$1" = "-J" ]; then - - echo - echo "Changing the PacSat Ground Station callsign" - echo - echo "Run the Pacsat Ground Station in the Desktop" - elif [ "$1" = "-K" ]; then echo @@ -1553,7 +1546,6 @@ elif [ "$1" = "-h" ]; then echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings and shutdown" - echo " -J Set the PacSat Ground Station callsign" echo " -k Reset the PacSatSim Configuration" echo " -K Reset the PacSatSim Ground Station Configuration" From e2dbc1de347ef413a09e0d00a99ab2dab86e5a05 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 12:46:02 -0500 Subject: [PATCH 0616/1744] Update pacsat-config.sh to fix ground station callsign config --- groundstation/pacsat-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 014b4f8f..85d02f91 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -50,7 +50,7 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the PacSat Ground Station Callsign" echo - /home/pi/CubeSatSim/config -J n + /home/pi/CubeSatSim/config -c n elif [ "$ANS" = "2" ] ; then From 69416a1770b21a1b62de81b29d84b7aa1616174f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:23:04 -0500 Subject: [PATCH 0617/1744] Update pacsat.sh add l parameter --- groundstation/pacsat.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index c072d488..34526a33 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -78,7 +78,7 @@ echo #echo echo -echo "The Pacsat Ground Station are running on this Pi using FM receiver and rpitx transmitter" +echo "The Pacsat Ground Station is running on this Pi using FM receiver or RTL-SDR" echo #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ @@ -90,12 +90,21 @@ echo sudo usermod -a -G gpio pi -/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" +if [ ! "$1" = "l" ]; then +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" + echo "Using TXC FM transceiver" + /home/pi/CubeSatSim/groundstation/pacsat-df.sh + +else + echo "Using audio loopback" + /home/pi/CubeSatSim/groundstation/pacsat-d.sh + +fi # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & ##arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & -echo "Don't close the direwolf window or the Pacsatsim will stop running." +# echo "Don't close the direwolf window or the Pacsatsim will stop running." cd /home/pi/Desktop/PacsatGround/ From 8ff65ab10b4b751bb1648dd251aef1cdfee26f39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:28:06 -0500 Subject: [PATCH 0618/1744] Update pacsat.sh direwolf to background --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 34526a33..5c118cdb 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -93,11 +93,11 @@ sudo usermod -a -G gpio pi if [ ! "$1" = "l" ]; then #/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/groundstation/pacsat-df.sh + /home/pi/CubeSatSim/groundstation/pacsat-df.sh & else echo "Using audio loopback" - /home/pi/CubeSatSim/groundstation/pacsat-d.sh + /home/pi/CubeSatSim/groundstation/pacsat-d.sh & fi From 511b105c593aa3aef97535b63461f016f3d38173 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:37:27 -0500 Subject: [PATCH 0619/1744] Update pacsatsim-d.sh change to loopback --- pacsatsim-d.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh index f7c3e84e..7480af0c 100755 --- a/pacsatsim-d.sh +++ b/pacsatsim-d.sh @@ -2,4 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-loop.conf -t 0 +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 From 6d58ac9bc324ee8f78d24ffd1555314bb9a48da3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:44:28 -0500 Subject: [PATCH 0620/1744] Update pacsat-run.sh for loopback run pacsatsim.sh l --- groundstation/pacsat-run.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index f41f44f7..f4242560 100644 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -59,6 +59,12 @@ sudo killall -9 zenity &>/dev/null elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then echo "You have chosen the Loopback Simulated PacSat Ground Station" + + sleep 1 + + /usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim.sh l" + + sleep 1 /home/pi/CubeSatSim/groundstation/pacsat.sh l From 8ade73385c9c8e62f554de3856421d619d24a81e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:46:54 -0500 Subject: [PATCH 0621/1744] Update pacsatsim.sh add l parameter for loopback --- pacsatsim.sh | 145 +++++---------------------------------------------- 1 file changed, 13 insertions(+), 132 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8b395c34..c80132d2 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -71,152 +71,22 @@ sudo modprobe snd-aloop echo -#frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") -#echo $frequency - -#if [ -z "$frequency" ]; then - -#echo "No choice made. Exiting." - -#sleep 3 - -#exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -choice=2 +#choice=2 #fi -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 +# frequency=434900000 echo echo "If your Pacsat Ground Station is transmitting packets, you will see them here" echo -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi #echo #echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." -echo - -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & - -else # echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" @@ -224,8 +94,19 @@ else # /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" + + +if [ ! "$1" = "l" ]; then +#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" + echo "Using TXC FM transceiver" /home/pi/CubeSatSim/pacsatsim-df.sh & +else + echo "Using audio loopback" + /home/pi/CubeSatSim/pacsatsim-d.sh & + +fi + # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & ## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & From f524d8b340c5d7201641ff4c436f7efa06f9bf6e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:52:42 -0500 Subject: [PATCH 0622/1744] make executable --- groundstation/pacsat-run.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/pacsat-run.sh diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh old mode 100644 new mode 100755 From 0cab7f0623361d2a2f6bcc78ad60972c18cda5a7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 14:56:48 -0500 Subject: [PATCH 0623/1744] Update pacsat-d.sh change to loopback --- groundstation/pacsat-d.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh index e1569ce7..a794108c 100755 --- a/groundstation/pacsat-d.sh +++ b/groundstation/pacsat-d.sh @@ -2,5 +2,4 @@ sudo modprobe snd-aloop -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf -t 0 - +direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 From 34198a02eb1060900c78933f7747dd4e640ebb35 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 15:00:24 -0500 Subject: [PATCH 0624/1744] Update pacsatsim.sh fix extra fi --- pacsatsim.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index c80132d2..4d965b06 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -112,8 +112,6 @@ fi ## echo "Don't close the direwolf window or the Pacsatsim will stop running." - echo -fi sudo /home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & From 2e2b7d1ec032ee18c737d248313b903833bd6151 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:39:09 -0500 Subject: [PATCH 0625/1744] Update direwolf-pacsatsim-loopback.conf make same as pam --- direwolf/direwolf-pacsatsim-loopback.conf | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index e96bd980..1c74a18c 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -3,6 +3,16 @@ PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 -FULLDUP ON -TXDELAY 15 +##FULLDUP ON +##TXDELAY 15 #FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 +FULLDUP OFF From f77025d9825a59324bd1ba2f9fbd468d2651ebd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:41:44 -0500 Subject: [PATCH 0626/1744] Update direwolf-pacsat-loopback.conf same as pwm --- .../direwolf/direwolf-pacsat-loopback.conf | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 6058c722..a101c334 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,10 +1,19 @@ MYCALL AMSAT ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO 20 +PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 KISSPORT 8100 AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 +#FULLDUP OFF +#TXDELAY 30 #FIX_BITS 1 AX25 + +#DWAIT 0 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +TXDELAY 1000 +#TXDELAY 150 +#TXTAIL 10 +FULLDUP OFF From e9d0e570fc92ebb9b852ea0d734395667f364611 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:45:54 -0500 Subject: [PATCH 0627/1744] Update direwolf-pacsat-loopback.conf kissport 8102 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index a101c334..46878576 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -3,7 +3,7 @@ ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 -KISSPORT 8100 +KISSPORT 8102 AGWPORT 8002 #FULLDUP OFF #TXDELAY 30 From e185aa91d84b35e6f02815c614132086a6d1fc5a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:49:28 -0500 Subject: [PATCH 0628/1744] Update direwolf-pacsatsim-loopback.conf mix loopback 1 0 --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 1c74a18c..7812e543 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 582c570be38748dbec6e6fe9e87e4d032dad98ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:49:35 -0500 Subject: [PATCH 0629/1744] Update direwolf-pacsat-loopback.conf mix loopback 0 1 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 46878576..22f60b15 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 From a39e52c61706e54741f2e29a9a5ebc039fdc14c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:53:56 -0500 Subject: [PATCH 0630/1744] Update direwolf-pacsatsim-loopback.conf back to 0 0 --- direwolf/direwolf-pacsatsim-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf index 7812e543..f2ebf026 100644 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ b/direwolf/direwolf-pacsatsim-loopback.conf @@ -1,4 +1,4 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 PTT GPIO -20 MYCALL AMSAT-12 CHANNEL 0 From 22e9fd420904ff5d94b3cb032f36b3a98887107a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 2 Mar 2026 16:54:03 -0500 Subject: [PATCH 0631/1744] Update direwolf-pacsat-loopback.conf back to 1 1 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index 22f60b15..a9a84df3 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -1,5 +1,5 @@ MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 +ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 From 20a9466e545a757121c62cc743bac41f88f400dd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 08:58:58 -0500 Subject: [PATCH 0632/1744] Update pacsat.sh check callsign and update if changed --- groundstation/pacsat.sh | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5c118cdb..96fbef3b 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -2,7 +2,14 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station -if [ ! -d "/home/pi/PacSatGround" ]; then +loopback=0 +if [ "$1" = "l" ] ; then + + loopback=1 + +fi + +if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround @@ -13,6 +20,20 @@ if [ ! -d "/home/pi/PacSatGround" ]; then fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" + +oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) + +if [ ! "$callsign" = "$oldcallsign" ] + + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + +fi + sudo modprobe snd-aloop #sudo systemctl stop cubesatsim >/dev/null 2>&1 @@ -90,15 +111,17 @@ echo sudo usermod -a -G gpio pi -if [ ! "$1" = "l" ]; then +if [ "$loopback" = "1" ]; then #/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" - echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/groundstation/pacsat-df.sh & -else - echo "Using audio loopback" + echo "Using Audio Loopback" /home/pi/CubeSatSim/groundstation/pacsat-d.sh & +else + + echo "Using TXC FM Transceiver" + /home/pi/CubeSatSim/groundstation/pacsat-df.sh & + fi # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & From 159d3d839dec3bd1cd2fc0759fe466e66ab3e74d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:01:06 -0500 Subject: [PATCH 0633/1744] Update pacsat.sh missing then --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 96fbef3b..5a2c7247 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -28,7 +28,7 @@ callsign="$1" oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) -if [ ! "$callsign" = "$oldcallsign" ] +if [ ! "$callsign" = "$oldcallsign" ] ; then sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties From 6c3eec3fd69b50dadd6b76305b1816a7ec39b75f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:05:43 -0500 Subject: [PATCH 0634/1744] Update pacsat.sh print callsigns --- groundstation/pacsat.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5a2c7247..d4fd31e2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,13 +24,22 @@ value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value + callsign="$1" +echo "Configured callsign is " +echo $callsign + oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) +echo "Callsign in PacSatGround.properties is " +echo $oldcallsign + if [ ! "$callsign" = "$oldcallsign" ] ; then sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + + cat /home/pi/PacSatGround/PacSatGround.properties fi From b8cabfd761edf990748c2cb33edf24cf1bfa4adf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:16:09 -0500 Subject: [PATCH 0635/1744] Update pacsat.sh fix callsign regex --- groundstation/pacsat.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d4fd31e2..906c9276 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -24,13 +24,12 @@ value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - callsign="$1" echo "Configured callsign is " echo $callsign -oldcallsign=$(grep -oP '(?<=callsign=).*(?=-)' /home/pi/PacSatGround/PacSatGround.properties) +oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) echo "Callsign in PacSatGround.properties is " echo $oldcallsign From d648b0641982ab11ef4be0a65d3c4ed4071781dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:35:37 -0500 Subject: [PATCH 0636/1744] Update pacsatsim.sh check callsign and update if changed --- pacsatsim.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 4d965b06..f4b5f725 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -32,6 +32,35 @@ if [ ! -d "/home/pi/PacSat" ]; then fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" + +echo "Configured callsign is " +echo $callsign + +oldcallsign=$(grep -oP '(?<=bbs_callsign=).*(?=-)' /home/pi/pi_pacsat/Debug/pacsat.config) + +echo "Callsign in pacsat.config is " +echo $oldcallsign + +if [ ! "$callsign" = "$oldcallsign" ] ; then + + sudo sed -i "s/bbs_callsign=$oldcallsign/bbs_callsign=$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/broadcast_callsign=$oldcallsign/broadcast_callsign=$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + sudo sed -i "s/digi_callsign=$oldcallsign/digi_callsign=$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config + + echo "New pacsat.confg is" + echo + + cat /home/pi/pi_pacsat/Debug/pacsat.config + +fi + + + sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start From ff744c5fd7eb371afb7027d90ab97ce28f194b9c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:38:40 -0500 Subject: [PATCH 0637/1744] Update pacsat.desktop change to pacsat-run --- groundstation/pacsat.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop index 7fef68f8..7097509e 100644 --- a/groundstation/pacsat.desktop +++ b/groundstation/pacsat.desktop @@ -2,7 +2,7 @@ Name=Pacsat GenericName=Pacsat Loopback Comment=Pacsat -Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat.sh" +Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-run.sh" Icon=/home/pi/Icons/pacsat.png Terminal=true Type=Application From 7fa62b4ea130e1efaaa220bfa6a2dca2a96f5463 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:46:10 -0500 Subject: [PATCH 0638/1744] Update pacsatsim.sh fix loopback variable --- pacsatsim.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index f4b5f725..22a70958 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -2,6 +2,13 @@ # script to run PacsatSim +loopback=0 +if [ "$1" = "l" ] ; then + + loopback=1 + +fi + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" @@ -125,14 +132,15 @@ echo -if [ ! "$1" = "l" ]; then -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" - echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/pacsatsim-df.sh & +if [ "$loopback" = "1" ]; then -else echo "Using audio loopback" /home/pi/CubeSatSim/pacsatsim-d.sh & + +else + + echo "Using TXC FM transceiver" + /home/pi/CubeSatSim/pacsatsim-df.sh & fi From f6280e6fafb6ed4bd7995c3b3ff694557b7e4736 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 09:54:56 -0500 Subject: [PATCH 0639/1744] Update config remove all pacsat callsign change code --- config | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config b/config index 038eb8d5..09394c01 100755 --- a/config +++ b/config @@ -566,13 +566,13 @@ elif [ "$1" = "-c" ]; then echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - sudo systemctl stop pacsatsim &>/dev/null - sudo killall -9 java &>/dev/null +# sudo systemctl stop pacsatsim &>/dev/null +# sudo killall -9 java &>/dev/null - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties +# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config +# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config +# sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties +# sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties # sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties # sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties fi From e6a1b3c922d66d23a014625de62ba41ea15e0d54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 10:05:17 -0500 Subject: [PATCH 0640/1744] Update pacsatsim.sh killall pi_pacsat and pacsat_telem --- pacsatsim.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 22a70958..d873f254 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -105,6 +105,10 @@ sudo modprobe snd-aloop #sudo killall -9 zenity &>/dev/null +sudo killall -9 pacsat_telem &>/dev/null + +sudo killall -9 pi_pacsat &>/dev/null + echo From 005578a3e0f680874bcec86d9e5f167ec485f1d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 10:56:01 -0500 Subject: [PATCH 0641/1744] Update pacsatsim.sh sudo for direwolf or shared_mic error --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index d873f254..56fc3033 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -139,12 +139,12 @@ echo if [ "$loopback" = "1" ]; then echo "Using audio loopback" - /home/pi/CubeSatSim/pacsatsim-d.sh & + sudo /home/pi/CubeSatSim/pacsatsim-d.sh & else echo "Using TXC FM transceiver" - /home/pi/CubeSatSim/pacsatsim-df.sh & + sudo /home/pi/CubeSatSim/pacsatsim-df.sh & fi From 646ab6cbc3b3320d8f7bbde010e50b025c5a1741 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 11:55:51 -0500 Subject: [PATCH 0642/1744] Update pacsat.sh add Loopback directory --- groundstation/pacsat.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 906c9276..4573cecf 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -6,15 +6,18 @@ loopback=0 if [ "$1" = "l" ] ; then loopback=1 + echo "PacSat Ground Station with Loopback" fi if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround + + mkdir /home/pi/PacSatGroundLoop echo - echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" sleep 10 @@ -42,6 +45,19 @@ if [ ! "$callsign" = "$oldcallsign" ] ; then fi +oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGroundLoop/PacSatGround.properties) + +echo "Callsign in Loopback PacSatGround.properties is " +echo $oldcallsign + +if [ ! "$callsign" = "$oldcallsign" ] ; then + + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGroundLoop/PacSatGround.properties + + cat /home/pi/PacSatGroundLoop/PacSatGround.properties + +fi + sudo modprobe snd-aloop #sudo systemctl stop cubesatsim >/dev/null 2>&1 @@ -139,9 +155,15 @@ fi cd /home/pi/Desktop/PacsatGround/ -setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & +if [ "$loopback" = "1" ]; then + setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGroundLoop" # removed & +else + + setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & + +fi #cd /home/pi/Desktop/PacSatGround_0.46m_linux/ #sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" From 88ed76d9dfde98c72368471b286da8a10f70d93a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 11:58:44 -0500 Subject: [PATCH 0643/1744] Update pacsat-config.sh add Loopback config reset --- groundstation/pacsat-config.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 85d02f91..c3f9a00c 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -27,9 +27,11 @@ sudo killall -9 direwolf &>/dev/null echo echo "3. Set Frequencies" echo - echo "4. Reset PacSat Ground Station" - echo - echo "5. Reset PacSat Satellite" + echo "4. Reset PacSat Ground Station Configuration" + echo + echo "5. Reset PacSat Ground Station Loopback Configuration" + echo + echo "6. Reset PacSat Satellite" echo echo "Which do you choose? Enter 1 - 5" @@ -92,16 +94,23 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "4" ] ; then - echo "You have chosen to reset the PacSat Ground Station" + echo "You have chosen to reset the PacSat Ground Station Configuration" 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 - /home/pi/CubeSatSim/config -K n + sudo rm -r /home/pi/PacSatGround + + elif [ "$ANS" = "5" ] ; then + + echo "You have chosen to reset the PacSat Ground Station Loopback Configuration" + echo + echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" + echo + sudo rm -r /home/pi/PacSatGroundLoop - elif [ "$ANS" = "5" ] ; then + elif [ "$ANS" = "6" ] ; then echo "You have chosen to reset the PacSat Satellite" echo From da52631b1cb74612f707e555838e2795e183d14e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 11:59:43 -0500 Subject: [PATCH 0644/1744] Update pacsat.sh add Loopback configuration --- groundstation/pacsat.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 4573cecf..df8693d8 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -13,6 +13,15 @@ fi if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround + + echo + echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + + sleep 10 + +fi + +if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then mkdir /home/pi/PacSatGroundLoop From 6ece8ea7c917920caab73977ca8ee6bf11b32a39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 12:02:04 -0500 Subject: [PATCH 0645/1744] Update config remove pacsat ground reset --- config | 9 --------- 1 file changed, 9 deletions(-) diff --git a/config b/config index 09394c01..55aaba34 100755 --- a/config +++ b/config @@ -1490,14 +1490,6 @@ elif [ "$1" = "-I" ]; then # restart=1 # fi -elif [ "$1" = "-K" ]; then - - echo - echo "Reset PacSat Ground Station configuration" - echo - sudo killall -9 java &>/dev/null - sudo rm -r /home/pi/PacSatGround - elif [ "$1" = "-k" ]; then echo @@ -1547,7 +1539,6 @@ elif [ "$1" = "-h" ]; then echo " -L Change microphone level for command and control" echo " -g Reset configuration back to default settings and shutdown" echo " -k Reset the PacSatSim Configuration" - echo " -K Reset the PacSatSim Ground Station Configuration" echo exit From 4025dca6c1a7b541879ae2fcc0c314adf3d667d7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 12:09:14 -0500 Subject: [PATCH 0646/1744] Update direwolf-pacsat-loopback.conf change to 8100 --- groundstation/direwolf/direwolf-pacsat-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf index a9a84df3..6cd3d988 100644 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ b/groundstation/direwolf/direwolf-pacsat-loopback.conf @@ -3,7 +3,7 @@ ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 PTT GPIO -20 27 #Transmit LED CHANNEL 0 MODEM 1200 -KISSPORT 8102 +KISSPORT 8100 AGWPORT 8002 #FULLDUP OFF #TXDELAY 30 From 8d672cccb6d7f8c515c2e8f5834bfbb0e5a4a381 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:19:51 -0500 Subject: [PATCH 0647/1744] Update pacsat-config.sh add main and simulated --- groundstation/pacsat-config.sh | 160 +++++++++++++++++++++------------ 1 file changed, 101 insertions(+), 59 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index c3f9a00c..2eb59921 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -19,22 +19,18 @@ sudo killall -9 direwolf &>/dev/null # profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") # echo $profile - echo "Here are the PacSat Ground Station configuration choices:" + echo "Here are the PacSat configuration choices:" echo - echo "1. Set PacSat Ground Station Callsign" + echo "1. PacSat Ground Station Configuration" echo - echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" - echo - echo "3. Set Frequencies" + echo "2. PacSat Ground Station Loopback Configuration" echo - echo "4. Reset PacSat Ground Station Configuration" - echo - echo "5. Reset PacSat Ground Station Loopback Configuration" - echo - echo "6. Reset PacSat Satellite" + echo "3. Set Frequencies" echo - echo "Which do you choose? Enter 1 - 5" - + echo "4. Reset PacSat Satellite" + echo + echo "Which do you choose? Enter 1 - 4" + read -r ANS if [ -z "$ANS" ]; then @@ -48,42 +44,106 @@ sudo killall -9 direwolf &>/dev/null fi if [ "$ANS" = "1" ] ; then + + echo "Here are your PacSat Ground Station Configuration choices:" + echo + echo "1. PacSat Ground Station Callsign" + echo + echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" + echo + echo "3. Reset PacSat Ground Station Configuration" + + read -r ANS - echo "You have chosen to set the PacSat Ground Station Callsign" - echo - - /home/pi/CubeSatSim/config -c n - - elif [ "$ANS" = "2" ] ; then - - echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" - echo + + if [ -z "$ANS" ]; then + + echo "No choice made. Exiting." + + sleep 3 + + exit + + fi - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + if [ "$ANS" = "1" ] ; then - echo "Current value of remote PacSat callsign is" - echo $oldcallsign - echo + oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) - echo "Enter new callsign in all capitals: " - read callsign - - if [ -z $callsign ] ; then + echo "Callsign in PacSatGround.properties is " + echo $oldcallsign + + echo "Enter new callsign in all capitals: " + read callsign + + if [ -z $callsign ] ; then + + callsign="$1" + echo "Keeping value of" $oldcallsign - callsign="$1" - echo "Keeping value of" $oldcallsign - - else + else + + echo "Configured callsign is " + echo $callsign + + if [ ! "$callsign" = "$oldcallsign" ] ; then + + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + + cat /home/pi/PacSatGround/PacSatGround.properties + + fi + + elif [ "$ANS" = "2" ] ; then - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo - echo "Changing callsign to " - echo $callsign - echo - echo "You will see the change next time you run the PacSat Ground Station" + + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + + echo "Current value of remote PacSat callsign is" + echo $oldcallsign echo - fi + + echo "Enter new callsign in all capitals: " + read callsign + if [ -z $callsign ] ; then + + callsign="$1" + echo "Keeping value of" $oldcallsign + + else + + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + echo + echo "Changing callsign to " + echo $callsign + echo + echo "You will see the change next time you run the PacSat Ground Station" + echo + fi + + elif [ "$ANS" = "3" ] ; then + + echo "You have chosen to reset the PacSat Ground Station Configuration" + echo + echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" + echo + + sudo rm -r /home/pi/PacSatGround + + elif [ "$ANS" = "2" ] ; then + + echo "Here are your PacSat Ground Station Loopback Configuration choices:" + echo + echo "1. PacSat Ground Station Callsign" + echo + echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" + echo + echo "3. Reset PacSat Ground Station Configuration" + + read -r ANS elif [ "$ANS" = "3" ] ; then @@ -92,25 +152,7 @@ sudo killall -9 direwolf &>/dev/null /home/pi/CubeSatSim/config -F n - elif [ "$ANS" = "4" ] ; then - - echo "You have chosen to reset the PacSat Ground Station Configuration" - echo - echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" - echo - - sudo rm -r /home/pi/PacSatGround - - elif [ "$ANS" = "5" ] ; then - - echo "You have chosen to reset the PacSat Ground Station Loopback Configuration" - echo - echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" - echo - - sudo rm -r /home/pi/PacSatGroundLoop - - elif [ "$ANS" = "6" ] ; then + elif [ "$ANS" = "4" ] ; then echo "You have chosen to reset the PacSat Satellite" echo @@ -119,7 +161,7 @@ sudo killall -9 direwolf &>/dev/null else - echo "Please enter only 1 to 5" + echo "Please enter only 1 to 4" fi From a98b949d20b1491e891c579df6c8795383035e51 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:20:08 -0500 Subject: [PATCH 0648/1744] Update pacsat.sh add TNC delay set to 750, remove callsign --- groundstation/pacsat.sh | 36 ++---------------------------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index df8693d8..16640dd6 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -32,40 +32,8 @@ if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then fi -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -callsign="$1" - -echo "Configured callsign is " -echo $callsign - -oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) - -echo "Callsign in PacSatGround.properties is " -echo $oldcallsign - -if [ ! "$callsign" = "$oldcallsign" ] ; then - - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - - cat /home/pi/PacSatGround/PacSatGround.properties - -fi - -oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGroundLoop/PacSatGround.properties) - -echo "Callsign in Loopback PacSatGround.properties is " -echo $oldcallsign - -if [ ! "$callsign" = "$oldcallsign" ] ; then - - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGroundLoop/PacSatGround.properties - - cat /home/pi/PacSatGroundLoop/PacSatGround.properties - -fi +sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties +sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties sudo modprobe snd-aloop From d90344a08b2afab9032489389a2a91b190c46e83 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:24:21 -0500 Subject: [PATCH 0649/1744] Update pacsat-config.sh add else --- groundstation/pacsat-config.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 2eb59921..ea8055dc 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -133,6 +133,12 @@ sudo killall -9 direwolf &>/dev/null sudo rm -r /home/pi/PacSatGround + else + + echo "Please choose an option 1-3" + + fi + elif [ "$ANS" = "2" ] ; then echo "Here are your PacSat Ground Station Loopback Configuration choices:" From 7e32427429cf49b238777407f4d28c563844ff53 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 13:25:38 -0500 Subject: [PATCH 0650/1744] Update pacsat-config.sh missing fi --- groundstation/pacsat-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index ea8055dc..c69aad16 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -93,6 +93,7 @@ sudo killall -9 direwolf &>/dev/null cat /home/pi/PacSatGround/PacSatGround.properties fi + fi elif [ "$ANS" = "2" ] ; then From 0e86e8771e01c5f3df4d23ea67d95c166401c779 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 14:32:29 -0500 Subject: [PATCH 0651/1744] Update pacsat-config.sh Loopback config settings --- groundstation/pacsat-config.sh | 66 +++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 29 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index c69aad16..d15e7604 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -43,9 +43,13 @@ sudo killall -9 direwolf &>/dev/null fi - if [ "$ANS" = "1" ] ; then - - echo "Here are your PacSat Ground Station Configuration choices:" + if [ "$ANS" = "1" ] || [ "$ANS" = "2" ] ; then + + if [ "$ANS" = "1" ] ; then + echo "Here are your PacSat Ground Station Configuration choices:" + else + echo "Here are your PacSat Ground Station Simulation Configuration choices:" + fi echo echo "1. PacSat Ground Station Callsign" echo @@ -68,8 +72,11 @@ sudo killall -9 direwolf &>/dev/null if [ "$ANS" = "1" ] ; then - oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) - + if [ "$ANS" = "1" ] ; then + oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) + else + oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGroundLoop/PacSatGround.properties) + fi echo "Callsign in PacSatGround.properties is " echo $oldcallsign @@ -87,10 +94,14 @@ sudo killall -9 direwolf &>/dev/null echo $callsign if [ ! "$callsign" = "$oldcallsign" ] ; then - - sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties - - cat /home/pi/PacSatGround/PacSatGround.properties + + if [ "$ANS" = "1" ] ; then + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties + cat /home/pi/PacSatGround/PacSatGround.properties + else + sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGroundLoop/PacSatGround.properties + cat /home/pi/PacSatGroundLoop/PacSatGround.properties + fi fi fi @@ -99,9 +110,12 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo - - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) - + + if [ "$ANS" = "1" ] ; then + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + else + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties) + fi echo "Current value of remote PacSat callsign is" echo $oldcallsign echo @@ -115,8 +129,11 @@ sudo killall -9 direwolf &>/dev/null echo "Keeping value of" $oldcallsign else - - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + if [ "$ANS" = "1" ] ; then + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + else + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties + fi echo echo "Changing callsign to " echo $callsign @@ -131,27 +148,18 @@ sudo killall -9 direwolf &>/dev/null echo echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" echo - - sudo rm -r /home/pi/PacSatGround - + + if [ "$ANS" = "1" ] ; then + sudo rm -r /home/pi/PacSatGround + else + sudo rm -r /home/pi/PacSatGroundLoop + fi else echo "Please choose an option 1-3" fi - elif [ "$ANS" = "2" ] ; then - - echo "Here are your PacSat Ground Station Loopback Configuration choices:" - echo - echo "1. PacSat Ground Station Callsign" - echo - echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" - echo - echo "3. Reset PacSat Ground Station Configuration" - - read -r ANS - elif [ "$ANS" = "3" ] ; then echo "You have chosen to set the Frequency of the PacSat Ground Station" From a1dee64675510da8568df5912e0f0d3fb739990f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 14:35:50 -0500 Subject: [PATCH 0652/1744] Update pacsat-config.sh cleanup --- groundstation/pacsat-config.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index d15e7604..ed820b13 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -21,13 +21,13 @@ sudo killall -9 direwolf &>/dev/null echo "Here are the PacSat configuration choices:" echo - echo "1. PacSat Ground Station Configuration" + echo " 1. PacSat Ground Station Configuration" echo - echo "2. PacSat Ground Station Loopback Configuration" + echo " 2. PacSat Ground Station Simulation Configuration" echo - echo "3. Set Frequencies" + echo " 3. Set Frequencies" echo - echo "4. Reset PacSat Satellite" + echo " 4. Reset PacSat Satellite" echo echo "Which do you choose? Enter 1 - 4" @@ -51,11 +51,11 @@ sudo killall -9 direwolf &>/dev/null echo "Here are your PacSat Ground Station Simulation Configuration choices:" fi echo - echo "1. PacSat Ground Station Callsign" + echo " 1. PacSat Ground Station Callsign" echo - echo "2. Set Remote PacSat Satellite Callsign in Ground Station configuration" + echo " 2. Set Remote PacSat Satellite Callsign in Ground Station configuration" echo - echo "3. Reset PacSat Ground Station Configuration" + echo " 3. Reset PacSat Ground Station Configuration" read -r ANS @@ -72,6 +72,7 @@ sudo killall -9 direwolf &>/dev/null if [ "$ANS" = "1" ] ; then + echo if [ "$ANS" = "1" ] ; then oldcallsign=$(grep -oP '(?<=callsign=).*$' /home/pi/PacSatGround/PacSatGround.properties) else From 5cd4ebec220a2678688312c53fbb339bce1fa84c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 16:18:30 -0500 Subject: [PATCH 0653/1744] Update pacsat-run.sh add kill direwolf --- groundstation/pacsat-run.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index f4242560..922fb3a5 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -5,16 +5,18 @@ echo "Startup script to run the PacSat Ground Station for FIAB v4" echo -source /home/pi/venv/bin/activate +# source /home/pi/venv/bin/activate sudo killall -9 java &>/dev/null sudo killall -9 zenity &>/dev/null +sudo killall -9 direwolf &>/dev/null + #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - 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") + profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=170 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") echo $profile @@ -56,9 +58,9 @@ sudo killall -9 zenity &>/dev/null /home/pi/CubeSatSim/groundstation/pacsat-config.sh - elif [ "$ANS" = "3" ] || [ "$profile" = "Loopback" ] ; then + elif [ "$ANS" = "3" ] || [ "$profile" = "Simulate" ] ; then - echo "You have chosen the Loopback Simulated PacSat Ground Station" + echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" sleep 1 From 7c9e8e39b2fe43de5fcfb7bcbd4bec8b1c35541e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 16:19:47 -0500 Subject: [PATCH 0654/1744] Update pacsat-run.sh kill direwolf at end if quit Pacsat ground station --- groundstation/pacsat-run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 922fb3a5..37704d0f 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -76,6 +76,7 @@ sudo killall -9 direwolf &>/dev/null fi +sudo killall -9 direwolf &>/dev/null sleep 10 From ac14553038547bddc7c9d428582061ddf8b57f2c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 22:30:01 -0500 Subject: [PATCH 0655/1744] Update install fix pacsat_telem install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 459b7abc..a28bbcb3 100755 --- a/install +++ b/install @@ -165,7 +165,7 @@ if [ -f "$FILE" ]; then fi FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled -if [ -f "$FILE" ]; then +if [ ! -f "$FILE" ]; then cd sudo apt-get install -y libbsd-dev git clone https://github.com/alanbjohnston/pacsat_telem.git From a269cca2b35ea69c7d1884e3eb1d3a7f146603c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 22:38:30 -0500 Subject: [PATCH 0656/1744] Update install fix g0kla lib --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index a28bbcb3..b30dc015 100755 --- a/install +++ b/install @@ -129,8 +129,8 @@ sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ -f "$FILE" ]; then cd - git clone https://github.com/alanbjohnston/iors_common.git - cd iors_common/Debug/ + git clone https://github.com/alanbjohnston/g0kla_common.git + cd g0kla_common/Debug/ make all sudo ./install.sh From 0a69610f8ca53a52d66639893b84aa463fd11432 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 3 Mar 2026 22:48:43 -0500 Subject: [PATCH 0657/1744] Update install add desktop install --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index b30dc015..d4e12a4a 100755 --- a/install +++ b/install @@ -31,6 +31,8 @@ cd CubeSatSim/config -c -n CubeSatSim/config -l -n + +cp /home/piCubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop sudo apt-get update && sudo apt-get dist-upgrade -y From b1ff14c3bc0825462046cfed1c0a9e8810a6498d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 05:13:13 -0500 Subject: [PATCH 0658/1744] Update install fix pi_pacsat install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index d4e12a4a..c1037a53 100755 --- a/install +++ b/install @@ -129,7 +129,7 @@ cd rpitx sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled -if [ -f "$FILE" ]; then +if [ ! -f "$FILE" ]; then cd git clone https://github.com/alanbjohnston/g0kla_common.git cd g0kla_common/Debug/ From e2a1cb0fc98074dadc9316ac8641d90f955c2e36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 09:13:26 -0500 Subject: [PATCH 0659/1744] fix second menu --- groundstation/pacsat-config.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index ed820b13..6a2ce55c 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -57,10 +57,10 @@ sudo killall -9 direwolf &>/dev/null echo echo " 3. Reset PacSat Ground Station Configuration" - read -r ANS + read -r CH - if [ -z "$ANS" ]; then + if [ -z "$CH" ]; then echo "No choice made. Exiting." @@ -70,7 +70,7 @@ sudo killall -9 direwolf &>/dev/null fi - if [ "$ANS" = "1" ] ; then + if [ "$CH" = "1" ] ; then echo if [ "$ANS" = "1" ] ; then @@ -107,7 +107,7 @@ sudo killall -9 direwolf &>/dev/null fi fi - elif [ "$ANS" = "2" ] ; then + elif [ "$CH" = "2" ] ; then echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo @@ -143,7 +143,7 @@ sudo killall -9 direwolf &>/dev/null echo fi - elif [ "$ANS" = "3" ] ; then + elif [ "$CH" = "3" ] ; then echo "You have chosen to reset the PacSat Ground Station Configuration" echo From b456129b8855f8ba51da1eea3b0867c800fae0c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 09:50:14 -0500 Subject: [PATCH 0660/1744] direwolf checkout master-sync-invert --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index c1037a53..1979bdcc 100755 --- a/install +++ b/install @@ -84,7 +84,7 @@ git clone https://github.com/alanbjohnston/direwolf.git cd direwolf -git checkout invert +git checkout master-sync-invert make -j From c22b8bc79b3033fff3c1461bb710e50d5d17d218 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 10:39:52 -0500 Subject: [PATCH 0661/1744] change to current version direwolf --- install | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/install b/install index 1979bdcc..7d65daa8 100755 --- a/install +++ b/install @@ -80,18 +80,14 @@ fi cd -git clone https://github.com/alanbjohnston/direwolf.git - +git clone https://github.com/wb2osz/direwolf.git cd direwolf - -git checkout master-sync-invert - -make -j - +mkdir build +cd build +cmake .. +make -j4 sudo make install - -make install-rpi - +make install-conf cd From f42b8f0f7ba9ad28492bb49c7a4bcf87861710c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 10:57:29 -0500 Subject: [PATCH 0662/1744] Update install fix desktop copy --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 7d65daa8..4e431f4e 100755 --- a/install +++ b/install @@ -32,7 +32,7 @@ CubeSatSim/config -c -n CubeSatSim/config -l -n -cp /home/piCubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop +cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop sudo apt-get update && sudo apt-get dist-upgrade -y From 183374f903de9770f4e6739f8e28ff0a5538b867 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 11:17:40 -0500 Subject: [PATCH 0663/1744] Update install to install cmake --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 4e431f4e..71e5262f 100755 --- a/install +++ b/install @@ -80,6 +80,7 @@ fi cd +sudo apt-get install -y cmake git clone https://github.com/wb2osz/direwolf.git cd direwolf mkdir build From 3ddf0b897d943a83e765e961ddd7ff8b86ff6a0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:13:17 -0500 Subject: [PATCH 0664/1744] Update install remove peripheral --- install | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/install b/install index 71e5262f..4096ca2d 100755 --- a/install +++ b/install @@ -256,17 +256,10 @@ sudo raspi-config nonint do_legacy 0 fi if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then - - if [[ $(grep 'dtoverlay=dwc2,dr_mode=peripheral' /boot/config.txt) ]]; then - echo "dtoverlay=dwc2,dr_mode=peripheral aalready in /boot/config.txt" - else - sudo sed -i 's/dtoverlay=dwc2/dtoverlay=dwc2,dr_mode=peripheral/g' /boot/config.txt - echo " adding dr_mode=peripheral to /boot/config.txt" - fi - + echo "dtoverlay=dwc2 aalready in /boot/config.txt" else - echo "adding dtoverlay=dwc2,dr_mode=peripheral to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2,dr_mode=peripheral" >> /boot/config.txt' + echo "adding dtoverlay=dwc2 to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' fi if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then From 8e92c2111472b0eba75fe04545e46a2720702137 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:44:39 -0500 Subject: [PATCH 0665/1744] Update pacsatsim.sh add v option for USB audio TX and RX --- pacsatsim.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 56fc3033..7b59fad8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -140,7 +140,12 @@ if [ "$loopback" = "1" ]; then echo "Using audio loopback" sudo /home/pi/CubeSatSim/pacsatsim-d.sh & - + +elif [ "$loopback" = "v" ]; then + + echo "Using USB Audio TX and RX" + sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & + else echo "Using TXC FM transceiver" From f801396a49495df1155c052ea6756af5f43e3799 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:46:59 -0500 Subject: [PATCH 0666/1744] Update pacsatsim.sh add vox variable --- pacsatsim.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 7b59fad8..6e9d363f 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -3,9 +3,14 @@ # script to run PacsatSim loopback=0 +vox=0 if [ "$1" = "l" ] ; then loopback=1 + +elif [ "$1" = "v" ] ; then + + vox=1 fi @@ -141,7 +146,7 @@ if [ "$loopback" = "1" ]; then echo "Using audio loopback" sudo /home/pi/CubeSatSim/pacsatsim-d.sh & -elif [ "$loopback" = "v" ]; then +elif [ "$vox" = "1" ]; then echo "Using USB Audio TX and RX" sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & From c7a359fd7de98db2fa9d2ddee33421a9e28a9847 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:52:26 -0500 Subject: [PATCH 0667/1744] Update pacsatsim.sh add vox print --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6e9d363f..1ea856b1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -148,7 +148,7 @@ if [ "$loopback" = "1" ]; then elif [ "$vox" = "1" ]; then - echo "Using USB Audio TX and RX" + echo "Using Soundcard Audio TX and RX (VOX)" sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & else From 5b16fe457fcab7abda679342e21ce3a768971236 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 16:53:46 -0500 Subject: [PATCH 0668/1744] Update pacsat.sh add sound card VOX option --- groundstation/pacsat.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 16640dd6..321907d2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -3,10 +3,16 @@ # script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station loopback=0 +vox=0 if [ "$1" = "l" ] ; then loopback=1 echo "PacSat Ground Station with Loopback" + +elif [ "$1" = "v" ] ; then + + vox=1 + echo "PacSat Ground Station with Soundcard (VOX)" fi @@ -118,6 +124,11 @@ if [ "$loopback" = "1" ]; then echo "Using Audio Loopback" /home/pi/CubeSatSim/groundstation/pacsat-d.sh & +elif [ "$vox" = "1" ]; then + + echo "Using Soundcard Audio TX RX (VOX)" + /home/pi/CubeSatSim/groundstation/pacsat-dj.sh & + else echo "Using TXC FM Transceiver" From 8221559d770ea50e6675b068c49c1c591db0815b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 4 Mar 2026 17:12:41 -0500 Subject: [PATCH 0669/1744] Update direwolf-fm-pacsat-jp14.conf turn off ptt --- groundstation/direwolf/direwolf-fm-pacsat-jp14.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf index eb0bf0a2..5df8f59e 100644 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf @@ -1,6 +1,6 @@ MYCALL AMSAT ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO -20 +#PTT GPIO -20 CHANNEL 0 MODEM 1200 KISSPORT 8100 From 6b23a0b47898b6c9354b7ed9f4bbbb06ec59be79 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 09:10:23 -0500 Subject: [PATCH 0670/1744] Update config merge conflict --- config | 875 ++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 711 insertions(+), 164 deletions(-) diff --git a/config b/config index 55aaba34..75cca3c1 100755 --- a/config +++ b/config @@ -1,7 +1,8 @@ #!/bin/bash -function transmit_command_aprs { +function transmit_command { +<<<<<<< HEAD FILE=/home/pi/CubeSatSim/transmit_dtmf if [ -f "$FILE" ]; then @@ -104,113 +105,119 @@ function transmit_command_bpsk { exit } +======= + MODE=$1 + echo "CubeSatSim is in Transmit Commands mode" + echo +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 -function transmit_command_sstv { + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "TX Frequency is: " + echo -n ${7} + echo " MHz" FILE=/home/pi/CubeSatSim/transmit_dtmf if [ -f "$FILE" ]; then - echo "Stopping command and control" - sudo systemctl stop command - - echo "Transmit DTMF start" - gpio write 28 0 # ptt - gpio write 2 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-sstv.conf -t 0l - gpio write 2 0 # tx LED - gpio write 28 1 #ptt - echo "Transmit stop" - - echo "Resuming command and control" - sudo systemctl start command - - else - - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=s" - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - echo $STRING > /home/pi/CubeSatSim/t.txt echo - echo -n "Sending APRS packet to change mode to SSTV" - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 + echo "Sending DTMF tones to change to mode "$MODE - fi + case $MODE in + + a) + number=1 + ;; + f) + number=2 + ;; + b) + number=3 + ;; + s) + number=4 + ;; + m) + number=5 + ;; + e) + number=6 + ;; + j) + number=7 + ;; + o) + number=10 + ;; + *) + number=0 + ;; + esac - exit -} +# echo $number -function transmit_command_cw { + cat /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf.conf > /home/pi/CubeSatSim/direwolf-tmp.conf && echo 'CBEACON dest="DTMF-3" info="'$number' #" delay=0' >> /home/pi/CubeSatSim/direwolf-tmp.conf - FILE=/home/pi/CubeSatSim/transmit_dtmf - if [ -f "$FILE" ]; then +# echo "Stopping command and control" +# sudo systemctl stop command - echo "Stopping command and control" - sudo systemctl stop command - - echo "Transmit DTMF start" +# echo "Transmit start" gpio write 28 0 # ptt gpio write 2 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-cw.conf -t 0l + timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf-tmp.conf -t 0l > /dev/null 2>&1 gpio write 2 0 # tx LED gpio write 28 1 #ptt - echo "Transmit stop" +# echo "Transmit stop" - echo "Resuming command and control" - sudo systemctl start command +# echo "Resuming command and control" +# sudo systemctl start command else - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" + STRING="$1-11>APCSS:=3901.40N\07704.39WShi hi MODE="$MODE sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 echo $STRING > /home/pi/CubeSatSim/t.txt echo - echo -n "Sending APRS packet to change mode to CW" + echo -n "Sending APRS packet to change mode to "$MODE" " echo $STRING sudo touch /home/pi/CubeSatSim/ready sleep 3 fi - exit + echo + echo "To change the mode of this CubeSatSim use config -n" } -function transmit_command_beacon { - - FILE=/home/pi/CubeSatSim/transmit_dtmf - if [ -f "$FILE" ]; then - - echo "Stopping command and control" - sudo systemctl stop command +function check_restart { - echo "Transmit DTMF start" - gpio write 28 0 # ptt - gpio write 2 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-beacon.conf -t 0l - gpio write 2 0 # tx LED - gpio write 28 1 #ptt - echo "Transmit stop" - - echo "Resuming command and control" - sudo systemctl start command + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + restart=1 +# echo "Need to restart since batt saver" + else + reboot=1 +# echo "Need to reboot" + fi else - - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=o" - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - echo $STRING > /home/pi/CubeSatSim/t.txt - echo - echo -n "Sending APRS packet to toggle Beacon" - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit + restart=1 +# echo "Need to restart" + fi } +<<<<<<< HEAD echo "CubeSatSim v2.1 configuration tool" +======= +echo +echo "CubeSatSim v2.2 configuration tool" +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo # echo $1 # echo $2 @@ -222,8 +229,13 @@ sudo modprobe snd-aloop if [ -z "$2" ] ; then noreboot=0 else - noreboot=1 - echo "Reboot disabled" + if [ "$2" = "n" ] ; then + echo "Reboot disabled" + noreboot=1 + else + fail=$2 + fi + fi # echo "No reboot" @@ -249,6 +261,8 @@ if [ "$1" = "" ]; then echo "Mode is SSTV" elif [ "$1" = "e" ]; then echo "Mode is Repeater" + elif [ "$1" = "j" ]; then + echo "Mode is FUNcube" elif [ "$1" = "n" ]; then echo -n "Mode is Transmit Commands with " FILE=/home/pi/CubeSatSim/transmit_dtmf @@ -270,13 +284,89 @@ if [ "$1" = "" ]; then set -- $value if [ "$5" = "y" ] || [ "$5" = "yes" ] ; then -# sim="yes" echo "Simulated Telemetry is ON" else -# sim="no" - echo "Simulated Telemetry is OFF" + FILE=/home/pi/CubeSatSim/sim_mode_auto + if [ -f "$FILE" ]; then + echo "Simulated Telemetry is automatically turned ON" +# elif [[ $(timeout 2 i2cdetect -y 1 | grep -e "44" -e "45") ]]; then # check for battery board sensors +# # Check the exit code of the last command +# if [ $? -ne 0 ]; then +# echo "Simulated Telemetry is automatically turned ON" +# else +# echo "Simulated Telemetry is OFF" +# fi + else + echo "Simulated Telemetry is OFF" + fi fi - echo +# echo + + FILE=/home/pi/CubeSatSim/failure_mode.txt + if [ -f "$FILE" ]; then + if [[ $(grep "\-1" $FILE) ]]; then + echo "No simulated failure" + else + fail=$(<$FILE) + echo -n "Simulated " +# cat $FILE + + case $fail in + + 1) + echo "+Y Solar Panel Unplugged (1)" + ;; + 2) + echo "+X Solar Panel Failure (2)" + ;; + 3) + echo "-X Solar Panel Degredation (3)" + ;; + 4) + echo "-Y Solar Panel Short Circuit (4)" + ;; + 5) + echo "Failed I2C Bus 1 (5)" + ;; + 6) + echo "Failed I2C Bus 3 (6)" + ;; + 7) + echo "Failed Camera (7)" + ;; + 8) + echo "Failed Payload (8)" + ;; + 9) + echo "Failed BME Sensor (9)" + ;; + 10) + echo "Failed MPU Sensor (10)" + ;; + "11") + echo "Failed FM Audio (11)" + ;; + *) + echo "Unknown Failure" + ;; + esac +# echo $fail + fi + else + echo "No simulated failure" + fi + + if [ "${12}" = "y" ] || [ "${12}" = "yes" ] ; then + echo "Random Failure Mode is ON with time period" ${13} "seconds" + else + echo "Random Failure Mode is OFF" + fi + + echo -n "TX Frequency is: " + echo -n ${7} + echo -n " MHz, RX Frequency is: " + echo -n ${8} + echo " MHz" if [ "$9" = "yes" ] || [ "$9" = "y" ]; then echo "Balloon mode is ON" @@ -284,7 +374,7 @@ if [ "$1" = "" ]; then echo "Balloon mode is OFF" fi - echo +# echo echo -n "Current command count is: " cat /home/pi/CubeSatSim/command_count.txt echo @@ -295,7 +385,7 @@ if [ "$1" = "" ]; then echo -n "Squelch level is: " echo $6 - echo +# echo FILE=/home/pi/CubeSatSim/command_control if [ -f "$FILE" ]; then @@ -314,14 +404,14 @@ if [ "$1" = "" ]; then echo "Radio command and control is OFF" fi - echo +# echo echo -n "RX PL code is: " echo -n ${10} # echo echo -n " TX PL code is: " echo ${11} - echo +# echo FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then @@ -330,7 +420,7 @@ if [ "$1" = "" ]; then echo "Battery saver mode is OFF" fi - echo +# echo FILE=/home/pi/CubeSatSim/beacon_off if [ -f "$FILE" ]; then echo "Transmit beacon telemetry is OFF" @@ -342,7 +432,7 @@ if [ "$1" = "" ]; then echo -e "Current sim.cfg configuration file:" # echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} + echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo echo "To change, include an OPTION" @@ -364,11 +454,12 @@ elif [ "$1" = "-a" ]; then if [ "$1" == "n" ]; then - transmit_command_aprs + transmit_command "a" else echo "changing CubeSatSim to AFSK mode" +<<<<<<< HEAD sudo echo "a" > /home/pi/CubeSatSim/.mode if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver @@ -382,6 +473,11 @@ elif [ "$1" = "-a" ]; then else restart=1 fi +======= + check_restart + sudo echo "a" > /home/pi/CubeSatSim/.mode + +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-m" ]; then @@ -392,12 +488,14 @@ elif [ "$1" = "-m" ]; then if [ "$1" == "n" ]; then - transmit_command_cw + transmit_command "m" else echo "changing CubeSatSim to CW mode" + check_restart sudo echo "m" > /home/pi/CubeSatSim/.mode +<<<<<<< HEAD if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then @@ -410,6 +508,9 @@ elif [ "$1" = "-m" ]; then else restart=1 fi +======= + +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-f" ]; then @@ -420,7 +521,7 @@ elif [ "$1" = "-f" ]; then if [ "$1" == "n" ]; then - transmit_command_fsk + transmit_command "f" else @@ -441,7 +542,7 @@ elif [ "$1" = "-b" ]; then if [ "$1" == "n" ]; then - transmit_command_bpsk + transmit_command "b" else @@ -462,14 +563,15 @@ elif [ "$1" = "-s" ]; then if [ "$1" == "n" ]; then - transmit_command_sstv + transmit_command "s" else echo "changing CubeSatSim to SSTV mode" + check_restart sudo echo "s" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then +<<<<<<< HEAD FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 @@ -481,6 +583,8 @@ elif [ "$1" = "-s" ]; then else restart=1 fi +======= +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-t" ]; then @@ -495,14 +599,14 @@ elif [ "$1" = "-t" ]; then set -- $value if [ "$5" = "yes" ] || [ "$5" = "y" ]; then - echo "Simualted Telemetry is ON" + echo "Simulated Telemetry is ON" else - echo "Simualted Telemetry is OFF" + echo "Simulated Telemetry is OFF" fi echo -# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} echo "Do you want Simulated Telemetry ON (y/n) " read sim @@ -514,13 +618,14 @@ elif [ "$1" = "-t" ]; then else sim="no" echo "Simulated Telemetry is OFF" + echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures fi # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" # echo - echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} - echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + 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 ## echo "Rebooting CubeSatSim with new configuration file" ## echo @@ -549,7 +654,7 @@ elif [ "$1" = "-c" ]; then echo $oldcallsign echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} echo "Enter callsign in all capitals: " read callsign @@ -563,6 +668,7 @@ elif [ "$1" = "-c" ]; then echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" +<<<<<<< HEAD echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg @@ -575,6 +681,10 @@ elif [ "$1" = "-c" ]; then # sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties # sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties # sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties +======= + 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 +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi if [ "$norestart" = "1" ]; then @@ -607,7 +717,7 @@ elif [ "$1" = "-r" ]; then echo $2 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter Reset Count (integer): " @@ -627,8 +737,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} - echo $1 $resets $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + 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 fi if [ "$norestart" = "1" ]; then @@ -662,7 +772,7 @@ elif [ "$1" = "-l" ]; then echo $3 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter latitude (decimal degrees, positive is north): " @@ -704,8 +814,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} - echo $1 $2 $lat $long $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + 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 if [ "$norestart" = "1" ]; then echo @@ -756,7 +866,6 @@ elif [ "$1" = "-C" ]; then elif [ "$1" = "-T" ]; then - echo echo "Change command and control state" echo @@ -769,28 +878,51 @@ elif [ "$1" = "-T" ]; then echo if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Command and control set to OFF" + echo "Turning command and control OFF" sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1 # reboot=1 echo "restarting command and control" sudo systemctl restart command + echo "restarting transmit" + sudo systemctl restart transmit ## sudo reboot now fi else - echo "Radio command and control is OFF" + echo "Radio command and control is OFF" echo echo "Do you want to set command and control to ON (y/n) " read reset echo if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Command and control set to ON" - sudo touch /home/pi/CubeSatSim/command_control - echo "restarting command and control" -# reboot=1 - sudo systemctl restart command -## sudo reboot now + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" != "n" ] ; then + echo "Turning command and control ON" + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "RX Frequency is: " + echo -n ${8} + echo " MHz" + echo + + sudo touch /home/pi/CubeSatSim/command_control + echo "restarting command and control" +# reboot=1 + sudo systemctl restart command + echo "restarting transmit" + sudo systemctl restart transmit +## sudo reboot now + else + echo "Can't turn on Command and control in Transmit Commands mode." + fi fi fi @@ -918,7 +1050,7 @@ elif [ "$1" = "-R" ]; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null 2>&1 echo "Commands count reset to 0" - echo "0\n" > /home/pi/CubeSatSim/command_count.txt + echo "0" > /home/pi/CubeSatSim/command_count.txt else echo "Commands count not reset" fi @@ -994,7 +1126,7 @@ elif [ "$1" = "-q" ]; then echo $6 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter squelch (integer 1 - 8): " @@ -1016,8 +1148,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} - echo $1 $2 $3 $4 $4 $sq $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + 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 echo "Restarting CubeSatSim with new configuration file" ## echo @@ -1039,7 +1171,7 @@ elif [ "$1" = "-P" ]; then echo echo "Editing the PL (Private Line) CTCSS/CDCSS setting in" - echo "the configuration file for CubeSatSim" + echo "the configuration file for CubeSatSim" echo value=`cat /home/pi/CubeSatSim/sim.cfg` @@ -1053,7 +1185,7 @@ elif [ "$1" = "-P" ]; then echo ${11} echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo -e "Enter RX PL value integer 0: None, 01-38: CTCSS (analog, 39-121:CDCSS (digital)" @@ -1096,8 +1228,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 - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 $rxpl $txpl > /home/pi/CubeSatSim/sim.cfg + 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 ## echo "Rebooting CubeSatSim with new configuration file" ## echo @@ -1127,7 +1259,7 @@ elif [ "$1" = "-F" ]; then echo $8 echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo "Enter tx frequency as 4XX.XXXX: " read tx @@ -1146,23 +1278,24 @@ elif [ "$1" = "-F" ]; then rx="$8" echo "Keeping value of" $rx fi -# else - - echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" + echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" - echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} - echo $1 $2 $3 $4 $5 $6 $tx $rx $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg -# fi - -# if [ "$norestart" = "1" ]; then -# echo + 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 + echo "Restarting CubeSatSim with new configuration file" + +# if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then + sudo systemctl restart transmit # else - echo - echo "Restarting CubeSatSim with new configuration file" -## echo -# reboot=1 -## sudo reboot now +# echo +# echo "temporarily disabling gpsd and rebooting to program FM module" +# echo "this will take about 40 seconds" +# sudo systemctl stop gpsd.socket sudo systemctl restart transmit +# sleep 10 +# reboot=1 # fi elif [ "$1" = "-o" ]; then @@ -1173,7 +1306,7 @@ elif [ "$1" = "-o" ]; then if [ "$1" == "n" ]; then - transmit_command_beacon + transmit_command "o" else echo @@ -1212,6 +1345,7 @@ elif [ "$1" = "-o" ]; then # restart=1 fi fi + sleep 3 fi elif [ "$1" = "-H" ]; then @@ -1233,7 +1367,7 @@ elif [ "$1" = "-H" ]; then echo -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} +# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} echo "Do you want Balloon mode ON (y/n) " read hab @@ -1250,8 +1384,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} - echo $1 $2 $3 $4 $5 $6 $7 $8 $hab ${10} ${11} > /home/pi/CubeSatSim/sim.cfg + 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 ## echo "Rebooting CubeSatSim with new configuration file" ## echo @@ -1277,59 +1411,111 @@ elif [ "$1" = "-v" ]; then elif [ "$1" = "-e" ]; then - echo "changing CubeSatSim to Repeater mode" - sudo echo "e" > /home/pi/CubeSatSim/.mode + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + if [ "$1" == "n" ]; then + +<<<<<<< HEAD if [ "$1" = "p" ] || [ "$1" = "P" ] ; then reboot=1 else +======= + transmit_command "e" + + else + + echo "changing CubeSatSim to Repeater mode" + sudo echo "e" > /home/pi/CubeSatSim/.mode +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 restart=1 fi elif [ "$1" = "-n" ]; then - echo "changing CubeSatSim to Transmit Commands mode" +# echo "changing CubeSatSim to Transmit Commands mode" + + new=$2 value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value if [ "$1" = "n" ]; then - echo "Turning Transmit Command and Control mode OFF" - echo "Switching to BPSK mode" - sudo echo "b" > /home/pi/CubeSatSim/.mode - reboot=1 + echo "Turning Transmit Commands mode OFF" + if [ "$new" = "a" ] || [ "$new" = "s" ] || [ "$new" = "m" ] ; then + check_restart + echo "Switching to mode "$new + sudo echo $new > /home/pi/CubeSatSim/.mode + elif [ "$new" = "f" ] || [ "$new" = "b" ] || [ "$new" = "e" ] || [ "$new" = "j" ] ; then + echo "Switching to mode "$new + sudo echo $new > /home/pi/CubeSatSim/.mode + restart=1 + else + echo "Switching to BPSK mode" + sudo echo "b" > /home/pi/CubeSatSim/.mode + reboot=1 + fi + sudo systemctl restart command else - echo "Turning Transmit Command and Control mode ON" + echo "Switching to Transmit Commands mode" + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "TX Frequency is: " + echo -n ${7} + echo " MHz" + echo + + check_restart sudo echo "n" > /home/pi/CubeSatSim/.mode - restart=1 + sudo systemctl stop command fi elif [ "$1" = "-A" ]; then - echo "Transmit APRS control packets to control another CubeSatSim" + echo "Transmit APRS Commands to control another CubeSatSim" + echo + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "TX Frequency is: " + echo -n ${7} + echo " MHz" echo value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then + echo "The CubeSatSim/config -A command can only be run in APRS, SSTV, CW, or Transmit Commands modes." + echo "Switch to one of these modes (a, s, m, or n) then re-run this command." + exit + fi + if [ "$1" != "n" ]; then sudo systemctl stop cubesatsim sudo systemctl stop transmit - # sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 # sudo python3 -u /home/pi/CubeSatSim/transmit.py x > /dev/null 2>&1 & # Force APRS mode fi + sudo systemctl stop command - sim="y" + MODE="0" - while [ "$sim" = "y" ] + while [ "$MODE" != "x" ]; do - echo "Enter the mode number to change: 1=APRS, 2=FSK, 3=BPSK, 4=SSTV, 5=CW" + echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, o=Beacon on/off x=Exit this mode" read MODE +<<<<<<< HEAD case $MODE in @@ -1371,17 +1557,23 @@ elif [ "$1" = "-A" ]; then # sudo touch /home/pi/CubeSatSim/ready # sleep 5 # sudo touch /home/pi/CubeSatSim/ready +======= + + if [ "$MODE" != "x" ]; then + transmit_command $MODE + fi +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo - echo "Do you want to send another APRS command packet (y/n) " - read sim - echo + done - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 -# sudo systemctl restart cubesatsim - if [ "$1" != "n" ]; then + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + if [ "$1" != "n" ] ; then + sudo systemctl restart command reboot=1 fi @@ -1412,7 +1604,7 @@ elif [ "$1" = "-g" ]; then if [ "$rset" = "y" ] || [ "$rset" = "yes" ] ; then - echo "Resetting" + echo "Resetting and shutting down." echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0" > /home/pi/CubeSatSim/sim.cfg @@ -1422,11 +1614,13 @@ elif [ "$1" = "-g" ]; then sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1 - touch /home/pi/CubeSatSim/command_control_direwolf + sudo touch /home/pi/CubeSatSim/command_control_direwolf sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 - sudo echo "0" > /home/pi/CubeSatSim/command_count.txt + sudo echo "0" > /home/pi/CubeSatSim/command_count.txt + + sudo rm /home/pi/CubeSatSim/failure_mode.txt > /dev/null 2>&1 sudo systemctl stop cubesatsim sudo systemctl stop transmit @@ -1436,13 +1630,356 @@ elif [ "$1" = "-g" ]; then sudo journalctl --rotate sudo journalctl --vacuum-time=1s + + rm -rf ~/.config/chromium/Singleton* + + cat /dev/null > ~/.bash_history && history -c + + sudo shutdown now - reboot=1 +# reboot=1 else echo "Not resetting" fi +elif [ "$1" = "-j" ]; then + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" == "n" ]; then + + transmit_command "j" + + else + + echo "changing CubeSatSim to FUNcube mode" + sudo echo "j" > /home/pi/CubeSatSim/.mode + restart=1 + fi + +elif [ "$1" = "-M" ]; then + + if [ $fail ]; then + MODE=$fail + else + + FILE=/home/pi/CubeSatSim/failure_mode.txt + if [ -f "$FILE" ]; then + if [[ $(grep "\-1" $FILE) ]]; then + echo "Currently, no simulated failure (0)" + else + fail=$(<$FILE) + echo -n "Currently, simulated " + case $fail in + + 1) + echo "+Y Solar Panel Unplugged (1)" + ;; + 2) + echo "+X Solar Panel Failure (2)" + ;; + 3) + echo "-X Solar Panel Degredation (3)" + ;; + 4) + echo "-Y Solar Panel Short Circuit (4)" + ;; + 5) + echo "Failed I2C Bus 1 (5)" + ;; + 6) + echo "Failed I2C Bus 3 (6)" + ;; + 7) + echo "Failed Camera (7)" + ;; + 8) + echo "Failed Payload (8)" + ;; + 9) + echo "Failed BME Sensor (9)" + ;; + "10") + echo "Failed MPU Sensor (10)" + ;; + "11") + echo "Failed FM Audio (11)" + ;; + *) + echo "Unknown Failure" + ;; + esac + fi + else + echo "Currently, no simulated failure" + fi + + echo + echo "Set simulated failure mode (or Return to turn OFF)" + echo + + echo " 0 No Failure (turn OFF)" + echo " 1 +Y Solar Panel Unplugged" + echo " 2 +X Solar Panel Failure" + echo " 3 -X Solar Panel Degredation" + echo " 4 -Y Solar Panel Short Circuit" + echo " 5 Failed I2C Bus 1" + echo " 6 Failed I2C Bus 3" + echo " 7 Failed Camera" + echo " 8 Failed Payload" + echo " 9 Failed BME Sensor" + echo "10 Failed MPU Sensor" + echo "11 Failed FM Audio" + echo + + echo "Enter the failure number to set: 0 - 11" + read MODE + echo + fi + + if [ "$MODE" = "0" ]; then + echo "Setting No Simulated Failure" + MODE=-1 +# elif [ "$MODE" = "12" ]; then + +# if [ "$norestart" = "1" ]; then +# echo +# else +# reboot=1 +# fi + + else + case $MODE in + 1) + echo "+Y Solar Panel Unplugged" + ;; + 2) + echo "Setting Simulated +X Solar Panel Failure" + ;; + 3) + echo "Setting Simulated -X Solar Panel Degredation" + ;; + 4) + echo "Setting Simulated -Y Solar Panel Short Circuit" + ;; + 5) + echo "Setting Simulated Failed I2C Bus 1" + ;; + 6) + echo "Setting Simulated Failed I2C Bus 3" + ;; + 7) + echo "Setting Simulated Failed Camera" + ;; + 8) + echo "Setting Simulated Failed Payload" + ;; + 9) + echo "Setting Simulated Failed BME Sensor" + ;; + "10") + echo "Setting Simulated Failed MPU Sensor" + ;; + "11") + echo "Setting Failed FM Audio" + ;; + *) + echo "Setting No Simulated Failure" + MODE=-1 + ;; + esac + fi + +# echo $MODE + echo + sudo rm /home/pi/CubeSatSim/failure_mode.txt + echo $MODE > /home/pi/CubeSatSim/failure_mode.txt + + echo "Changing simulated failure mode to $MODE" | wall + +elif [ "$1" = "-N" ]; then + + FILE=/home/pi/CubeSatSim/failure_mode.txt + if [ -f "$FILE" ]; then + if [[ $(grep "\-1" $FILE) ]]; then + echo "No simulated failure" + fail=0 + else + echo "Simulated failure mode" + fail=$(<$FILE) + echo $fail + fi + else + echo "No simulated failure" + fail=0 + fi + + if [ $fail == 0 ]; then + echo "Changing to next mode" + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" = "a" ]; then + echo "Current mode is APRS" + echo "Next mode is FSK" + /home/pi/CubeSatSim/config -f + elif [ "$1" = "m" ]; then + echo "Current mode is CW" + echo "Next mode is FunCube" + /home/pi/CubeSatSim/config -j + elif [ "$1" = "f" ]; then + echo "Current mode is FSK" + echo "Next mode is BPSK" + /home/pi/CubeSatSim/config -b + elif [ "$1" = "b" ]; then + echo "Current mode is BPSK" + echo "Next mode is SSTV" + /home/pi/CubeSatSim/config -s + elif [ "$1" = "s" ]; then + echo "Current mode is SSTV" + echo "Next mode is CW" + /home/pi/CubeSatSim/config -m + elif [ "$1" = "e" ]; then + echo "Current mode is Repeater" + echo "Next mode is APRS" + /home/pi/CubeSatSim/config -a + elif [ "$1" = "j" ]; then + echo "Current mode is FUNcube" + echo "Next mode is Repeater" + /home/pi/CubeSatSim/config -e + else + echo "Unknown mode" + fi + else + echo "Changing to next simulated failure mode" + fail=$((fail + 1)) +# if [ $fail == 12 ]; then + if [ "$fail" -gt "11" ]; then + fail=1 + fi + echo $fail + /home/pi/CubeSatSim/config -M $fail + + fi + +elif [ "$1" = "-U" ]; then + + echo + echo "Changing the Random Simulated Failure setting in" + echo "the configuration file for CubeSatSim" + echo + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + if [ "${12}" = "yes" ] || [ "${12}" = "y" ]; then + echo "Random Simulated Failure is ON" + else + echo "Random Simulated Failure is OFF" + fi + + echo + +# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} + + echo "Do you want Random Simulated Failure ON (y/n) " + read sim + echo + + if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then + sim="yes" + echo "Random Simulated Failure is ON" + echo + echo "A new random failure is selected every" + echo ${13} "seconds." + echo + echo "Enter a new value or Return keeps current value." + + echo "Enter time in seconds (integer): " + + read time + + if [ -z $time ] ; then + time="${13}" + echo "Keeping value of " $time " seconds" + fi + + if ! [[ $time =~ ^[0-9]+$ ]] ; then + echo "Error: not an integer!" + time="${13}" + echo "Keeping value of" $time + fi + + else + sim="no" + echo "Random Simulated Failure is OFF" + time="${13}" +# echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures + 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} $sim $time + echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} $sim $time > /home/pi/CubeSatSim/sim.cfg + echo + + if [ "${12}" != "$sim" ] || [ "${13}" != "$time" ] ; then + reboot=1 + fi + +elif [ "$1" = "-u" ]; then + + echo + echo "Change gpsd state" + echo + + if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then + echo "gpsd is inactive" + echo + echo "Do you want to turn gpsd to ON (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to ON" + sudo systemctl enable gpsd + sudo systemctl enable gpsd.socket + echo + echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" + echo + + cat /etc/default/gpsd + + echo + echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + echo + echo "To monitor your gps device, use the gpsmon command." + echo + reboot=1 + fi + + else + echo "gpsd is active" + echo + echo "Do you want to turn gpsd to OFF (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to OFF" + sudo systemctl disable gpsd + sudo systemctl disable gpsd.socket +reboot=1 + fi + + fi elif [ "$1" = "-G" ]; then @@ -1511,7 +2048,8 @@ elif [ "$1" = "-h" ]; then echo " -f Change to FSK/DUV mode" echo " -b Change to BPSK mode" echo " -s Change to SSTV mode" - echo " -n Change to Transmit Commands mode" + echo " -j Change to FUNcube mode" + echo " -n Change to Transmit Commands mode" echo " -e Change to Repeater mode" echo " -j Change to FUNcube mode" echo " -G Change to PacSatSim mode" @@ -1528,18 +2066,27 @@ elif [ "$1" = "-h" ]; then echo " -R Change the Commands Count in the file command_count.txt" echo " -B Change Safe Mode (battery saver mode) manually" echo " -q Change the Squelch setting for command receiver" + echo " -Q Read the current Squelch for 10 seconds" echo " -F Change the RX and TX frequency" echo " -H Change the Balloon (HAB) mode" - echo " -p Display payload sensor data" + echo " -p Display payload sensor data for 3 seconds" echo " -v Display voltage and current data" echo " -P Change the PL (Private Line) CTCSS/CDCSS codes for FM RX and TX" echo " -A Transmit APRS control packets to control another CubeSatSim" echo " -D Change Transmit Commands state APRS or DTMF" echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" +<<<<<<< HEAD echo " -g Reset configuration back to default settings and shutdown" echo " -k Reset the PacSatSim Configuration" +======= + echo " -g Reset configuration back to default settings" + echo " -M Set simulated failure mode" + echo " -U Change the random failure mode setting" + echo " -N Set next mode or failure" + echo " -u Change gpsd state" +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo exit From 7b0544ba23f21a0f75ca6dd53256738167cc08aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 09:42:46 -0500 Subject: [PATCH 0671/1744] Update config resolve merge conflicts --- config | 248 +++++---------------------------------------------------- 1 file changed, 18 insertions(+), 230 deletions(-) diff --git a/config b/config index 75cca3c1..22fb272d 100755 --- a/config +++ b/config @@ -2,114 +2,9 @@ function transmit_command { -<<<<<<< HEAD - FILE=/home/pi/CubeSatSim/transmit_dtmf - if [ -f "$FILE" ]; then - - echo "Stopping command and control" - sudo systemctl stop command - - echo "Transmit DTMF start" -# gpio write 28 0 # ptt - gpio write 2 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-aprs.conf -t 0l - gpio write 2 0 # tx LED -# gpio write 28 1 #ptt - echo "Transmit stop" - - echo "Resuming command and control" - sudo systemctl start command - - else - - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - echo $STRING > /home/pi/CubeSatSim/t.txt - echo - echo -n "Sending APRS packet to change mode to APRS " - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} - -function transmit_command_fsk { - - FILE=/home/pi/CubeSatSim/transmit_dtmf - if [ -f "$FILE" ]; then - - echo "Stopping command and control" - sudo systemctl stop command - - echo "Transmit DTMF start" - gpio write 28 0 # ptt - gpio write 2 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-fsk.conf -t 0l - gpio write 2 0 # tx LED - gpio write 28 1 #ptt - echo "Transmit stop" - - echo "Resuming command and control" - sudo systemctl start command - - else - - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f" - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - echo $STRING > /home/pi/CubeSatSim/t.txt - echo - echo -n "Sending APRS packet to change mode to FSK" - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} - -function transmit_command_bpsk { - - FILE=/home/pi/CubeSatSim/transmit_dtmf - if [ -f "$FILE" ]; then - - echo "Stopping command and control" - sudo systemctl stop command - - echo "Transmit DTMF start" - gpio write 28 0 # ptt - gpio write 2 1 # tx LED - timeout 3 direwolf -c /home/pi/CubeSatSim/direwolf/direwolf-transmit-dtmf-bpsk.conf -t 0l - gpio write 2 0 # tx LED - gpio write 28 1 #ptt - echo "Transmit stop" - - echo "Resuming command and control" - sudo systemctl start command - - else - - STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b" - sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 - echo $STRING > /home/pi/CubeSatSim/t.txt - echo - echo -n "Sending APRS packet to change mode to BPSK" - echo $STRING - sudo touch /home/pi/CubeSatSim/ready - sleep 3 - - fi - - exit -} -======= MODE=$1 echo "CubeSatSim is in Transmit Commands mode" echo ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null @@ -148,6 +43,9 @@ function transmit_command_bpsk { j) number=7 ;; + p) + number=8 + ;; o) number=10 ;; @@ -197,7 +95,9 @@ function check_restart { echo "$value" > /dev/null set -- $value - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + elif [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 @@ -212,12 +112,8 @@ function check_restart { fi } -<<<<<<< HEAD -echo "CubeSatSim v2.1 configuration tool" -======= echo echo "CubeSatSim v2.2 configuration tool" ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo # echo $1 # echo $2 @@ -459,25 +355,9 @@ elif [ "$1" = "-a" ]; then else echo "changing CubeSatSim to AFSK mode" -<<<<<<< HEAD - sudo echo "a" > /home/pi/CubeSatSim/.mode - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else - restart=1 - fi -======= check_restart sudo echo "a" > /home/pi/CubeSatSim/.mode ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-m" ]; then @@ -495,22 +375,7 @@ elif [ "$1" = "-m" ]; then echo "changing CubeSatSim to CW mode" check_restart sudo echo "m" > /home/pi/CubeSatSim/.mode -<<<<<<< HEAD - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else - restart=1 - fi -======= ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 fi elif [ "$1" = "-f" ]; then @@ -571,22 +436,6 @@ elif [ "$1" = "-s" ]; then check_restart sudo echo "s" > /home/pi/CubeSatSim/.mode -<<<<<<< HEAD - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - restart=1 - else - reboot=1 - fi - elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else - restart=1 - fi -======= ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 - fi - elif [ "$1" = "-t" ]; then echo @@ -668,23 +517,9 @@ elif [ "$1" = "-c" ]; then echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" -<<<<<<< HEAD - echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo $callsign $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} > /home/pi/CubeSatSim/sim.cfg - -# sudo systemctl stop pacsatsim &>/dev/null -# sudo killall -9 java &>/dev/null - -# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config -# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/pi_pacsat/Debug/pacsat.config -# sudo sed -i "s/callsign=$oldcallsign/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties -# sudo sed -i "s/callsign=AMSAT/callsign=$callsign/g" /home/pi/PacSatGround/PacSatGround.properties -# sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties -# sudo sed -i "s/AMSAT/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties -======= 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 ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 + fi if [ "$norestart" = "1" ]; then @@ -1417,19 +1252,16 @@ elif [ "$1" = "-e" ]; then if [ "$1" == "n" ]; then -<<<<<<< HEAD - if [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - else -======= transmit_command "e" else echo "changing CubeSatSim to Repeater mode" sudo echo "e" > /home/pi/CubeSatSim/.mode ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 - restart=1 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + reboot=1 + else + restart=1 fi elif [ "$1" = "-n" ]; then @@ -1452,6 +1284,10 @@ elif [ "$1" = "-n" ]; then echo "Switching to mode "$new sudo echo $new > /home/pi/CubeSatSim/.mode restart=1 + elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then + echo "Switching to PacSat mode" + sudo echo $new > /home/pi/CubeSatSim/.mode + reboot=1 else echo "Switching to BPSK mode" sudo echo "b" > /home/pi/CubeSatSim/.mode @@ -1513,56 +1349,12 @@ elif [ "$1" = "-A" ]; then while [ "$MODE" != "x" ]; do - echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, o=Beacon on/off x=Exit this mode" + echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, p=PacSat, o=Beacon on/off x=Exit this mode" read MODE -<<<<<<< HEAD - - case $MODE in - - 1) - echo "Mode 1 is APRS" - transmit_command_aprs -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=a" - ;; - 2) - echo "Mode 2 is FSK" - transmit_command_fsk -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=f" - ;; - 3) - echo "Mode 3 is BPSK" - transmit_command_bpsk -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=b" - ;; - 4) - echo "Mode 4 is SSTV" - transmit_command_sstv -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=s" - ;; - 5) - echo "Mode 5 is CW" - transmit_command_cw -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=m" - ;; - *) - echo "Unknown mode" -# STRING="AMSAT-11>APCSS:=3901.40N\07704.39WShi hi MODE=?" - ;; - esac -# sudo rm /home/pi/CubeSatSim/t.txt > /dev/null 2>&1 -# echo $STRING > /home/pi/CubeSatSim/t.txt -# echo -# echo -n "Sending APRS packet " -# echo $STRING -# sudo touch /home/pi/CubeSatSim/ready -# sleep 5 -# sudo touch /home/pi/CubeSatSim/ready -======= if [ "$MODE" != "x" ]; then transmit_command $MODE fi ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 echo @@ -2076,17 +1868,13 @@ elif [ "$1" = "-h" ]; then echo " -D Change Transmit Commands state APRS or DTMF" echo " -o Change telemetry beacon transmit state" echo " -L Change microphone level for command and control" -<<<<<<< HEAD - echo " -g Reset configuration back to default settings and shutdown" - echo " -k Reset the PacSatSim Configuration" - -======= echo " -g Reset configuration back to default settings" echo " -M Set simulated failure mode" echo " -U Change the random failure mode setting" echo " -N Set next mode or failure" echo " -u Change gpsd state" ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 + echo " -k Reset the PacSatSim Configuration" + echo exit From c6bda6325e5bc0e8ec2fde37c1d8d74a353fead2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 10:10:31 -0500 Subject: [PATCH 0672/1744] Update direwolf-cc.conf resolve merge conflict --- direwolf-cc.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index 2a3b5ef9..af71089d 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -1,4 +1,3 @@ -#ADEVICE hw:CARD=Device,DEV=0 default ADEVICE shared_mic hw:CARD=Loopback,DEV=1 DTMF MYCALL AMSAT From 13fe23c425b22c0ff3786b19ef73a4f00cfa7145 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 10:18:32 -0500 Subject: [PATCH 0673/1744] Update dtmf_aprs_cc.py needs merge conflict done --- dtmf_aprs_cc.py | 157 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 153 insertions(+), 4 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index d9eba04a..68ae8954 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,15 +1,24 @@ import sys from os import system -import RPi.GPIO as GPIO -from RPi.GPIO import output +# import RPi.GPIO as GPIO +# from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') +def blink(times): + for i in range(times): + system("gpio write 27 0") +# GPIO.output(27, 0) + sleep(0.1) + system("gpio write 27 1") +# GPIO.output(27, 1) + sleep(0.1) + if __name__ == "__main__": powerPin = 16 - txLed = 27 + txLed = 17 change_mode = False debug_mode = False counter = 1 @@ -18,6 +27,7 @@ if __name__ == "__main__": if ('d' == sys.argv[1]): debug_mode = True +<<<<<<< HEAD while True: try: for line in sys.stdin: @@ -206,7 +216,146 @@ if __name__ == "__main__": change_mode = False except: print("Error reading line (probably due to UTF-8 issue)") +======= + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("DTMF>APDW15:t5#")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("MODE=e")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + if ((line.find("DTMF>APDW15:t6#")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + if ((line.find("MODE=j")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("DTMF>APDW15:t7#")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("MODE=o")) > 0): + counter = (counter + 1) % 2 # Direwolf prints it twice, only do once + if (counter == 1): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + counter = 1 + if ((line.find("DTMF>APDW15:t10#")) > 0): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + +# if ((debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice + if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice + if (mode == 'f'): + blink(2) + sleep(1) + + elif (mode == 'b'): + blink(3) + sleep(1) + + elif (mode == 's'): + blink(4) + sleep(1) + + elif (mode == 'm'): + blink(5) + sleep(1) + + elif (mode == 'e'): + blink(6) + sleep(1) + + elif (mode == 'j'): + blink(7) + sleep(1) + + elif (mode == 'a'): + mode = 'a' + blink(1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + +# GPIO.output(txLed, 0) +# GPIO.output(powerPin, 0) + system("gpio write 27 1") + system("gpio write 0 0") + system("gpio write 2 0") + + system("sudo systemctl stop transmit") +# system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + + change_mode = False + +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") - From e24cdc072448caf34debc3d1057d85351ae73d06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 12:23:59 -0500 Subject: [PATCH 0674/1744] add try around read for UTF-8 issue --- dtmf_aprs_cc.py | 280 ++++++++++++++++++++++++------------------------ 1 file changed, 141 insertions(+), 139 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 18ed491f..cd883f5a 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -26,153 +26,155 @@ if __name__ == "__main__": # print("There are arguments!") if ('d' == sys.argv[1]): debug_mode = True - - for line in sys.stdin: -# if (debug_mode): - print(line, end =" ") - logging.warning(line) - -# if '^c' == line.rstrip(): -# break - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("DTMF>APDW15:t5#")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("MODE=e")) > 0): - system("echo '\nRepeater Mode!!\n'") - mode = 'e' - change_mode = True - if ((line.find("DTMF>APDW15:t6#")) > 0): - system("echo '\nRepeater Mode!!\n'") - mode = 'e' - change_mode = True - if ((line.find("MODE=j")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("DTMF>APDW15:t7#")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("MODE=o")) > 0): - counter = (counter + 1) % 2 # Direwolf prints it twice, only do once - if (counter == 1): + try: + for line in sys.stdin: + # if (debug_mode): + print(line, end =" ") + logging.warning(line) + + # if '^c' == line.rstrip(): + # break + + if ((line.find("MODE=a")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("DTMF>APDW15:t1#")) > 0): + system("echo '\nAPRS Mode!!\n'") + mode = 'a' + change_mode = True + if ((line.find("MODE=f")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("DTMF>APDW15:t2#")) > 0): + system("echo '\nFSK Mode!!\n'") + mode = 'f' + change_mode = True + if ((line.find("MODE=b")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("DTMF>APDW15:t3#")) > 0): + system("echo '\nBPSK Mode!!\n'") + mode = 'b' + change_mode = True + if ((line.find("MODE=s")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("DTMF>APDW15:t4#")) > 0): + system("echo '\nSSTV Mode!!\n'") + mode = 's' + change_mode = True + if ((line.find("MODE=m")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("DTMF>APDW15:t5#")) > 0): + system("echo '\nCW Mode!!\n'") + mode = 'm' + change_mode = True + if ((line.find("MODE=e")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + if ((line.find("DTMF>APDW15:t6#")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + if ((line.find("MODE=j")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("DTMF>APDW15:t7#")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("MODE=n")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("DTMF>APDW15:t11#")) > 0): + system("echo '\nTransmit Commands Mode!!\n'") + mode = 'n' + change_mode = True + if ((line.find("MODE=o")) > 0): + counter = (counter + 1) % 2 # Direwolf prints it twice, only do once + if (counter == 1): + system("echo '\nBeacon Mode toggle!!\n'") + mode = 'o' + change_mode = True + counter = 1 + if ((line.find("DTMF>APDW15:t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - counter = 1 - if ((line.find("DTMF>APDW15:t10#")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - -# if ((debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice - if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice - if (mode == 'f'): - blink(2) - sleep(1) - - elif (mode == 'b'): - blink(3) - sleep(1) - - elif (mode == 's'): - blink(4) - sleep(1) - - elif (mode == 'm'): - blink(5) - sleep(1) - - elif (mode == 'e'): - blink(6) - sleep(1) - - elif (mode == 'j'): - blink(7) - sleep(1) - - elif (mode == 'a'): - mode = 'a' - blink(1) - sleep(1) + + # if ((debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice + if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice + if (mode == 'f'): + blink(2) + sleep(1) - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) + elif (mode == 'b'): + blink(3) + sleep(1) + + elif (mode == 's'): + blink(4) + sleep(1) -# GPIO.output(txLed, 0) -# GPIO.output(powerPin, 0) - system("gpio write 27 1") - system("gpio write 0 0") - system("gpio write 2 0") - - system("sudo systemctl stop transmit") -# system("sudo systemctl stop cubesatsim") + elif (mode == 'm'): + blink(5) + sleep(1) + + elif (mode == 'e'): + blink(6) + sleep(1) + + elif (mode == 'j'): + blink(7) + sleep(1) + + elif (mode == 'a'): + mode = 'a' + blink(1) + sleep(1) + + try: + file = open("/home/pi/CubeSatSim/command_count.txt", "r") + string = file.read() + file.close() + command_count = int(string) + command_count += 1 + filec = open("/home/pi/CubeSatSim/command_count.txt", "w") + command_count_string = str(command_count) + print(command_count_string) + string = filec.write(command_count_string) + filec.close() + except: + print("Can't write command_count file!") + print("Command_count: ") + print(command_count) + + # GPIO.output(txLed, 0) + # GPIO.output(powerPin, 0) + system("gpio write 27 1") + system("gpio write 0 0") + system("gpio write 2 0") - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - + system("sudo systemctl stop transmit") + # system("sudo systemctl stop cubesatsim") + + print("\n/home/pi/CubeSatSim/config -" + mode) + system("/home/pi/CubeSatSim/config -" + mode) + + change_mode = False + except: + print("Error reading line (probably due to UTF-8 issue)") - change_mode = False - print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") From e4d08dc1f01dcdcabc3bd812023281890b988c82 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 12:40:51 -0500 Subject: [PATCH 0675/1744] Update dtmf_aprs_cc.py making changes to merge --- dtmf_aprs_cc.py | 173 ++++-------------------------------------------- 1 file changed, 12 insertions(+), 161 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 68ae8954..7eec1ed2 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,24 +1,15 @@ import sys from os import system -# import RPi.GPIO as GPIO -# from RPi.GPIO import output +import RPi.GPIO as GPIO +from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') -def blink(times): - for i in range(times): - system("gpio write 27 0") -# GPIO.output(27, 0) - sleep(0.1) - system("gpio write 27 1") -# GPIO.output(27, 1) - sleep(0.1) - if __name__ == "__main__": powerPin = 16 - txLed = 17 + txLed = 27 change_mode = False debug_mode = False counter = 1 @@ -27,7 +18,6 @@ if __name__ == "__main__": if ('d' == sys.argv[1]): debug_mode = True -<<<<<<< HEAD while True: try: for line in sys.stdin: @@ -42,7 +32,7 @@ if __name__ == "__main__": system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' @@ -51,7 +41,7 @@ if __name__ == "__main__": system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' @@ -60,7 +50,7 @@ if __name__ == "__main__": system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' @@ -69,7 +59,7 @@ if __name__ == "__main__": system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' @@ -78,7 +68,7 @@ if __name__ == "__main__": system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' @@ -87,7 +77,7 @@ if __name__ == "__main__": system("echo '\nPacSatSim Mode!!\n'") mode = 'G' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") mode = 'G' @@ -96,7 +86,7 @@ if __name__ == "__main__": system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - counter = (counter + 1) % 2 + if ((line.find(":t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' @@ -106,7 +96,7 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - counter = (counter + 1) % 2 + counter = (counter + 1) % 2 if ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' @@ -216,146 +206,7 @@ if __name__ == "__main__": change_mode = False except: print("Error reading line (probably due to UTF-8 issue)") -======= - if ((line.find("MODE=a")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("DTMF>APDW15:t1#")) > 0): - system("echo '\nAPRS Mode!!\n'") - mode = 'a' - change_mode = True - if ((line.find("MODE=f")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("DTMF>APDW15:t2#")) > 0): - system("echo '\nFSK Mode!!\n'") - mode = 'f' - change_mode = True - if ((line.find("MODE=b")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("DTMF>APDW15:t3#")) > 0): - system("echo '\nBPSK Mode!!\n'") - mode = 'b' - change_mode = True - if ((line.find("MODE=s")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("DTMF>APDW15:t4#")) > 0): - system("echo '\nSSTV Mode!!\n'") - mode = 's' - change_mode = True - if ((line.find("MODE=m")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("DTMF>APDW15:t5#")) > 0): - system("echo '\nCW Mode!!\n'") - mode = 'm' - change_mode = True - if ((line.find("MODE=e")) > 0): - system("echo '\nRepeater Mode!!\n'") - mode = 'e' - change_mode = True - if ((line.find("DTMF>APDW15:t6#")) > 0): - system("echo '\nRepeater Mode!!\n'") - mode = 'e' - change_mode = True - if ((line.find("MODE=j")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("DTMF>APDW15:t7#")) > 0): - system("echo '\nFUNcube Mode!!\n'") - mode = 'j' - change_mode = True - if ((line.find("MODE=n")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("DTMF>APDW15:t11#")) > 0): - system("echo '\nTransmit Commands Mode!!\n'") - mode = 'n' - change_mode = True - if ((line.find("MODE=o")) > 0): - counter = (counter + 1) % 2 # Direwolf prints it twice, only do once - if (counter == 1): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - counter = 1 - if ((line.find("DTMF>APDW15:t10#")) > 0): - system("echo '\nBeacon Mode toggle!!\n'") - mode = 'o' - change_mode = True - -# if ((debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice - if (debug_mode == False) and (change_mode == True): # skip every other APRS command since Direwolf prints them twice - if (mode == 'f'): - blink(2) - sleep(1) - - elif (mode == 'b'): - blink(3) - sleep(1) - - elif (mode == 's'): - blink(4) - sleep(1) - - elif (mode == 'm'): - blink(5) - sleep(1) - - elif (mode == 'e'): - blink(6) - sleep(1) - - elif (mode == 'j'): - blink(7) - sleep(1) - - elif (mode == 'a'): - mode = 'a' - blink(1) - sleep(1) - - try: - file = open("/home/pi/CubeSatSim/command_count.txt", "r") - string = file.read() - file.close() - command_count = int(string) - command_count += 1 - filec = open("/home/pi/CubeSatSim/command_count.txt", "w") - command_count_string = str(command_count) - print(command_count_string) - string = filec.write(command_count_string) - filec.close() - except: - print("Can't write command_count file!") - print("Command_count: ") - print(command_count) - -# GPIO.output(txLed, 0) -# GPIO.output(powerPin, 0) - system("gpio write 27 1") - system("gpio write 0 0") - system("gpio write 2 0") - - system("sudo systemctl stop transmit") -# system("sudo systemctl stop cubesatsim") - - print("\n/home/pi/CubeSatSim/config -" + mode) - system("/home/pi/CubeSatSim/config -" + mode) - - - change_mode = False - ->>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 print("Waiting 5 seconds to allow unplug and plug of soundcard") sleep(5) print("Done") + From 0e0a8e9927198f5d3be9c26df77b104a600c5a4d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 12:50:54 -0500 Subject: [PATCH 0676/1744] Update dtmf_aprs_cc.py finish merge conflict changes --- dtmf_aprs_cc.py | 115 ++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 67 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 7eec1ed2..67b82ec8 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,12 +1,21 @@ import sys from os import system -import RPi.GPIO as GPIO -from RPi.GPIO import output +#import RPi.GPIO as GPIO +#from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') # logging.warning('CC-Warning!') +def blink(times): + for i in range(times): + system("gpio write 27 0") +# GPIO.output(27, 0) + sleep(0.1) + system("gpio write 27 1") +# GPIO.output(27, 1) + sleep(0.1) + if __name__ == "__main__": powerPin = 16 txLed = 27 @@ -64,6 +73,7 @@ if __name__ == "__main__": system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True + if ((line.find("MODE=m")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' @@ -73,15 +83,27 @@ if __name__ == "__main__": system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True + + if ((line.find("MODE=e")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + + if ((line.find(":t6#")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + if ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' + mode = 'p' change_mode = True if ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'G' - change_mode = True + mode = 'p' + change_mode = True + if ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' @@ -91,91 +113,50 @@ if __name__ == "__main__": system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - # Currently, C2C does not support Repeater mode e + if ((line.find("MODE=o")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True counter = (counter + 1) % 2 + if ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(txLed, GPIO.OUT) if (mode == 'f'): - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(2) sleep(1) elif (mode == 'b'): - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(3) sleep(1) elif (mode == 's'): - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(4) sleep(1) elif (mode == 'm'): - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(5) + sleep(1) + + elif (mode == 'e'): + blink(6) + sleep(1) + + elif (mode == 'j'): + blink(7) + sleep(1) + + elif (mode == 'p'): + blink(8) sleep(1) + elif (mode == 'a'): - mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) + blink(1) sleep(1) try: @@ -196,7 +177,7 @@ if __name__ == "__main__": GPIO.output(txLed, 0) GPIO.output(powerPin, 0) - system("sudo systemctl stop rpitx") + system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") print("\n/home/pi/CubeSatSim/config -" + mode) From 42aa30f83d7a4363749fd0e5fa1721a3644d2b9e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:49:54 -0500 Subject: [PATCH 0677/1744] Update cubicsdr.sh resolve merge conflict --- groundstation/cubicsdr.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/groundstation/cubicsdr.sh b/groundstation/cubicsdr.sh index 2bfb65dc..3b125dc6 100755 --- a/groundstation/cubicsdr.sh +++ b/groundstation/cubicsdr.sh @@ -31,6 +31,8 @@ sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + #sudo kill `ps -aux | grep cubicsdr-packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null #sudo kill `ps -aux | grep packet | grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null @@ -42,6 +44,24 @@ sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start +sudo killall -9 rtl_fm &>/dev/null + +zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & + +sleep 5 + +setsid CubicSDR + +sleep 10 + +#$SHELL +#sudo kill `ps -aux | grep sstv_decode_prompt| grep -v grep | awk '{ print $2 }'` &>/dev/null && killall inotifywait &>/dev/null + +sudo killall -9 zenity &>/dev/null + +sudo /etc/init.d/alsa-utils stop +sudo /etc/init.d/alsa-utils start + zenity --info --width=650 --height=140 --title="Instructions" --text="When CubicSDR opens, select Generic RTL2832U device then click Start to begin.\n\nThen click on a signal in the watefall to listen." & sleep 5 From 47705af70746c7c05fb4a5ca81a03ba30cdc7692 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:51:43 -0500 Subject: [PATCH 0678/1744] Update direwolf.conf resolve merge conflict --- groundstation/direwolf/direwolf.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/direwolf/direwolf.conf b/groundstation/direwolf/direwolf.conf index 3b372144..7bf93998 100644 --- a/groundstation/direwolf/direwolf.conf +++ b/groundstation/direwolf/direwolf.conf @@ -1 +1 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 +ADEVICE plughw:CARD=Loopback,DEV=1 From 11bd5a7d1ec49a3c28e2494c627248bb2e4effe4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:53:45 -0500 Subject: [PATCH 0679/1744] Update fox.sh resolve merge conflict --- groundstation/fox.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/groundstation/fox.sh b/groundstation/fox.sh index 36e241e0..27050f9a 100755 --- a/groundstation/fox.sh +++ b/groundstation/fox.sh @@ -21,6 +21,8 @@ sudo killall -9 java &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 direwolf &>/dev/null #sudo killall -9 aplay &>/dev/null @@ -32,6 +34,8 @@ sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start +sudo killall -9 rtl_fm &>/dev/null + sleep 5 #/home/pi/FoxTelem/FoxTelem /home/pi/FoxTelemetryData-CubeSatSim From 55e717332f98e25713fa926e46f6cde648f9391a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:54:58 -0500 Subject: [PATCH 0680/1744] Update loc.sh resolve merge conflict --- groundstation/loc.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/groundstation/loc.sh b/groundstation/loc.sh index 8aa8cd9f..94558962 100755 --- a/groundstation/loc.sh +++ b/groundstation/loc.sh @@ -7,10 +7,8 @@ sudo killall -9 gpredict &>/dev/null source /home/pi/venv/bin/activate - python3 /home/pi/CubeSatSim/groundstation/loc-foxtelem.py #/usr/bin/gpredict nohup /usr/bin/gpredict /dev/null 2>&1 & - From 987cabaf327c7bab62bdaca48d2d1aee3cbed767 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 13:58:20 -0500 Subject: [PATCH 0681/1744] Update packet.sh resolve merge conflicts --- groundstation/packet.sh | 63 ++++++++++++----------------------------- 1 file changed, 18 insertions(+), 45 deletions(-) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index 24c04f0b..2b47089f 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -4,6 +4,8 @@ sudo modprobe snd-aloop +sudo killall -9 CubicSDR &>/dev/null + sudo systemctl stop openwebrx sudo systemctl stop rtl_tcp @@ -24,26 +26,28 @@ sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 java &>/dev/null -sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null sudo killall -9 zenity &>/dev/null +sudo killall -9 rtl_fm &>/dev/null + +#sudo killall -9 fctelem &>/dev/null + sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start echo -frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") +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") #echo $frequency if [ -z "$frequency" ]; then -echo "No choice made. Exiting." +echo "No choice made." -sleep 3 - -exit +frequency=434900 #echo "Choose the number for the packet decoding option:" #echo @@ -102,38 +106,6 @@ elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." echo -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." @@ -170,19 +142,19 @@ echo "Note that the 'Tuned to' frequency will be different from the chosen frequ echo -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then +#if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" +# echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & +# direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & -else +#else echo -e "Auto decoding APRS packets on $frequency Hz" - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf & # -t 0 & + setsid direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf & -fi +#fi sleep 5 @@ -191,7 +163,8 @@ echo "$value" > /dev/null set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 + rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 91a6c2d9025334f11c895e1d59d23e08c7f9d578 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:06:32 -0500 Subject: [PATCH 0682/1744] Update rtl-tcp.sh resolve merge conflicts --- groundstation/rtl-tcp.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index d5d541b1..3d49d11d 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -39,6 +39,8 @@ sudo killall -9 rtl_fm &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 qsstv &>/dev/null @@ -52,15 +54,9 @@ sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start -#sudo /bin/sh -c '/usr/local/bin/rtl_tcp -a $(hostname -I|cut -f1 -d " ")' -sudo systemctl start rtl_tcp &>/dev/null - -sudo journalctl -af -u rtl_tcp & +sudo killall -9 rtl_fm &>/dev/null -while [[ $(sudo systemctl status rtl_tcp | grep "Active: active (running)") ]] -do - sleep 5 -done +sudo /bin/sh -c 'rtl_tcp -a $(hostname -I|cut -f1 -d " ")' sleep 5 From 0f55b6019254a977967909bc112abcda726f6840 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:08:05 -0500 Subject: [PATCH 0683/1744] Update sdr.sh resolve merge conflicts --- groundstation/sdr.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 66983556..2821d7c0 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -36,6 +36,8 @@ sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 qsstv &>/dev/null #sudo killall -9 aplay &>/dev/null @@ -49,7 +51,9 @@ sudo systemctl stop rtl_tcp &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start -sudo systemctl restart openwebrx &>/dev/null +sudo killall -9 rtl_fm &>/dev/null + +sudo systemctl restart openwebrx sleep 10 From 891a60befab640e0586f05127e3dfd8c6c4b541b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:11:05 -0500 Subject: [PATCH 0684/1744] Update sstv_decode_prompt.sh resolve merge conflicts --- groundstation/sstv_decode_prompt.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index fbc55895..ae49a758 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -28,24 +28,26 @@ sudo killall -9 java &>/dev/null sudo killall -9 CubicSDR &>/dev/null +sudo killall -9 sdrpp &>/dev/null + sudo killall -9 zenity &>/dev/null sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start +sudo killall -9 rtl_fm &>/dev/null + #echo "s" >> .mode -frequency=$(zenity --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") +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") echo $frequency if [ -z "$frequency" ]; then -echo "No choice made. Exiting." - -sleep 3 +echo "No choice made." -exit +frequency=434900 #echo "Choose the number for the frequency for SSTV decoding:" #echo "1. ISS (145800Hz)" @@ -120,7 +122,7 @@ echo -e "Auto decoding SSTV on $frequency Hz" sleep 2 -qsstv & +setsid qsstv & sleep 5 @@ -133,10 +135,9 @@ set -- $value #rtl_fm -M fm -f 434.9M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f 434.9M -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 +rtl_fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 -#rtl_fm -M fm -f $frequency -s 48k | aplay -D plughw:${2:0:1},0,1 -r 48000 -t raw -f S16_LE -c 1 sleep 5 From 332a2fd21614ff6a685f3558970af09c8e8274f1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:39:57 -0500 Subject: [PATCH 0685/1744] Update install resolve merge conflicts --- install | 765 ++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 599 insertions(+), 166 deletions(-) diff --git a/install b/install index 4096ca2d..b1981204 100755 --- a/install +++ b/install @@ -1,13 +1,313 @@ #!/bin/bash -echo -e "\ninstallation script for CubeSatSim v2.1\n" +FLAG=0 +checkout=0 +BULLSEYE=0 +UPDATE=0 + +FILE=/home/pi/CubeSatSim/cubesatsim # code has already been compiled +if [ -f "$FILE" ]; then + + UPDATE=1 + + echo -e "\nUpdate script for CubeSatSim v2.2\n" + + if [ -z "$1" ] ; then + checkout=0 + else + checkout=1 + branch="$1" + echo -n "changing to branch " + echo $branch + FLAG=1 + fi + + if [ "$2" = "n" ] ; then + noreboot=1 + else + noreboot=0 + fi + +else + + echo -e "\nInstallation script for CubeSatSim v2.2\n" + + touch /home/pi/CubeSatSim/command_control_direwolf + + echo "creating $FILE" + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg + + /home/pi/CubeSatSim/config -c -n + + /home/pi/CubeSatSim/config -l -n + +fi + +if [[ $(grep '11.' /etc/debian_version) ]]; then + + BULLSEYE=1 + + echo "Debian 11 (Bullseye) detected" + + sudo cp /boot/config.txt /boot/config.txt.0 + + sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 + + sudo raspi-config nonint do_i2c 0 + + sudo raspi-config nonint do_camera 0 + + sudo raspi-config nonint do_legacy 0 + + sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt + + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt + + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then + echo "dtoverlay=i2c-gpio already in /boot/config.txt" + else + echo "adding dtoverlay=i2c-gpio to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt' + fi + + if [[ $(grep 'enable_uart=1' /boot/config.txt) ]]; then + echo "enable_uart=1 already in /boot/config.txt" + else + echo "adding enable_uart=1 to /boot/config.txt" + sudo sh -c 'echo "\nenable_uart=1" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=disable-bt' /boot/config.txt) ]]; then + echo "dtoverlay=disable-bt already in /boot/config.txt" + else + echo "adding dtoverlay=disable-bt to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then + echo "dtoverlay=dwc2 aalready in /boot/config.txt" + else + echo "adding dtoverlay=dwc2 to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + fi + + if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then + echo "modules-load=dwc2,g_ether already in /boot/cmdline.txt" + else + echo "adding modules-load=dwc2,g_ether to /boot/cmdline.txt" + sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt + fi + + if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then + echo "dtparam=audio=on already in /boot/config.txt" + else + echo "adding dtparam=audio=on to /boot/config.txt" + sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then + echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" + else + echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' + fi + + if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then + echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" + else + echo "adding overlay=pwm,pin=18,func=2 to /boot/config.txt" + sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' + fi + + if [[ $(grep 'disable_splash=1' /boot/config.txt) ]]; then + echo "disable_splash=1 already in /boot/config.txt" + else + echo "adding disable_splash=1 to /boot/config.txt" + sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' + fi + + if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then + echo "boot_delay=0 already in /boot/config.txt" + else + echo "adding boot_delay=0 to /boot/config.txt" + sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' + fi + + if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi + + sudo sh -c 'echo "\n" >> /boot/config.txt' + fi + +if [[ $(grep 'bookworm' /etc/os-release) ]]; then + + echo "Debian 12 (Bookworm) detected" + + sudo cp /boot/firmware/config.txt /boot/firmware/config.txt.0 + + sudo cp /boot/firmware/cmdline.txt /boot/firmware/cmdline.txt.0 + + sudo raspi-config nonint do_i2c 0 + + sudo raspi-config nonint do_camera 0 + + sudo raspi-config nonint do_legacy 0 + + sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt + + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + + sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt + + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=i2c-gpio to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'enable_uart=1' /boot/firmware/config.txt) ]]; then + echo "enable_uart=1 already in /boot/firmware/config.txt" + else + echo "adding enable_uart=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\nenable_uart=1" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=disable-bt' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=disable-bt already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=disable-bt to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=dwc2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=dwc2 aalready in /boot/firmware/config.txt" + else + echo "adding dtoverlay=dwc2 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'modules-load=dwc2,g_ether' /boot/firmware/cmdline.txt) ]]; then + echo "modules-load=dwc2,g_ether already in /boot/firmware/cmdline.txt" + else + echo "adding modules-load=dwc2,g_ether to /boot/firmware/cmdline.txt" + sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/firmware/cmdline.txt + fi + + if [[ $(grep 'dtparam=audio=on' /boot/firmware/config.txt) ]]; then + echo "dtparam=audio=on already in /boot/firmware/config.txt" + else + echo "adding dtparam=audio=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=audremap,enable_jack=on already in /boot/firmware/config.txt" + else + echo "adding dtoverlay=audremap,enable_jack=on to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/firmware/config.txt) ]]; then + echo "dtoverlay=pwm,pin=18,func=2 already in /boot/firmware/config.txt" + else + echo "adding to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'disable_splash=1' /boot/firmware/config.txt) ]]; then + echo "disable_splash=1 already in /boot/firmware/config.txt" + else + echo "adding disable_splash=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ndisable_splash=1" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'boot_delay=0' /boot/firmware/config.txt) ]]; then + echo "boot_delay=0 already in /boot/firmware/config.txt" + else + echo "adding boot_delay=0 to /boot/firmware/config.txt" + sudo sh -c 'echo "\nboot_delay=0" >> /boot/firmware/config.txt' + fi + + if [[ $(grep 'camera_auto_detect=1' /boot/firmware/config.txt) ]]; then + echo "camera_auto_detect=1 already in /boot/firmware/config.txt" + else + echo "adding camera_auto_detect=1 to /boot/firmware/config.txt" + sudo sh -c 'echo "\ncamera_auto_detect=1" >> /boot/firmware/config.txt' + fi + + if ! grep -q force_turbo=1 /boot/firmware/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/firmware/config.txt'; fi + + sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' + +elif [[ $(grep 'trixie' /etc/os-release) ]]; then + + echo "Trixie detected, installation continuing." + echo "Your Pi OS version is not Bookworm or Bullseye." + echo "The software installation will likely not work." + echo "See the README.md for how to install using Bookworm." + echo + + echo "Are you sure you want to continue the installation (y/n)?" + + read -r ANS + + if [ "$ANS" = "n" ]; then + exit 1 + fi +fi +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." + + changed=0 + value=`cat /home/pi/CubeSatSim/sim.cfg` + # echo "$value" + echo "$value" > /dev/null + set -- $value + + if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign + if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count + if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat + if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon + if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode + if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch + if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency + if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency + if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode + if [ -z "${10}" ] ; then m1="0" ; changed=1 ; else m1=${10} ; fi # rx pl code + if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code + if [ -z "${12}" ] ; then m3="no" ; changed=1 ; else m3=${12} ; fi # random fail + if [ -z "${13}" ] ; then m4="60" ; changed=1 ; else m4=${13} ; fi # random fail period + + if [ $changed -eq 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 -e "\nCubeSatSim configuration sim.cfg file updated to: \n" + echo + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4 + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4> /home/pi/CubeSatSim/sim.cfg + echo + fi + else echo "creating $FILE" - echo "AMSAT 1 0.0 0.0" > /home/pi/CubeSatSim/sim.cfg + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg +fi + +if [[ $(grep 'cubesatsim' /etc/motd) ]]; then + echo "motd already updated" +else + echo "updating motd" + sudo sh -c 'cat /home/pi/CubeSatSim/motd.txt >> /etc/motd' fi FILE=/home/pi/CubeSatSim/command_tx @@ -25,48 +325,87 @@ else echo "creating $FILE" echo "0\n" > /home/pi/CubeSatSim/command_count.txt fi + +sudo apt-get update && sudo apt-get dist-upgrade -y -cd +# if [ $BULLSEYE -eq 1 ]; then +# sudo apt purge -y python3-pip +# sudo apt install -y python3-pip +# fi -CubeSatSim/config -c -n +cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop -CubeSatSim/config -l -n +if [ ! -d "/home/pi/venv" ]; then -cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop - -sudo apt-get update && sudo apt-get dist-upgrade -y + cd + sudo apt install -y python3-venv + sudo python3 -m venv venv + source /home/pi/venv/bin/activate + + curl https://bootstrap.pypa.io/get-pip.py | sudo /home/pi/venv/bin/python3 + + sudo /home/pi/venv/bin/pip3 install adafruit_extended_bus + sudo /home/pi/venv/bin/pip3 install adafruit-circuitpython-ina219 + +fi +>>>>>>> 9518ba870ed4548fcaf00285b0578312a9a300c2 sudo apt-get remove pulseaudio -y +sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-client-dev libgpiod-dev raspi-config + # removed wiringpi and python-picamera python3-picamera sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom -cd /tmp +if [ ! -d "/home/pi/direwolf" ]; then -# wget https://project-downloads.drogon.net/wiringpi-latest.deb + cd + git clone https://github.com/alanbjohnston/direwolf.git + cd direwolf + make -j + sudo make install + make install-rpi +fi -# sudo dpkg -i wiringpi-latest.deb + sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps + sudo systemctl disable gpsd + sudo systemctl disable gpsd.socket + +if [ ! -d "/home/pi/WiringPi" ]; then + cd + git clone https://github.com/alanbjohnston/WiringPi + cd WiringPi + ./build debian + sudo dpkg -i debian-template/wiringpi-2.61-1.deb +fi cd -git clone https://github.com/alanbjohnston/WiringPi -cd WiringPi -./build debian +if [ ! $BULLSEYE -eq 1 ]; then + sudo apt install -y libtiff6 +fi -sudo dpkg -i debian-template/wiringpi-2.61-1.deb +sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev -cd +if [ $BULLSEYE -eq 1 ] || [ $UPDATE -eq 0 ] ; then -#changed to python3-smbus -sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 libtiff5 python3-pil python3-serial + sudo pip3 install --upgrade setuptools + + sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 -sudo pip3 install --upgrade setuptools +fi -sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 +cd /home/pi/CubeSatSim -cd ~/CubeSatSim +git pull --no-rebase > .updated -git pull --no-rebase +if [ $checkout -eq 1 ]; then + git checkout $branch + git pull --no-rebase > .updated + FLAG=1 + echo "Running update script again" + /home/pi/CubeSatSim/install +fi make debug @@ -80,7 +419,6 @@ fi cd -sudo apt-get install -y cmake git clone https://github.com/wb2osz/direwolf.git cd direwolf mkdir build @@ -92,39 +430,30 @@ make install-conf cd -git clone https://github.com/alanbjohnston/pi-power-button.git - -cd pi-power-button - -git checkout master +if [ ! -d "/home/pi/pi-power-button" ]; then -./script/install - - -cd - -git clone https://github.com/alanbjohnston/PiSSTVpp.git - -cd PiSSTVpp + cd + git clone https://github.com/alanbjohnston/pi-power-button.git + cd pi-power-button + git checkout master + ./script/install + sudo apt-get install -y libraspberrypi-dev -make pisstvpp +fi -echo "Copying SSTV image 1" -cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg +cd /home/pi/pi-power-button -echo "Copying SSTV image 2" -cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg +git pull --no-rebase > .updated_p +git checkout master +grep 'changed' /home/pi/pi-power-button/.updated_p +if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then + echo "updating pi-power-button." + script/install + FLAG=1 +fi cd -git clone https://github.com/alanbjohnston/rpitx.git - -cd rpitx - -./install.sh - -sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf - FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ ! -f "$FILE" ]; then cd @@ -198,154 +527,258 @@ sudo apt-get install default-jdk -y cd -sudo cp ~/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service - -sudo systemctl enable cubesatsim - -sudo cp ~/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - -# sudo systemctl enable transmit - -sudo cp ~/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - -sudo systemctl enable command +if [ ! -d "/home/pi/PiSSTVpp" ]; then -sudo cp ~/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo apt-get update -y + sudo apt-get install -y python-picamera python3-picamera build-essential libgd-dev libmagic-dev + cd + git clone https://github.com/alanbjohnston/PiSSTVpp.git + cd PiSSTVpp + make pisstvpp -sudo cp /boot/config.txt /boot/config.txt.0 - -sudo cp /boot/cmdline.txt /boot/cmdline.txt.0 +fi +if [ ! -d "/home/pi/rpitx" ]; then -sudo raspi-config nonint do_i2c 0 + cd + git clone https://github.com/alanbjohnston/rpitx.git + cd rpitx + ./install.sh + cd +else -sudo raspi-config nonint do_camera 0 + if [[ $(grep 'SYNCWITHPWM' /home/pi/rpitx/src/librpitx/src/fskburst.h) ]]; then + echo "rpitx library already updated" + else + echo "updating rpitx" + cd /home/pi/rpitx + git pull + ./update.sh + cd + fi +fi -sudo raspi-config nonint do_legacy 0 +FILE=/etc/systemd/system/cubesatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then + echo "changed cubesatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + FLAG=1 + else + echo "no changes to cubesatsim.service." + fi +else + echo "creating cubesatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service + sudo systemctl enable command -#if [ "$1" = "u" ]; then -#fi + FLAG=1 +fi -## sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - - sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt +FILE=/etc/systemd/system/rpitx.service +if [ -f "$FILE" ]; then + sudo systemctl disable rpitx + sudo rm /etc/systemd/system/rpitx.service +fi - #sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 - - sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt - - if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/config.txt) ]]; then - echo "dtoverlay=i2c-gpio already in /boot/config.txt" +FILE=/etc/systemd/system/transmit.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then + echo "changed transmit.service." + sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service + FLAG=1 else - echo "adding dtoverlay=i2c-gpio to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24" >> /boot/config.txt' + echo "no change to transmit.service." fi +else + echo "creating transmit.service." + sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service + FLAG=1 +fi - if [[ $(grep 'enable_uart=1' /boot/config.txt) ]]; then - echo "enable_uart=1 already in /boot/config.txt" - else - echo "adding enable_uart=1 to /boot/config.txt" - sudo sh -c 'echo "\nenable_uart=1" >> /boot/config.txt' - fi - - if [[ $(grep 'dtoverlay=disable-bt' /boot/config.txt) ]]; then - echo "dtoverlay=disable-bt already in /boot/config.txt" - else - echo "adding dtoverlay=disable-bt to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=disable-bt" >> /boot/config.txt' - fi - - if [[ $(grep 'dtoverlay=dwc2' /boot/config.txt) ]]; then - echo "dtoverlay=dwc2 aalready in /boot/config.txt" +FILE=/etc/systemd/system/command.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service) ]]; then + echo "changed command.service." + sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service + FLAG=1 else - echo "adding dtoverlay=dwc2 to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=dwc2" >> /boot/config.txt' + echo "no change to command.service." fi +else + echo "creating command.service." + sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service + sudo systemctl enable command + FLAG=1 +fi - if [[ $(grep 'modules-load=dwc2,g_ether' /boot/cmdline.txt) ]]; then - echo "modules-load=dwc2,g_ether already in /boot/cmdline.txt" - else - echo "adding modules-load=dwc2,g_ether to /boot/cmdline.txt" - sudo sed -i 's/ rootwait/ rootwait modules-load=dwc2,g_ether/g' /boot/cmdline.txt - fi - - if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then - echo "dtparam=audio=on already in /boot/config.txt" +FILE=/etc/systemd/system/pacsatsim.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then + echo "changed pacsatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + FLAG=1 else - echo "adding dtparam=audio=on to /boot/config.txt" - sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' + echo "no change to pacsatsim.service." fi +else + echo "creating pacsatsim.service." + sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service + sudo systemctl enable command + FLAG=1 +fi - if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then - echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" +FILE=/etc/asound.conf +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/asound.conf /etc/asound.conf) ]]; then + echo "changed /etc/asound.conf." + sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf + FLAG=1 else - echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' + echo "no change to /etc/asound.conf." fi +else + echo "creating /etc/asound.conf." + sudo cp /home/pi/CubeSatSim/asound.conf /etc/asound.conf + FLAG=1 +fi - if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then - echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' - fi +FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg +if [ ! -f "$FILE" ]; then + echo "Copying SSTV image 1." + cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg +fi + +FILE=/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg +if [ ! -f "$FILE" ]; then + echo "Copying SSTV image 2." + cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg +fi - if [[ $(grep 'disable_splash=1 ' /boot/config.txt) ]]; then - echo "disable_splash=1 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' - fi +sudo sed -i 's/DEVICES=""/DEVICES="\/dev\/serial0"/g' /etc/default/gpsd - if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then - echo "boot_delay=0 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' - fi +sudo sed -i 's/GPSD_OPTIONS=""/GPSD_OPTIONS="-s 9600"/g' /etc/default/gpsd - if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi - -sudo sh -c 'echo "\n" >> /boot/config.txt' - -changed=0 -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign -if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count -if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat -if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon -if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode -if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch -if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency -if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency -if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode -if [ -z "${10}" ] ; then n10="0" ; changed=1 ; else n10=${10} ; fi # rx pl code -if [ -z "${11}" ] ; then n11="0" ; changed=1 ; else n11=${11} ; fi # tx pl code - -if [ $changed -eq 1 ]; then - echo -e "Current sim.cfg configuration file:" - echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo -e "\nCubeSatSim configuraation sim.cfg file updated to: \n" - echo - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11 - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $n10 $n11 > /home/pi/CubeSatSim/sim.cfg - echo +if [ ! -d "/home/pi/fctelem" ]; then + echo "Installing fctelem binary v0.2 for FUNcube mode" + cd + mkdir /home/pi/fctelem + mkdir /home/pi/fctelem/public_html + cd fctelem + wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip + unzip -u fctelem.zip + FLAG=1 +elif [ ! -f "/home/pi/fctelem/v0.2" ]; then + echo "Updating fctelem binary to version v0.2 for FUNcube mode" + cd + cd /home/pi/fctelem + sudo mv fctelem fctelem.bk + sudo mv fcdecode.conf fcdecode.conf.bk + sudo mv fctelem.zip fctelem.zip.1 + wget https://github.com/alanbjohnston/go/releases/download/v0.2/fctelem.zip + unzip -u fctelem.zip + FLAG=1 fi -echo "Would you like to reboot to complete the installation (y/n)?" +if [ ! -f "/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/mpu6050" ]; then + echo "Installing MPU6050-C-CPP-Library-for-Raspberry-Pi" + sudo apt-get install -y libi2c-dev + cd + git clone https://github.com/alanbjohnston/MPU6050-C-CPP-Library-for-Raspberry-Pi.git + cd MPU6050-C-CPP-Library-for-Raspberry-Pi + sudo make install + make payload +fi + +cd /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi +git checkout master +git pull --no-rebase > .updated_p + +if [[ $(grep 'changed' /home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/.updated_p) ]]; then + echo "updating MPU6050-C-CPP-Library-for-Raspberry-Pi" + sudo make install + make payload +else + echo "nothing to do for MPU6050-C-CPP-Library-for-Raspberry-Pi." +fi + +if [ ! -f "/home/pi/raspberry-pi-bme280/bme280" ]; then + echo "Installing raspberry-pi-bme280" + sudo apt-get install -y libi2c-dev + cd + git clone https://github.com/alanbjohnston/raspberry-pi-bme280.git + cd raspberry-pi-bme280 + git checkout payload + make +fi -read -r ANS +cd /home/pi/raspberry-pi-bme280 +git checkout payload +git pull --no-rebase > .updated_p -if [ "$ANS" = "y" ]; then +if [[ $(grep 'changed' /home/pi/raspberry-pi-bme280/.updated_p) ]]; then - sudo reboot now + echo "updating raspberry-pi-bme280" + make else + echo "nothing to do for raspberry-pi-bme280." +fi + +if [ ! -f "/home/pi/fcdctl/fcdctl" ]; then + echo "Installing fcdctl to set FUNcubeDongle Pro gain" + sudo rm /var/lib/dpkg/info/python3-pip.list + sudo apt install python3-pip --reinstall + sudo apt-get install -y python3-smbus libusb-1.0 + cd + git clone https://github.com/csete/fcdctl.git + cd fcdctl + make fcdpp +fi - echo "The CubeSatSim software will start next time you reboot" +if [ ! -f "/home/pi/ssdv/ssdv" ]; then + cd + echo "Installing SSDV for FUNcube mode" + git clone https://github.com/alanbjohnston/ssdv.git # install ssdv for FUNcube images + cd ssdv + make +fi + +cd + +#echo "Would you like to reboot to complete the installation (y/n)?" + +#read -r ANS + +#if [ "$ANS" = "y" ]; then + +# sudo reboot now + +#else + + # echo "The CubeSatSim software will start next time you reboot" +#fi + +if [ "$noreboot" = "0" ] ; then + + if [ $FLAG -eq 1 ]; then + echo "systemctl daemon-reload and reboot" + sudo systemctl daemon-reload + sudo reboot -h now +# sudo cubesatsim + else + grep 'changed' /home/pi/CubeSatSim/.updated + if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then + echo "reboot due to code changes " | wall + sudo reboot -h now +# sudo cubesatsim + else + echo "nothing to do." + fi + fi +else + if [ $FLAG -eq 1 ]; then + echo "reboot needed for changes to take effect" | wall + fi fi From 9e0c897d60815b5287d44725fa285dc372eb4596 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:54:30 -0500 Subject: [PATCH 0686/1744] Update main.c resolve merge conflicts --- main.c | 2269 +++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 1594 insertions(+), 675 deletions(-) diff --git a/main.c b/main.c index e0fda7e1..bcb7d75d 100644 --- a/main.c +++ b/main.c @@ -18,17 +18,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - + #include "main.h" //#define HAB // uncomment to change APRS icon from Satellite to Balloon and only BAT telemetry int main(int argc, char * argv[]) { - printf("\n\nCubeSatSim v2.1 starting...\n\n"); + printf("\n\nCubeSatSim v2.2 starting...\n\n"); wiringPiSetup(); - + + strcpy(fail_yes, "no"); // Open configuration file with callsign and reset count FILE * config_file = fopen("/home/pi/CubeSatSim/sim.cfg", "r"); if (config_file == NULL) { @@ -41,11 +42,11 @@ int main(int argc, char * argv[]) { // char * cfg_buf[100]; - fscanf(config_file, "%s %d %f %f %s %d %s %s %s %d %d", - call, & reset_count, & lat_file, & long_file, sim_yes, & squelch, tx, rx, hab_yes, & rx_pl, & tx_pl); + fscanf(config_file, "%s %d %f %f %s %d %s %s %s %d %d %s %d", + call, &reset_count, &lat_file, &long_file, sim_yes, &squelch, tx, rx, hab_yes, &rx_pl, &tx_pl, fail_yes, &fail_time); fclose(config_file); - fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d\n", - call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl); + fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d %s %d\n", + call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time); fprintf(stderr, "Transmit on %s MHz Receive on %s MHz\n", tx, rx); @@ -79,13 +80,19 @@ int main(int argc, char * argv[]) { if (strcmp(sim_yes, "yes") == 0) { sim_mode = TRUE; - fprintf(stderr, "Sim mode is turned ON by configuration\n"); + fprintf(stderr, "Sim Mode is turned ON by configuration\n"); sim_config = TRUE; } if (strcmp(hab_yes, "yes") == 0) { hab_mode = TRUE; fprintf(stderr, "HAB mode is ON\n"); } + if (strcmp(fail_yes, "yes") == 0) { + fail_rnd_mode = TRUE; + fprintf(stderr, "Random fail mode is ON\n"); + failTime = 0; + srand((unsigned int)time(0)); + } FILE * command_file = fopen("/home/pi/CubeSatSim/command_control", "r"); if (command_file == NULL) { @@ -102,6 +109,25 @@ int main(int argc, char * argv[]) { } } printf("c2cStatus: %d \n", c2cStatus); + + printf("Test bus 1\n"); + fflush(stdout); + i2c_bus1 = (test_i2c_bus(1) != -1) ? 1 : OFF; + printf("Test bus 3\n"); + fflush(stdout); + i2c_bus3 = (test_i2c_bus(3) != -1) ? 3 : OFF; + printf("Finished testing\n"); + fflush(stdout); + + if (i2c_bus3 == OFF) { + printf("Sim Mode turned on automatically\n"); + sim_mode = TRUE; + FILE * sim_mode_auto = popen("touch /home/pi/CubeSatSim/sim_mode_auto", "r"); // store sim_mode_auto flag + pclose(sim_mode_auto); + } else { + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } char resbuffer[1000]; // const char testStr[] = "cat /proc/cpuinfo | grep 'Revision' | awk '{print $3}' | sed 's/^1000//' | grep '9000'"; @@ -121,21 +147,26 @@ int main(int argc, char * argv[]) { fgets(resbuffer, 1000, file2_test); fprintf(stderr, "Pi Zero 2 test result: %s\n", resbuffer); fclose(file2_test); - if (strlen(resbuffer) > 5) + if (strlen(resbuffer) > 5) { fprintf(stderr, "Pi Zero 2 detected\n"); + FILE * pi_zero2 = popen("touch /home/pi/CubeSatSim/pi_zero2", "r"); // store Pi Zero 2 flag + pclose(pi_zero2); + } else fprintf(stderr, "Not a Pi Zero or Pi Zero 2\n"); - pi_zero_2_offset = 500; - if (uptime_sec < 30.0) { - FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); - pclose(transmit_stop); + pi_zero_2_offset = 500; + if (uptime_sec < 30.0) { + FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); + pclose(transmit_stop); fprintf(stderr, "Sleep 5 sec\n"); - sleep(5); // try sleep at start to help boot + sleep(5); // try sleep at start to help boot } } else { fprintf(stderr,"Pi Zero detected\n"); + FILE * pi_zero2 = popen("sudo rm /home/pi/CubeSatSim/pi_zero2 &>/dev/null", "r"); // remove Pi Zero 2 flag if present + pclose(pi_zero2); if ((c2cStatus == DISABLED) || (c2cStatus == CARRIER)) { pi_zero_2_offset = 500; } @@ -156,15 +187,6 @@ int main(int argc, char * argv[]) { // FILE * file_deletes = popen("sudo rm /home/pi/CubeSatSim/ready /home/pi/CubeSatSim/cwready > /dev/null", "r"); // pclose(file_deletes); - - printf("Test bus 1\n"); - fflush(stdout); - i2c_bus1 = (test_i2c_bus(1) != -1) ? 1 : OFF; - printf("Test bus 3\n"); - fflush(stdout); - i2c_bus3 = (test_i2c_bus(3) != -1) ? 3 : OFF; - printf("Finished testing\n"); - fflush(stdout); // sleep(2); @@ -190,6 +212,9 @@ int main(int argc, char * argv[]) { } else if ( * argv[1] == 'm') { mode = CW; printf("Mode is CW\n"); + } else if ( * argv[1] == 'j') { + mode = FC; + printf("Mode is FUNcube\n"); } else { printf("Mode is BPSK\n"); } @@ -228,6 +253,9 @@ int main(int argc, char * argv[]) { } else if ( mode_string == 'm') { mode = CW; printf("Mode is CW\n"); + } else if ( mode_string == 'j') { + mode = FC; + printf("Mode is FUNcube\n"); } else if ( mode_string == 'e') { mode = REPEATER; printf("Mode is Repeater\n"); @@ -276,47 +304,10 @@ int main(int argc, char * argv[]) { /**/ fflush(stderr); - - if (mode == AFSK) - { - // Check for SPI and AX-5043 Digital Transceiver Board - FILE * file = popen("sudo raspi-config nonint get_spi", "r"); -// printf("getc: %c \n", fgetc(file)); - if (fgetc(file) == 48) { - printf("SPI is enabled!\n"); - - FILE * file2 = popen("ls /dev/spidev0.* 2>&1", "r"); - printf("Result getc: %c \n", getc(file2)); - - if (fgetc(file2) != 'l') { - printf("SPI devices present!\n"); - // } - - setSpiChannel(SPI_CHANNEL); - setSpiSpeed(SPI_SPEED); - initializeSpi(); - ax25_init( & hax25, (uint8_t * ) dest_addr, 11, (uint8_t * ) call, 11, AX25_PREAMBLE_LEN, AX25_POSTAMBLE_LEN); - if (init_rf()) { - printf("AX5043 successfully initialized!\n"); - ax5043 = TRUE; - cw_id = OFF; -// mode = AFSK; - // cycle = OFF; - printf("Mode AFSK with AX5043\n"); - transmit = TRUE; -// sleep(10); // just in case CW ID is sent - } else - printf("AX5043 not present!\n"); - pclose(file2); - } - } - pclose(file); - } - + txLed = 2; txLedOn = HIGH; txLedOff = LOW; - vB5 = TRUE; onLed = 27; onLedOn = HIGH; onLedOff = LOW; @@ -330,44 +321,52 @@ int main(int argc, char * argv[]) { } config_file = fopen("sim.cfg", "w"); - fprintf(config_file, "%s %d %8.4f %8.4f %s %d %s %s %s %d %d", call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl); + fprintf(config_file, "%s %d %8.4f %8.4f %s %d %s %s %s %d %d %s %d", + call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time); // fprintf(config_file, "%s %d", call, reset_count); fclose(config_file); config_file = fopen("sim.cfg", "r"); - if (vB4) { - map[BAT] = BAT2; - map[BAT2] = BAT; - snprintf(busStr, 10, "%d %d", i2c_bus1, test_i2c_bus(0)); - } else if (vB5) { - map[MINUS_X] = MINUS_Y; - map[PLUS_Z] = MINUS_X; - map[MINUS_Y] = PLUS_Z; + map[MINUS_X] = MINUS_Y; + map[PLUS_Z] = MINUS_X; + map[MINUS_Y] = PLUS_Z; - if (access("/dev/i2c-11", W_OK | R_OK) >= 0) { // Test if I2C Bus 11 is present + if (access("/dev/i2c-11", W_OK | R_OK) >= 0) { // Test if I2C Bus 11 is present printf("/dev/i2c-11 is present\n\n"); snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(11)); - } else { - snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); - } } else { - map[BAT2] = MINUS_Z; - map[BAT] = BAT2; - map[PLUS_Z] = BAT; - map[MINUS_Z] = PLUS_Z; - snprintf(busStr, 10, "%d %d", i2c_bus1, test_i2c_bus(0)); - voltageThreshold = 8.0; + snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); } - - // check for camera -// char cmdbuffer1[1000]; - FILE * file4 = popen("vcgencmd get_camera", "r"); - fgets(cmdbuffer, 1000, file4); - char camera_present[] = "supported=1 detected=1"; + + FILE * os_test = popen("cat /etc/os-release", "r"); + fgets(cmdbuffer, 1000, os_test); + printf("os-release: %s\n", cmdbuffer); + char os_present[] = "bookworm"; // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); - camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; - printf("Camera result:%s camera: %d \n", & cmdbuffer, camera); - pclose(file4); + int os_status = (strstr( (const char *)& cmdbuffer, os_present) != NULL) ? ON : OFF; + printf("os_status: %d\n", os_status); + pclose(os_test); + + // check for camera + FILE *cam_test; + if (os_status == ON) { // bookworm + cam_test = popen("sudo rpicam-hello --list-cameras | grep 'No cameras available!'", "r"); + fgets(cmdbuffer, 1000, cam_test); + char no_camera_present[] = "No cameras available!"; + // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); + camera = (strstr( (const char *)& cmdbuffer, no_camera_present) != NULL) ? OFF : ON; + } + else // bullseye + { + cam_test = popen("vcgencmd get_camera", "r"); + fgets(cmdbuffer, 1000, cam_test); + char camera_present[] = "supported=1 detected=1"; + // printf("strstr: %s \n", strstr( & cmdbuffer1, camera_present)); + camera = (strstr( (const char *)& cmdbuffer, camera_present) != NULL) ? ON : OFF; + } + + printf("Camera result: %s camera: %d \n", & cmdbuffer, camera); + pclose(cam_test); #ifdef DEBUG_LOGGING printf("INFO: I2C bus status 0: %d 1: %d 3: %d camera: %d\n", i2c_bus0, i2c_bus1, i2c_bus3, camera); @@ -377,68 +376,117 @@ int main(int argc, char * argv[]) { //file5 = popen("sudo rm /home/pi/CubeSatSim/camera_out.jpg.wav > /dev/null 2>&1", "r"); pclose(file5); - if (!ax5043) // don't test for payload if AX5043 is present - { + cmdbuffer[0] = '\0'; + gps_status = OFF; + FILE *gps_read = NULL; + if ((mode == AFSK) || (mode == CW) || (mode == SSTV)) + { + gps_read = sopen("python3 /home/pi/CubeSatSim/gps_client.py"); // python sensor polling function + + if (gps_read != NULL) { + fgets(cmdbuffer, 1000, gps_read); + fprintf(stderr, "gps read: %s\n", cmdbuffer); + if ((cmdbuffer[0] == '-') && (cmdbuffer[1] == '1')) + { + gps_status = OFF; + fprintf(stderr, "Pi GPS off\n"); + } else if ((cmdbuffer[0] == '1') || (cmdbuffer[0] == '2') || (cmdbuffer[0] == '3')) { + gps_status = ON; + fprintf(stderr, "Pi GPS on\n"); + } + fclose(gps_read); + } else + fprintf(stderr, "Error checking gps"); + } + payload = OFF; - fprintf(stderr,"Opening serial\n"); - if ((uart_fd = serialOpen("/dev/ttyAMA0", 115200)) >= 0) { // was 9600 - fprintf(stderr,"Serial opened to Pico\n"); -// payload = ON; - payload = get_payload_serial(FALSE); - fprintf(stderr,"Get_payload_status: %d \n", payload); // not debug - - } else { - fprintf(stderr, "Unable to open UART: %s\n -> Did you configure /boot/config.txt and /boot/cmdline.txt?\n", strerror(errno)); - } - } - if ((i2c_bus3 == OFF) || (sim_mode == TRUE)) { + if (gps_status == OFF) + { + fprintf(stderr,"Opening serial\n"); + if ((uart_fd = serialOpen("/dev/ttyAMA0", 115200)) >= 0) { // was 9600 + fprintf(stderr,"Serial opened to Pico\n"); + // payload = ON; + payload = get_payload_serial(FALSE); + fprintf(stderr,"Get_payload_status: %d \n", payload); // not debug + + if (sim_mode && payload && !sim_config) { + sim_mode = FALSE; + printf("Turning off Sim Mode since payload is present and Sim Mode not manually configured.\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } + } else { + fprintf(stderr, "Unable to open UART: %s\n -> Did you configure /boot/config.txt and /boot/cmdline.txt?\n", strerror(errno)); + } + } + else + { + payload = FALSE; + printf("get_payload_status not run since gps_status is ON\n"); + } + + sensor_setup(); - sim_mode = TRUE; - - fprintf(stderr, "Simulated telemetry mode!\n"); + if (sim_mode == TRUE) { + + fprintf(stderr, "Sim Mode is active\n"); srand((unsigned int)time(0)); - axis[0] = rnd_float(-0.2, 0.2); - if (axis[0] == 0) - axis[0] = rnd_float(-0.2, 0.2); - axis[1] = rnd_float(-0.2, 0.2); - axis[2] = (rnd_float(-0.2, 0.2) > 0) ? 1.0 : -1.0; + axis[X] = rnd_float(-0.2, 0.2); + if (axis[X] == 0) + axis[X] = rnd_float(-0.2, 0.2); + axis[Y] = rnd_float(-0.2, 0.2); + float axis_z; + axis_z = sqrt(1 - axis[X] * axis[X] - axis[Y] * axis[Y]); + axis[Z] = (rnd_float(-0.2, 0.2) > 0) ? axis_z : -1.0 * axis_z; - angle[0] = (float) atan(axis[1] / axis[2]); - angle[1] = (float) atan(axis[2] / axis[0]); - angle[2] = (float) atan(axis[1] / axis[0]); + angle[X] = (float) atan(axis[Y] / axis[Z]); + angle[Y] = (float) atan(axis[Z] / axis[X]); + angle[Z] = (float) atan(axis[Y] / axis[X]); - volts_max[0] = rnd_float(4.5, 5.5) * (float) sin(angle[1]); - volts_max[1] = rnd_float(4.5, 5.5) * (float) cos(angle[0]); - volts_max[2] = rnd_float(4.5, 5.5) * (float) cos(angle[1] - angle[0]); + volts_max[X] = rnd_float(9.0, 12.0) * (float) sin(angle[Y]); + volts_max[Y] = rnd_float(9.0, 12.0) * (float) cos(angle[X]); + volts_max[Z] = rnd_float(9.0, 12.0) * (float) cos(angle[Y] - angle[X]); - float amps_avg = rnd_float(150, 300); + float amps_avg = rnd_float(150, 750); - amps_max[0] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) sin(angle[1]); - amps_max[1] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[0]); - amps_max[2] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[1] - angle[0]); + amps_max[X] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) sin(angle[Y]); + amps_max[Y] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[X]); + amps_max[Z] = (amps_avg + rnd_float(-25.0, 25.0)) * (float) cos(angle[Y] - angle[X]); - batt = rnd_float(3.8, 4.3); + batt = rnd_float(3.8, 4.1); speed = rnd_float(1.0, 2.5); eclipse = (rnd_float(-1, +4) > 0) ? 1.0 : 0.0; + atmosphere = (rnd_float(-1, +1) > 0) ? 0.0 : 1.0; + +// eclipse = 1; period = rnd_float(150, 300); tempS = rnd_float(20, 55); temp_max = rnd_float(50, 70); temp_min = rnd_float(10, 20); - #ifdef DEBUG_LOGGING - for (int i = 0; i < 3; i++) +// #ifdef DEBUG_LOGGING + for (int i = X; i <= Z; i++) printf("axis: %f angle: %f v: %f i: %f \n", axis[i], angle[i], volts_max[i], amps_max[i]); - printf("batt: %f speed: %f eclipse_time: %f eclipse: %f period: %f temp: %f max: %f min: %f\n", batt, speed, eclipse_time, eclipse, period, tempS, temp_max, temp_min); - #endif + printf("batt: %f speed: %f eclipse_time: %f eclipse: %f period: %f temp: %f max: %f min: %f atmosphere: %f\n", + batt, speed, eclipse_time, eclipse, period, tempS, temp_max, temp_min, atmosphere); +// #endif time_start = (long int) millis(); eclipse_time = (long int)(millis() / 1000.0); if (eclipse == 0.0) eclipse_time -= period / 2; // if starting in eclipse, shorten interval + + tempP = rnd_float(80, 90); // simulated payload parameters + altSP = rnd_float(28000, 32000); + changeP = rnd_float(-10, 10); + presP = rnd_float(1014, 1016); + altGP = rnd_float(20,120); + humiP = rnd_float(40,60); + } // tx_freq_hz -= tx_channel * 50000; @@ -472,6 +520,7 @@ int main(int argc, char * argv[]) { bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); // } else if (mode == BPSK) { } else { + bitRate = 1200; rsFrames = 3; payloads = 6; @@ -506,16 +555,61 @@ int main(int argc, char * argv[]) { // printf(" %d", sin_map[j]); } printf("\n"); + + } else if (mode == FC) { // for now copy BPSK settings + bitRate = 1200; +// rsFrames = 3; +// payloads = 6; +// rsFrameLen = 159; + headerLen = 768; // 8; + dataLen = 5200; // 78; + syncBits = 32; // 31; + syncWord = 0x1acffc1d; // 0b1000111110011010010000101011101; +// parityLen = 32; + amplitude = 32767; + samples = S_RATE / bitRate; + // bufLen = (frameCnt * (syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen))) * samples); + bufLen = (headerLen + syncBits + dataLen)/8; + + // samplePeriod = ((float)((syncBits + 10 * (headerLen + rsFrames * (rsFrameLen + parityLen))))/(float)bitRate) * 1000 - 1800; + samplePeriod = 5000; + // samplePeriod = 3000; + // sleepTime = 3.0; + //samplePeriod = 2200; // reduce dut to python and sensor querying delays +// sleepTime = 2.2f; + +// frameTime = ((float)((float)bufLen / (samples * frameCnt * bitRate))) * 1000; // frame time in ms + frameTime = 5000; + + printf("\n FC Mode, bufLen: %d, %d bits per frame, %d bits per second, %d ms per frame %d ms sample period\n", + bufLen, bufLen / samples, bitRate, frameTime, samplePeriod); + + sin_samples = S_RATE/freq_Hz; + for (int j = 0; j < sin_samples; j++) { + sin_map[j] = (short int)(amplitude * sin((float)(2 * M_PI * j / sin_samples))); + + FILE * delete_image = popen("sudo rm /home/pi/CubeSatSim/image_file.bin", "r"); // delete any previous camera images + pclose(delete_image); + } + printf("\n"); } memset(voltage, 0, sizeof(voltage)); memset(current, 0, sizeof(current)); memset(sensor, 0, sizeof(sensor)); - memset(other, 0, sizeof(other)); + memset(other, 0, sizeof(other)); if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored - firstTime = 1; +// get_tlm_fox(); + } + else if (mode == FC) // && !sim_mode) + get_tlm_fc(); // fill transmit buffer with reset count 0 packets that will be ignored + else if (mode == CW) + get_tlm(); // generate a frame of telemetry right away + + if (firstTime == 0) + firstTime = 1; // if (!sim_mode) // always read sensors, even in sim mode { @@ -529,7 +623,7 @@ int main(int argc, char * argv[]) { file1 = sopen(pythonConfigStr); // python sensor polling function fgets(cmdbuffer, 1000, file1); - fprintf(stderr, "pythonStr result: %s\n", cmdbuffer); + fprintf(stderr, "pythonStr INA219 read result: %s\n", cmdbuffer); } for (int i = 0; i < 9; i++) { @@ -539,13 +633,13 @@ int main(int argc, char * argv[]) { current_max[i] = -1000.0; } for (int i = 0; i < SENSOR_FIELDS; i++) { - sensor_min[i] = 1000.0; - sensor_max[i] = -1000.0; + sensor_min[i] = 100000.0; + sensor_max[i] = -100000.0; // printf("Sensor min and max initialized!"); } for (int i = 0; i < 3; i++) { - other_min[i] = 1000.0; - other_max[i] = -1000.0; + other_min[i] = 100000.0; + other_max[i] = -100000.0; } loopTime = millis(); @@ -554,11 +648,13 @@ int main(int argc, char * argv[]) { fflush(stdout); fflush(stderr); // frames_sent++; +// if (!sim_mode) { + sensor_payload[0] = '\0'; + memset(sensor, 0, sizeof(sensor)); +// } - sensor_payload[0] = 0; memset(voltage, 0, sizeof(voltage)); memset(current, 0, sizeof(current)); - memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); FILE * uptime_file = fopen("/proc/uptime", "r"); @@ -571,12 +667,40 @@ int main(int argc, char * argv[]) { // #endif fclose(uptime_file); + if (fail_rnd_mode) { + if ((millis() - failTime) > fail_time * 1000) { + failureMode = rnd_float(1.0, 10.0); + printf("Simulated Random Failure Change to %d\n", failureMode); + FILE * failure_mode_file = fopen("/home/pi/CubeSatSim/failure_mode.txt", "w"); + fprintf(failure_mode_file, "%d", failureMode); + fclose(failure_mode_file); + failTime = loopTime; + } else + printf("No random failure change. millis: %ld failTime: %ld fail_time: %d\n", millis(), failTime, fail_time); + } +// else +// { +// failureMode = OFF; + FILE * failure_mode_file = fopen("/home/pi/CubeSatSim/failure_mode.txt", "r"); + if (failure_mode_file != NULL) { + char failure_string[10]; + if ( (fgets(failure_string, 10, failure_mode_file)) != NULL) { + failureMode = atoi(failure_string); + fclose(failure_mode_file); + printf("Failure mode: %d\n", failureMode); + } + } else { + failureMode = FAIL_NONE; + printf("No simulated failure.\n"); + } +// } + { int count1; char * token; fputc('\n', file1); fgets(cmdbuffer, 1000, file1); -// fprintf(stderr, "Python read Result: %s\n", cmdbuffer); + fprintf(stderr, "Python INA219 read Result: %s\n", cmdbuffer); // serialPuts(uart_fd, cmdbuffer); // write INA data to Pico over serial @@ -600,32 +724,61 @@ int main(int argc, char * argv[]) { token = strtok(NULL, space); } } - if (voltage[map[BAT]] == 0.0) - batteryVoltage = 4.5; - else { - batteryVoltage = voltage[map[BAT]]; - if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode - sim_mode = FALSE; - fprintf(stderr, "Turning off sim_mode since battery sensor is present\n"); + if (voltage[map[BAT]] == 0.0) // No BAT Board + if (voltage[map[BAT2]] == 0.0) // No BAT2 Board + batteryVoltage = 4.5; + else { + batteryVoltage = voltage[map[BAT2]]; // only BAT2 Board present + if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode + sim_mode = FALSE; + fprintf(stderr, "Turning off Sim Mode since battery sensor 2 is present\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } + } + else { + batteryVoltage = voltage[map[BAT]]; // BAT Board present + if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode + sim_mode = FALSE; + fprintf(stderr, "Turning off Sim Mode since battery sensor is present\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } } - } - batteryCurrent = current[map[BAT]]; - + batteryCurrent = current[map[BAT]] + current[map[BAT2]]; // Sum BAT and BAT2 currents } + + if (gps_status == OFF) + { + payload = get_payload_serial(FALSE); // not debug + printf("get_payload_status: %d \n", payload); + } + else + { + payload = FALSE; + printf("get_payload_status not run since gps_status is ON\n"); + } + + if (payload == FALSE) { + payload = pi_sensors(buffer2); + printf("pi_sensors status: %d \n", payload); + } -// if (payload == ON) { // moved to here - if (!ax5043) { -// if ((payload == ON) && (mode != BPSK)) { // moved to here -// STEMBoardFailure = 0; - payload = get_payload_serial(FALSE); - printf("get_payload_status: %d \n", payload); // not debug + if (sim_mode && payload && !sim_config) { + sim_mode = FALSE; + printf("Turning off Sim Mode since payload is present and Sim Mode not manually configured.\n"); + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + pclose(sim_mode_auto); + } + fflush(stdout); // printf("String: %s\n", buffer2); fflush(stdout); - strcpy(sensor_payload, buffer2); -// printf(" Response from STEM Payload board: %s\n", sensor_payload); + strcpy(sensor_payload, buffer2); + + printf(" Response from STEM Payload: %s\n", sensor_payload); - telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); + telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); // printf("Writing payload string\n"); time_t timeStamp; time(&timeStamp); // get timestamp @@ -634,17 +787,30 @@ int main(int argc, char * argv[]) { char timeStampNoNl[31], bat_string[31]; snprintf(timeStampNoNl, 30, "%.24s", ctime(&timeStamp)); // printf("TimeStamp: %s\n", timeStampNoNl); - +/* if (c2cStatus == DISABLED) snprintf(bat_string, 30, "BAT %4.2f %5.1f", batteryVoltage, batteryCurrent); else snprintf(bat_string, 30, "BAT %4.2f %5.1f C", batteryVoltage, batteryCurrent); - + */ + snprintf(bat_string, 30, "BAT %.2f %.1f", batteryVoltage, batteryCurrent); + if (c2cStatus != DISABLED) + strcat(bat_string," C"); + if (sim_mode || (failureMode != FAIL_NONE)) + strcat(bat_string," S"); fprintf(telem_file, "%s %s %s\n", timeStampNoNl, bat_string, sensor_payload); // write telemetry string to telem.txt file fclose(telem_file); - + + if (failureMode == FAIL_PAYLOAD) { + sensor_payload[0] = '\0'; // This will cause the payload to not be processed. + printf("Simulated Payload Failure.\n"); + } + +//// if (!sim_mode) { + { if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) // only process if valid payload response { +// printf("Valid Payload!\n"); int count1; char * token; @@ -654,14 +820,66 @@ int main(int argc, char * argv[]) { for (count1 = 0; count1 < SENSOR_FIELDS; count1++) { if (token != NULL) { sensor[count1] = (float) atof(token); + strcpy(sensor_string[count1], token); // #ifdef DEBUG_LOGGING // printf("sensor: %f ", sensor[count1]); // print sensor data +// printf("Sensor String %d is %s\n",count1, sensor_string[count1]); // #endif token = strtok(NULL, space); } } - printf("\n"); + if (gps_status == TRUE) { + fprintf(stderr, "Checking Pi gps\n"); + cmdbuffer[0] = '\0'; + gps_read = sopen("python3 /home/pi/CubeSatSim/gps_client.py"); // python sensor polling function + + if (gps_read != NULL) { +// fputc('\n', gps_read); + fgets(cmdbuffer, 1000, gps_read); + +// const char gpsTestStr[] = "2 32.3 -54 333\n"; +// strcpy(cmdbuffer, gpsTestStr); + + fprintf(stderr, "gps read: %s\n", cmdbuffer); + if ((cmdbuffer[0] == '2') || (cmdbuffer[0] == '3')) + { + printf("Valid gps data!\n"); +// printf("%x %x \n", cmdbuffer[strlen(cmdbuffer) - 2], cmdbuffer[strlen(cmdbuffer) - 1] ); + if (cmdbuffer[strlen(cmdbuffer) - 1] == '\n') + cmdbuffer[strlen(cmdbuffer) - 1] = '\0'; +// printf("%x %x \n", cmdbuffer[strlen(cmdbuffer) - 2], cmdbuffer[strlen(cmdbuffer) - 1] ); + + int count1; + char * token; + + const char space[2] = " "; + token = strtok(cmdbuffer, space); + // printf("token: %s\n", token); + for (count1 = GPS; count1 < (GPS + 4); count1++) { + if (token != NULL) { + sensor[count1] = (float) atof(token); + strcpy(sensor_string[count1], token); + // #ifdef DEBUG_LOGGING +// printf("sensor: %f ", sensor[count1]); // print sensor data +// printf("Sensor String %d is %s\n",count1, sensor_string[count1]); + // #endif + token = strtok(NULL, space); + } + } +// printf("\n"); + strcpy(sensor_string[GPS], "GPS"); + + } else { + fprintf(stderr, "No Pi gps available\n"); + } + fclose(gps_read); + } else + fprintf(stderr, "Error checking gps"); + + } + + printf("\n"); // if (sensor[GPS1] != 0) { if ((sensor[GPS1] > -90.0) && (sensor[GPS1] < 90.0) && (sensor[GPS1] != 0.0)) { if (sensor[GPS1] != latitude) { @@ -678,10 +896,11 @@ int main(int argc, char * argv[]) { newGpsTime = millis(); } } - } - else - ; //payload = OFF; // turn off since STEM Payload is not responding - } + } + } +// else +// ; //payload = OFF; // turn off since STEM Payload is not responding + if ((millis() - newGpsTime) > 60000) { longitude += rnd_float(-0.05, 0.05) / 100.0; // was .05 latitude += rnd_float(-0.05, 0.05) / 100.0; @@ -689,8 +908,130 @@ int main(int argc, char * argv[]) { // printf("GPS Location with Rnd: APRS %07.2f, %08.2f \n", toAprsFormat(latitude), toAprsFormat(longitude)); newGpsTime = millis(); } - + +// if (sim_mode && (failureMode != FAIL_PAYLOAD) && !payload) { + if (sim_mode && (failureMode != FAIL_PAYLOAD)) { + char str_tmp[10]; + printf("Generating simulated payload telemetry\n"); + if (atmosphere == 0) { + sensor[PRES] = 0; + strcpy(sensor_string[PRES], "0.0"); + altSP += changeP; + sensor[ALT] = altSP; + sprintf(str_tmp, "%5.0f", altSP); + strcpy(sensor_string[ALT], str_tmp); + printf("Alt: %s\n", sensor_string[ALT]); + sensor[HUMI] = 0; + strcpy(sensor_string[HUMI], "0.0"); + sensor[TEMP] = tempP - 80 * (1 - eclipse) + rnd_float(-0.7, 0.7); + sprintf(str_tmp, "%4.1f", sensor[TEMP]); + strcpy(sensor_string[TEMP], str_tmp); + printf("Temp: %s\n", sensor_string[TEMP]); + } else { + sensor[PRES] = presP + rnd_float(-1, 1); + sprintf(str_tmp, "%6.1f", presP); + strcpy(sensor_string[PRES], str_tmp); + printf("Pres: %s\n", sensor_string[PRES]); + sensor[ALT] = altGP; + sprintf(str_tmp, "%5.0f", altGP); + strcpy(sensor_string[ALT], str_tmp); + sensor[HUMI] = humiP + rnd_float(-1, 1); + sprintf(str_tmp, "%4.1f", sensor[HUMI]); + strcpy(sensor_string[HUMI], str_tmp); + sensor[TEMP] = tempS + rnd_float(-0.7, 0.7); + sprintf(str_tmp, "%4.1f",sensor[TEMP]); + strcpy(sensor_string[TEMP], str_tmp); + printf("Temp: %s\n", sensor_string[TEMP]); + } + char sensor_number[20]; + sensor[ACCEL_X] = axis[X]; + sprintf(sensor_number, "%.2f", axis[X]); + strcpy(sensor_string[ACCEL_X], sensor_number); + sensor[ACCEL_Y] = axis[Y]; + sprintf(sensor_number, "%.2f", axis[Y]); + strcpy(sensor_string[ACCEL_Y], sensor_number); + sensor[ACCEL_Z] = axis[Z]; + sprintf(sensor_number, "%.2f", axis[Z]); + strcpy(sensor_string[ACCEL_Z], sensor_number); + + float spin; + spin = rnd_float(-30.0, 30.0); + sensor[GYRO_X] = axis[X] * spin; + sprintf(sensor_number, "%.2f", sensor[GYRO_X]); + strcpy(sensor_string[GYRO_X], sensor_number); + sensor[GYRO_Y] = axis[Y] * spin; + sprintf(sensor_number, "%.2f", sensor[GYRO_Y]); + strcpy(sensor_string[GYRO_Y], sensor_number); + sensor[GYRO_Z] = axis[Z] * spin; + sprintf(sensor_number, "%.2f", sensor[GYRO_Z]); + strcpy(sensor_string[GYRO_Z], sensor_number); + + // printf("sim sensor: %s\n", sensor_string[GYRO_Z]); + printf("sim sensor spin: %f value: %f length: %d string: %s\n", spin, sensor[GYRO_Z], strlen(sensor_string[GYRO_Z]), sensor_string[GYRO_Z]); + } + + if (failureMode == FAIL_BME) { + sensor[TEMP] = 0.0; + strcpy(sensor_string[TEMP], "0.0"); + sensor[PRES] = 0.0; + strcpy(sensor_string[PRES], "0.0"); + sensor[HUMI] = 0.0; + strcpy(sensor_string[HUMI], "0.0"); + sensor[ALT] = 0.0; + strcpy(sensor_string[ALT], "0.0"); + printf("Simulated BME Failure!\n"); + } + + if (failureMode == FAIL_MPU) { + sensor[ACCEL_X] = 0.0; + strcpy(sensor_string[ACCEL_X], "0.0"); + sensor[ACCEL_Y] = 0.0; + strcpy(sensor_string[ACCEL_Y], "0.0"); + sensor[ACCEL_Z] = 0.0; + strcpy(sensor_string[ACCEL_Z], "0.0"); + sensor[GYRO_X] = 0.0; + strcpy(sensor_string[GYRO_X], "0.0"); + sensor[GYRO_Y] = 0.0; + strcpy(sensor_string[GYRO_Y], "0.0"); + sensor[GYRO_Z] = 0.0; + strcpy(sensor_string[GYRO_Z], "0.0"); + printf("Simulated MPU Failure!\n"); + } + +// if ((failureMode == FAIL_BME) || (failureMode == FAIL_MPU) || (sim_mode && (failureMode != FAIL_PAYLOAD))) // recreaate sensor_payload string + if (failureMode != FAIL_PAYLOAD) + { + sensor_payload[0] = '\0'; + strcpy(sensor_string[0], "OK"); + strcpy(sensor_string[1], "BME280"); + strcpy(sensor_string[6], "MPU6050"); + + for (count1 = 0; count1 < SENSOR_FIELDS; count1++) { + strcat(sensor_payload, sensor_string[count1]); + strcat(sensor_payload, " "); + } + printf("Updated Sensor String: %s\n", sensor_payload); + } +// else if (failureMode != FAIL_PAYLOAD) { +// printf("Restoring sensor_payload\n"); +// strcpy(sensor_payload, buffer2); // restore sensor_payload after strtok operation +// } + + char sensor_buffer[30]; + int sensor_count; + sensor_buffer[0] = 0; + sensor_count = sensor_loop(sensor_buffer); + if (sensor_count > NEW_SENSOR_FIELDS_MAX) + sensor_count = NEW_SENSOR_FIELDS_MAX; + if ((sensor_count > 0) && (failureMode != FAIL_PAYLOAD)) { + char space[] = " "; + strcat(sensor_payload, space); + strcat(sensor_payload, sensor_buffer); + printf(" Payload after new sensor read: %s\n", sensor_payload); + } + if ((sensor_payload[0] == 'O') && (sensor_payload[1] == 'K')) { +// printf("Valid Payload!!\n"); for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { if (sensor[count1] < sensor_min[count1]) sensor_min[count1] = sensor[count1]; @@ -719,7 +1060,7 @@ int main(int argc, char * argv[]) { double Yv = eclipse * volts_max[1] * (float) sin((2.0 * 3.14 * time / (46.0 * speed)) + (3.14 / 2.0)) + rnd_float(-0.2, 0.2); double Zv = 2.0 * eclipse * volts_max[2] * (float) sin((2.0 * 3.14 * time / (46.0 * speed)) + 3.14 + angle[2]) + rnd_float(-0.2, 0.2); - // printf("Yi: %f Zi: %f %f %f Zv: %f \n", Yi, Zi, amps_max[2], angle[2], Zv); + printf("Yi: %f Zi: %f %f %f Zv: %f \n", Yi, Zi, amps_max[2], angle[2], Zv); current[map[PLUS_X]] = (Xi >= 0) ? Xi : 0; current[map[MINUS_X]] = (Xi >= 0) ? 0 : ((-1.0f) * Xi); @@ -728,15 +1069,6 @@ int main(int argc, char * argv[]) { current[map[PLUS_Z]] = (Zi >= 0) ? Zi : 0; current[map[MINUS_Z]] = (Zi >= 0) ? 0 : ((-1.0f) * Zi); - voltage[map[PLUS_X]] = (Xv >= 1) ? Xv : rnd_float(0.9, 1.1); - voltage[map[MINUS_X]] = (Xv <= -1) ? ((-1.0f) * Xv) : rnd_float(0.9, 1.1); - voltage[map[PLUS_Y]] = (Yv >= 1) ? Yv : rnd_float(0.9, 1.1); - voltage[map[MINUS_Y]] = (Yv <= -1) ? ((-1.0f) * Yv) : rnd_float(0.9, 1.1); - voltage[map[PLUS_Z]] = (Zv >= 1) ? Zv : rnd_float(0.9, 1.1); - voltage[map[MINUS_Z]] = (Zv <= -1) ? ((-1.0f) * Zv) : rnd_float(0.9, 1.1); - - // printf("temp: %f Time: %f Eclipse: %d : %f %f | %f %f | %f %f\n",tempS, time, eclipse, voltage[map[PLUS_X]], voltage[map[MINUS_X]], voltage[map[PLUS_Y]], voltage[map[MINUS_Y]], current[map[PLUS_Z]], current[map[MINUS_Z]]); - tempS += (eclipse > 0) ? ((temp_max - tempS) / 50.0f) : ((temp_min - tempS) / 50.0f); tempS += +rnd_float(-1.0, 1.0); // IHUcpuTemp = (int)((tempS + rnd_float(-1.0, 1.0)) * 10 + 0.5); @@ -745,31 +1077,47 @@ int main(int argc, char * argv[]) { voltage[map[BAT2]] = 0.0; // rnd_float(5.0, 5.005); current[map[BAT2]] = 0.0; // rnd_float(158, 171); - // float charging = current[map[PLUS_X]] + current[map[MINUS_X]] + current[map[PLUS_Y]] + current[map[MINUS_Y]] + current[map[PLUS_Z]] + current[map[MINUS_Z]]; - float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0)); + float charging = current[map[PLUS_X]] + current[map[MINUS_X]] + current[map[PLUS_Y]] + current[map[MINUS_Y]] + current[map[PLUS_Z]] + current[map[MINUS_Z]]; +// float charging = eclipse * (fabs(amps_max[0] * 0.707) + fabs(amps_max[1] * 0.707) + rnd_float(-4.0, 4.0)); // current[map[BAT]] = ((current[map[BAT2]] * voltage[map[BAT2]]) / batt) - charging; current[map[BAT]] = rnd_float(320, 510) - charging; printf("charging: %f bat curr: %f bus curr: %f bat volt: %f bus volt: %f \n",charging, current[map[BAT]], current[map[BAT2]], batt, voltage[map[BAT2]]); - batt -= (batt > 3.5) ? current[map[BAT]] / 30000 : current[map[BAT]] / 3000; - if (batt < 3.0) { - batt = 3.0; + batt -= (batt > 3.5) ? current[map[BAT]] / 300000 : current[map[BAT]] / 30000; + if (batt < 3.6) { + batt = 3.6; SafeMode = 1; printf("Safe Mode!\n"); } else SafeMode= 0; - if (batt > 4.5) - batt = 4.5; + if (batt > 4.1) + batt = 4.1; voltage[map[BAT]] = batt + rnd_float(-0.01, 0.01); + + float Vm, Vp; + Vm = batt + 0.5; + Vp = (Xv > 0) ? Xv : rnd_float(0.0, 0.1); + voltage[map[PLUS_X]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Xv < 0) ? ((-1.0f) * Xv) : rnd_float(0.0, 0.1); + voltage[map[MINUS_X]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Yv > 0) ? Yv : rnd_float(0.0, 0.1); + voltage[map[PLUS_Y]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Yv < 0) ? ((-1.0f) * Yv) : rnd_float(0.0, 0.1); + voltage[map[MINUS_Y]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Zv > 0) ? Zv : rnd_float(0.0, 0.1); + voltage[map[PLUS_Z]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + Vp = (Zv < 0) ? ((-1.0f) * Zv) : rnd_float(0.0, 0.1); + voltage[map[MINUS_Z]] = (Vp >= Vm) ? (Vm + rnd_float(-0.1, 0.1)) : Vp; + + printf("temp: %f Time: %f Eclipse: %d : %f %f | %f %f | %f %f\n",tempS, time, eclipse, voltage[map[PLUS_X]], voltage[map[MINUS_X]], voltage[map[PLUS_Y]], voltage[map[MINUS_Y]], current[map[PLUS_Z]], current[map[MINUS_Z]]); // end of simulated telemetry - } - else { - } + } + FILE * cpuTempSensor = fopen("/sys/class/thermal/thermal_zone0/temp", "r"); if (cpuTempSensor) { // double cpuTemp; @@ -787,9 +1135,9 @@ int main(int argc, char * argv[]) { fclose(cpuTempSensor); } - #ifdef DEBUG_LOGGING -// fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold); - #endif +// #ifdef DEBUG_LOGGING + fprintf(stderr, "INFO: Battery voltage: %5.2f V Threshold %5.2f V Current: %6.1f mA Threshold: %6.1f mA\n", batteryVoltage, voltageThreshold, batteryCurrent, currentThreshold); +// #endif if ((batteryCurrent > currentThreshold) && (batteryVoltage < (voltageThreshold + 0.15)) && !sim_mode && !hab_mode) { @@ -834,22 +1182,7 @@ int main(int argc, char * argv[]) { sleep(10); } //#endif - - FILE * fp = fopen("/home/pi/CubeSatSim/telem_string.txt", "w"); - if (fp != NULL) { -// printf("Writing telem_string.txt\n"); - if (batteryVoltage != 4.5) - if (c2cStatus == DISABLED) - fprintf(fp, "BAT %4.2fV %4.0fmA\n", batteryVoltage, batteryCurrent); - else - fprintf(fp, "BAT %4.2fV %4.0fmA C\n", batteryVoltage, batteryCurrent); // show command and control is on - else - fprintf(fp, "\n"); // don't show voltage and current if it isn't a sensor value - - fclose(fp); - } else - printf("Error writing to telem_string.txt\n"); - + /**/ // sleep(1); // Delay 1 second ctr = 0; @@ -878,6 +1211,75 @@ int main(int argc, char * argv[]) { } } // printf("c2cStatus: %d \n", c2cStatus); + + if (failureMode == FAIL_NONE) + printf("No Simulated Failure!\n"); + if (failureMode == FAIL_UNPLUG) { + voltage[map[PLUS_Y]] = rnd_float(0.8, 0.95); + current[map[PLUS_Y]] = 0.0; + printf("+Y Solar Unplugged Failure\n"); + } + if (failureMode == FAIL_SOLAR) { + voltage[map[PLUS_X]] = 0.0; + current[map[PLUS_X]] = 0.0; + printf("+X Solar Simulated Failure\n"); + } + if (failureMode == FAIL_DEGRADE) { + voltage[map[MINUS_X]] = voltage[map[MINUS_X]] * 0.5; + current[map[MINUS_X]] = current[map[MINUS_X]] * 0.5; + printf("-X Solar Deg Simulated Failure\n"); + } + if (failureMode == FAIL_SHORT) { + voltage[map[MINUS_Y]] = 0.0; + printf("-Y Solar SC Simulated Failure!\n"); + } + if (failureMode == FAIL_I2C1) { + voltage[map[PLUS_X]] = 0.0; + current[map[PLUS_X]] = 0.0; + voltage[map[PLUS_Y]] = 0.0; + current[map[PLUS_Y]] = 0.0; + voltage[map[BAT]] = 0.0; + current[map[BAT]] = 0.0; + voltage[map[BAT2]] = 0.0; + current[map[BAT2]] = 0.0; + printf("I2C Bus 1 Simulated Failure!\n"); + } + if (failureMode == FAIL_I2C3) { + voltage[map[MINUS_X]] = 0.0; + current[map[MINUS_X]] = 0.0; + voltage[map[MINUS_Y]] = 0.0; + current[map[MINUS_Y]] = 0.0; + voltage[map[MINUS_Z]] = 0.0; + current[map[MINUS_Z]] = 0.0; + voltage[map[PLUS_Z]] = 0.0; + current[map[PLUS_Z]] = 0.0; + printf("I2C Bus 3 Simulated Failure!\n"); + } + + FILE * fp = fopen("/home/pi/CubeSatSim/telem_string.txt", "w"); + if (fp != NULL) { +// printf("Writing telem_string.txt v: %f v2: %f batteryVoltage: %f\n", voltage[map[BAT]], voltage[map[BAT2]], batteryVoltage); + if (sim_mode || (failureMode != FAIL_NONE)) { + if (voltage[map[BAT2]] == 0) + fprintf(fp, "BAT %.2f %.1f ", voltage[map[BAT]], current[map[BAT]]); + else + fprintf(fp, "BAT %.2f %.1f ", voltage[map[BAT2]], current[map[BAT]] + current[map[BAT2]]); + } + else { + fprintf(fp, "BAT %.2fV %.0fmA", batteryVoltage, batteryCurrent); + } + +// fprintf(fp, "BAT %.2fV %.0fmA", batteryVoltage, batteryCurrent); + + if (c2cStatus != DISABLED) + fprintf(fp," C"); + if (sim_mode || (failureMode != FAIL_NONE)) + fprintf(fp," S\n"); + else + fprintf(fp,"\n"); + fclose(fp); + } else + printf("Error writing to telem_string.txt\n"); if ((mode == AFSK) || (mode == CW)) { get_tlm(); @@ -890,7 +1292,9 @@ int main(int argc, char * argv[]) { } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK get_tlm_fox(); - } else { // SSTV or PACSATGND + } else if ((mode == FC)) { + get_tlm_fc(); + } else { // SSTV or PACSATGND // fprintf(stderr, "Sleeping\n"); sleep(30); } @@ -900,7 +1304,7 @@ int main(int argc, char * argv[]) { #endif } - if (mode == BPSK) { + if ((mode == BPSK) || (mode == FC)) { // digitalWrite(txLed, txLedOn); #ifdef DEBUG_LOGGING // printf("Tx LED On 1\n"); @@ -946,20 +1350,6 @@ int upper_digit(int number) { return digit; } -static int init_rf() { - int ret; - fprintf(stderr, "Initializing AX5043\n"); - - ret = ax5043_init( & hax5043, XTAL_FREQ_HZ, VCO_INTERNAL); - if (ret != PQWS_SUCCESS) { - fprintf(stderr, - "ERROR: Failed to initialize AX5043 with error code %d\n", ret); - // exit(EXIT_FAILURE); - return (0); - } - return (1); -} - void get_tlm(void) { FILE * txResult; @@ -1016,22 +1406,22 @@ void get_tlm(void) { char header_lat[10]; char header_long[10]; char header_str4[] = "hi hi de "; + char header_c2c[] = " C"; // char footer_str1[] = "\' > t.txt && echo \'"; char footer_str1[] = "\' > t.txt"; // char footer_str[] = "-11>APCSS:010101/hi hi ' >> t.txt && touch /home/pi/CubeSatSim/ready"; // transmit is done by transmit.py char footer_str[] = " && echo 'AMSAT-11>APCSS:010101/hi hi ' >> t.txt && touch /home/pi/CubeSatSim/ready"; // transmit is done by transmit.py char footer_str2[] = " && touch /home/pi/CubeSatSim/ready"; + char zero[] = "0.0"; - if (ax5043) { - strcpy(str, header_str); - } else { + strcpy(str, header_str3); // } if (mode == AFSK) { strcat(str, call); strcat(str, header_str2); } - } + // printf("Str: %s \n", str); if (mode != CW) { // sprintf(header_str2b, "=%7.2f%c%c%c%08.2f%cShi hi ",4003.79,'N',0x5c,0x5c,07534.33,'W'); // add APRS lat and long @@ -1044,9 +1434,6 @@ void get_tlm(void) { else sprintf(header_long, "%08.2f%c",toAprsFormat( longitude) * (-1.0), 'W'); // long - if (ax5043) - sprintf(header_str2b, "=%s%c%sShi hi ", header_lat, 0x5c, header_long); // add APRS lat and long - else //#ifdef HAB if (hab_mode) sprintf(header_str2b, "=%s%c%sOhi hi ", header_lat, 0x2f, header_long); // add APRS lat and long with Balloon HAB icon @@ -1059,7 +1446,13 @@ void get_tlm(void) { strcat(str, header_str2b); } else { // CW mode strcat(str, header_str4); - strcat(str, call); + strcat(str, call); + if (c2cStatus != DISABLED) { + strcat(str, " C"); + } + if (sim_mode || failureMode != FAIL_NONE) { + strcat(str, " S"); + } sprintf(tlm_str, "%s' > cw0.txt", &str); printf("CW string to execute: %s\n", &tlm_str); @@ -1086,21 +1479,35 @@ void get_tlm(void) { pclose(cw_file); } - if (c2cStatus != DISABLED) { - FILE *file_append = sopen("echo 'C' >> cw6.txt"); - fclose(file_append); - } +// if (c2cStatus != DISABLED) { +// FILE *file_append = sopen("echo 'C' >> cw6.txt"); +// fclose(file_append); +// } } else { // APRS - if (c2cStatus == 0) - sprintf(tlm_str, "BAT %4.2f %5.1f ", voltage[map[BAT]] , current[map[BAT]] ); - else - sprintf(tlm_str, "BAT %4.2f %5.1f C ", voltage[map[BAT]] , current[map[BAT]] ); - - strcat(str, tlm_str); + if (sim_mode || (failureMode != FAIL_NONE)) { + if (voltage[map[BAT2]] == 0) + snprintf(tlm_str, 30, "BAT %.2f %.1f ", voltage[map[BAT]], current[map[BAT]]); + else + snprintf(tlm_str, 30, "BAT %.2f %.1f ", voltage[map[BAT2]], current[map[BAT]] + current[map[BAT2]]); + + if (c2cStatus != DISABLED) + strcat(tlm_str,"C "); + + strcat(tlm_str,"S "); + } + else { + snprintf(tlm_str, 30, "BAT %.2f %.1f ", batteryVoltage, batteryCurrent); + + if (c2cStatus != DISABLED) + strcat(tlm_str,"C "); + } +// printf("tlm_str: %s\n", tlm_str); + strcat(str, tlm_str); } - strcpy(sensor_payload, buffer2); - printf(" Response from STEM Payload board:: %s\n", sensor_payload); + +// strcpy(sensor_payload, buffer2); + printf(" sensor_payload: %s\n", sensor_payload); // printf(" Str so far: %s\n", str); if (mode != CW) @@ -1124,30 +1531,7 @@ void get_tlm(void) { sleep(5); } } - else if (ax5043) { - digitalWrite(txLed, txLedOn); - fprintf(stderr, "INFO: Transmitting X.25 packet using AX5043\n"); - memcpy(data, str, strnlen(str, 256)); - printf("data: %s \n", data); - int ret = ax25_tx_frame( & hax25, & hax5043, data, strnlen(str, 256)); - if (ret) { - fprintf(stderr, - "ERROR: Failed to transmit AX.25 frame with error code %d\n", - ret); - exit(EXIT_FAILURE); - } - ax5043_wait_for_transmit(); - digitalWrite(txLed, txLedOff); - - if (ret) { - fprintf(stderr, - "ERROR: Failed to transmit entire AX.25 frame with error code %d\n", - ret); - exit(EXIT_FAILURE); - } - sleep(4); // was 2 - - } else { // APRS using transmit + else { // APRS using transmit strcat(str, footer_str1); // strcat(str, call); @@ -1156,7 +1540,7 @@ void get_tlm(void) { else strcat(str, footer_str2); - fprintf(stderr, "String to execute: %s\n", str); + fprintf(stderr, "APRS String to execute: %s\n", str); printf("\n\nTelemetry string is %s \n\n", str); @@ -1183,23 +1567,24 @@ void get_tlm(void) { // generates telemetry which is decoded by AMSAT's FoxTelem: https://www.amsat.org/foxtelem-software-for-windows-mac-linux/ // for more info about how we use FoxTelem see https://www.g0kla.com/foxtelem/amsat_telemetry_designers_handbook.pdf -void get_tlm_fox() { +void get_tlm_fox() { int i; long int sync = syncWord; + int cam = ON; - smaller = (int) (S_RATE / (2 * freq_Hz)); + smaller = (int)(S_RATE / (2 * freq_Hz)); // if (mode == PACSAT) // dataLen = 78; short int b[dataLen]; short int b_max[dataLen]; short int b_min[dataLen]; - + memset(b, 0, sizeof(b)); memset(b_max, 0, sizeof(b_max)); memset(b_min, 0, sizeof(b_min)); - + short int h[headerLen]; memset(h, 0, sizeof(h)); @@ -1216,124 +1601,128 @@ void get_tlm_fox() { int posXi = 0, negXi = 0, posYi = 0, negYi = 0, posZi = 0, negZi = 0; int head_offset = 0; + STEMBoardFailure = 1; + short int buffer_test[bufLen]; int buffSize; - buffSize = (int) sizeof(buffer_test); + buffSize = (int)sizeof(buffer_test); + + if (failureMode == FAIL_PAYLOAD) { + payload = OFF; + printf("Payload Simulated Failure!\n"); + } + if (failureMode == FAIL_CAMERA) { + cam = OFF; + printf("Camera Simulated Failure!\n"); + } + else { + cam = camera; + } + if (mode == FSK) id = 7; else - id = 0; // 99 in h[6] - - // for (int frames = 0; frames < FRAME_CNT; frames++) + id = 0; // 99 in h[6] + + // for (int frames = 0; frames < FRAME_CNT; frames++) for (int frames = 0; frames < frameCnt; frames++) { - - if (firstTime != ON) { + // if (firstTime != ON) { + if (TRUE) { // delay for sample period -/**/ -// while ((millis() - sampleTime) < (unsigned int)samplePeriod) - int startSleep = millis(); - if ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 500 for FSK -// sleep(2.0); // 0.5); // 25); // initial period - sleep(1.0); // 0.5); // 25); // initial period - while ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 - sleep(0.1); // 25); // 0.5); // 25); -// sleep((unsigned int)sleepTime); -/**/ + /**/ + // while ((millis() - sampleTime) < (unsigned int)samplePeriod) + int startSleep = millis(); + if ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 500 for FSK + // sleep(2.0); // 0.5); // 25); // initial period + sleep(1.0); // 0.5); // 25); // initial period + while ((millis() - sampleTime) < ((unsigned int)frameTime - 750 + pi_zero_2_offset)) // was 250 100 + sleep(0.1); // 25); // 0.5); // 25); + // sleep((unsigned int)sleepTime); + /**/ printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, (unsigned int)frameTime - 750 + pi_zero_2_offset); fflush(stdout); - - sampleTime = (unsigned int) millis(); + + sampleTime = (unsigned int)millis(); } else { printf("first time - no sleep\n"); firstTime = OFF; } - printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime)/1000.0); + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime) / 1000.0); fflush(stdout); - loopTime = millis(); - -// if (mode == FSK) + loopTime = millis(); + + // if (mode == FSK) { // just moved for (int count1 = 0; count1 < 8; count1++) { - if (voltage[count1] < voltage_min[count1]) - voltage_min[count1] = voltage[count1]; - if (current[count1] < current_min[count1]) - current_min[count1] = current[count1]; - - if (voltage[count1] > voltage_max[count1]) - voltage_max[count1] = voltage[count1]; - if (current[count1] > current_max[count1]) - current_max[count1] = current[count1]; + if (voltage[count1] < voltage_min[count1]) voltage_min[count1] = voltage[count1]; + if (current[count1] < current_min[count1]) current_min[count1] = current[count1]; -// printf("Vmin %4.2f Vmax %4.2f Imin %4.2f Imax %4.2f \n", voltage_min[count1], voltage_max[count1], current_min[count1], current_max[count1]); + if (voltage[count1] > voltage_max[count1]) voltage_max[count1] = voltage[count1]; + if (current[count1] > current_max[count1]) current_max[count1] = current[count1]; + + // printf("Vmin %4.2f Vmax %4.2f Imin %4.2f Imax %4.2f \n", voltage_min[count1], voltage_max[count1], current_min[count1], current_max[count1]); } - for (int count1 = 0; count1 < 3; count1++) { - if (other[count1] < other_min[count1]) - other_min[count1] = other[count1]; - if (other[count1] > other_max[count1]) - other_max[count1] = other[count1]; + for (int count1 = 0; count1 < 3; count1++) { + if (other[count1] < other_min[count1]) other_min[count1] = other[count1]; + if (other[count1] > other_max[count1]) other_max[count1] = other[count1]; // printf("Other min %f max %f \n", other_min[count1], other_max[count1]); } - if (mode == FSK) - { - if (loop % 32 == 0) { // was 8 -// printf("Sending MIN frame \n"); - frm_type = 0x03; - for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { - if (count1 < 3) - other[count1] = other_min[count1]; - if (count1 < 8) { - voltage[count1] = voltage_min[count1]; - current[count1] = current_min[count1]; - } - if (sensor_min[count1] != 1000.0) // make sure values are valid - sensor[count1] = sensor_min[count1]; - } - } - if ((loop + 16) % 32 == 0) { // was 8 -// printf("Sending MAX frame \n"); - frm_type = 0x02; - for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { - if (count1 < 3) - other[count1] = other_max[count1]; - if (count1 < 8) { - voltage[count1] = voltage_max[count1]; - current[count1] = current_max[count1]; - } - if (sensor_max[count1] != -1000.0) // make sure values are valid - sensor[count1] = sensor_max[count1]; - } - } - } - else - frm_type = 0x02; // BPSK always send MAX MIN frame - } + if (mode == FSK) { + if (loop % 32 == 0) { // was 8 + // printf("Sending MIN frame \n"); + frm_type = 0x03; + for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { + if (count1 < 3) other[count1] = other_min[count1]; + if (count1 < 8) { + voltage[count1] = voltage_min[count1]; + current[count1] = current_min[count1]; + } + if (sensor_min[count1] != 100000.0) // make sure values are valid + sensor[count1] = sensor_min[count1]; + } + } + if ((loop + 16) % 32 == 0) { // was 8 + // printf("Sending MAX frame \n"); + frm_type = 0x02; + for (int count1 = 0; count1 < SENSOR_FIELDS; count1++) { + if (count1 < 3) other[count1] = other_max[count1]; + if (count1 < 8) { + voltage[count1] = voltage_max[count1]; + current[count1] = current_max[count1]; + } + if (sensor_max[count1] != -100000.0) // make sure values are valid + sensor[count1] = sensor_max[count1]; + } + } + } else + frm_type = 0x02; // BPSK always send MAX MIN frame + } sensor_payload[0] = 0; // clear for next payload - -// if (mode == FSK) { // remove this -// } + + // if (mode == FSK) { // remove this + // } memset(rs_frame, 0, sizeof(rs_frame)); memset(parities, 0, sizeof(parities)); - h[0] = (short int) ((h[0] & 0xf8) | (id & 0x07)); // 3 bits - if (uptime != 0) // if uptime is 0, leave reset count at 0 + h[0] = (short int)((h[0] & 0xf8) | (id & 0x07)); // 3 bits + if (uptime != 0) // if uptime is 0, leave reset count at 0 { - h[0] = (short int) ((h[0] & 0x07) | ((reset_count & 0x1f) << 3)); - h[1] = (short int) ((reset_count >> 5) & 0xff); - h[2] = (short int) ((h[2] & 0xf8) | ((reset_count >> 13) & 0x07)); + h[0] = (short int)((h[0] & 0x07) | ((reset_count & 0x1f) << 3)); + h[1] = (short int)((reset_count >> 5) & 0xff); + h[2] = (short int)((h[2] & 0xf8) | ((reset_count >> 13) & 0x07)); } - h[2] = (short int) ((h[2] & 0x0e) | ((uptime & 0x1f) << 3)); - h[3] = (short int) ((uptime >> 5) & 0xff); - h[4] = (short int) ((uptime >> 13) & 0xff); - h[5] = (short int) ((h[5] & 0xf0) | ((uptime >> 21) & 0x0f)); - h[5] = (short int) ((h[5] & 0x0f) | (frm_type << 4)); + h[2] = (short int)((h[2] & 0x0e) | ((uptime & 0x1f) << 3)); + h[3] = (short int)((uptime >> 5) & 0xff); + h[4] = (short int)((uptime >> 13) & 0xff); + h[5] = (short int)((h[5] & 0xf0) | ((uptime >> 21) & 0x0f)); + h[5] = (short int)((h[5] & 0x0f) | (frm_type << 4)); - if (mode == BPSK) - h[6] = 99; + if (mode == BPSK) h[6] = 99; posXi = (int)(current[map[PLUS_X]] + 0.5) + 2048; posYi = (int)(current[map[PLUS_Y]] + 0.5) + 2048; @@ -1354,22 +1743,23 @@ void get_tlm_fox() { BAT2Voltage = (int)(voltage[map[BAT2]] * 100); BAT2Current = (int)(current[map[BAT2]] + 0.5) + 2048; - if (payload == ON) - STEMBoardFailure = 0; +// if (payload == ON) STEMBoardFailure = 0; + if ((payload == ON) || (sim_mode && (failureMode != FAIL_PAYLOAD))) + STEMBoardFailure = 0; // read payload sensor if available -// encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below -// encodeB(b, 1 + head_offset, batt_b_v); + // encodeA(b, 0 + head_offset, batt_a_v); // replaced by XS2 and XS3 below + // encodeB(b, 1 + head_offset, batt_b_v); encodeA(b, 3 + head_offset, batt_c_v); - encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel - encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel - encodeB(b, 7 + head_offset, (int)(sensor[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel + encodeB(b, 4 + head_offset, (int)(sensor[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel + encodeA(b, 6 + head_offset, (int)(sensor[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel + encodeB(b, 7 + head_offset, (int)(sensor[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel encodeA(b, 9 + head_offset, battCurr); - encodeB(b, 10 + head_offset, (int)(sensor[TEMP] * 10 + 0.5)); // Temp + encodeB(b, 10 + head_offset, (int)(sensor[TEMP] * 10 + 0.5)); // Temp if (mode == FSK) { encodeA(b, 12 + head_offset, posXv); @@ -1385,7 +1775,7 @@ void get_tlm_fox() { encodeB(b, 25 + head_offset, negYi); encodeA(b, 27 + head_offset, posZi); encodeB(b, 28 + head_offset, negZi); - } else // BPSK + } else // BPSK { encodeA(b, 12 + head_offset, posXv); encodeB(b, 13 + head_offset, posYv); @@ -1400,7 +1790,7 @@ void get_tlm_fox() { encodeB(b, 25 + head_offset, negXi); encodeA(b, 27 + head_offset, negYi); encodeB(b, 28 + head_offset, negZi); - + encodeA(b_max, 12 + head_offset, (int)(voltage_max[map[PLUS_X]] * 100)); encodeB(b_max, 13 + head_offset, (int)(voltage_max[map[PLUS_Y]] * 100)); encodeA(b_max, 15 + head_offset, (int)(voltage_max[map[PLUS_Z]] * 100)); @@ -1413,159 +1803,228 @@ void get_tlm_fox() { encodeA(b_max, 24 + head_offset, (int)(current_max[map[PLUS_Z]] + 0.5) + 2048); encodeB(b_max, 25 + head_offset, (int)(current_max[map[MINUS_X]] + 0.5) + 2048); encodeA(b_max, 27 + head_offset, (int)(current_max[map[MINUS_Y]] + 0.5) + 2048); - encodeB(b_max, 28 + head_offset, (int)(current_max[map[MINUS_Z]] + 0.5) + 2048); + encodeB(b_max, 28 + head_offset, (int)(current_max[map[MINUS_Z]] + 0.5) + 2048); encodeA(b_max, 9 + head_offset, (int)(current_max[map[BAT]] + 0.5) + 2048); encodeA(b_max, 3 + head_offset, (int)(voltage_max[map[BAT]] * 100)); encodeA(b_max, 30 + head_offset, (int)(voltage_max[map[BAT2]] * 100)); encodeB(b_max, 46 + head_offset, (int)(current_max[map[BAT2]] + 0.5) + 2048); - - encodeB(b_max, 37 + head_offset, (int)(other_max[RSSI] + 0.5) + 2048); + + encodeB(b_max, 37 + head_offset, (int)(other_max[RSSI] + 0.5) + 2048); encodeA(b_max, 39 + head_offset, (int)(other_max[IHU_TEMP] * 10 + 0.5)); encodeB(b_max, 31 + head_offset, ((int)(other_max[SPIN] * 10)) + 2048); - if (sensor_min[TEMP] != 1000.0) // make sure values are valid - { - encodeB(b_max, 4 + head_offset, (int)(sensor_max[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel - encodeA(b_max, 6 + head_offset, (int)(sensor_max[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel - encodeB(b_max, 7 + head_offset, (int)(sensor_max[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel - - encodeA(b_max, 33 + head_offset, (int)(sensor_max[PRES] + 0.5)); // Pressure - encodeB(b_max, 34 + head_offset, (int)(sensor_max[ALT] * 10.0 + 0.5)); // Altitude - encodeB(b_max, 40 + head_offset, (int)(sensor_max[GYRO_X] + 0.5) + 2048); - encodeA(b_max, 42 + head_offset, (int)(sensor_max[GYRO_Y] + 0.5) + 2048); - encodeB(b_max, 43 + head_offset, (int)(sensor_max[GYRO_Z] + 0.5) + 2048); - - encodeA(b_max, 48 + head_offset, (int)(sensor_max[DTEMP] * 10 + 0.5) + 2048); -// encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS1] * 10 + 0.5) + 2048); - encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5)); - encodeA(b_max, 45 + head_offset, (int)(sensor_max[HUMI] * 10 + 0.5)); - - encodeB(b_max, 49 + head_offset, (int)(sensor[XS1])); - encodeA(b_max, 0 + head_offset, (int)(sensor[XS2])); - encodeB(b_max, 1 + head_offset, (int)(sensor[XS3])); - } - else - { - encodeB(b_max, 4 + head_offset, 2048); // 0 - encodeA(b_max, 6 + head_offset, 2048); // 0 - encodeB(b_max, 7 + head_offset, 2048); // 0 - - encodeB(b_max, 40 + head_offset, 2048); - encodeA(b_max, 42 + head_offset, 2048); - encodeB(b_max, 43 + head_offset, 2048); - - encodeA(b_max, 48 + head_offset, 2048); -// encodeB(b_max, 49 + head_offset, 2048); - } - encodeA(b_min, 12 + head_offset, (int)(voltage_min[map[PLUS_X]] * 100)); - encodeB(b_min, 13 + head_offset, (int)(voltage_min[map[PLUS_Y]] * 100)); - encodeA(b_min, 15 + head_offset, (int)(voltage_min[map[PLUS_Z]] * 100)); - encodeB(b_min, 16 + head_offset, (int)(voltage_min[map[MINUS_X]] * 100)); - encodeA(b_min, 18 + head_offset, (int)(voltage_min[map[MINUS_Y]] * 100)); - encodeB(b_min, 19 + head_offset, (int)(voltage_min[map[MINUS_Z]] * 100)); + if (sensor_min[TEMP] != 100000.0) // make sure values are valid + { + encodeB(b_max, 4 + head_offset, (int)(sensor_max[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel + encodeA(b_max, 6 + head_offset, (int)(sensor_max[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel + encodeB(b_max, 7 + head_offset, (int)(sensor_max[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel + + encodeA(b_max, 33 + head_offset, (int)(sensor_max[PRES] + 0.5)); // Pressure + if (sensor_max[ALT] < 0) sensor_max[ALT] = 0.0; + encodeB(b_max, 34 + head_offset, (int)(sensor_max[ALT] / 10.0 + 0.5)); // Altitude + encodeB(b_max, 40 + head_offset, (int)(sensor_max[GYRO_X] + 0.5) + 2048); + encodeA(b_max, 42 + head_offset, (int)(sensor_max[GYRO_Y] + 0.5) + 2048); + encodeB(b_max, 43 + head_offset, (int)(sensor_max[GYRO_Z] + 0.5) + 2048); + + // encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS1] * 10 + 0.5) + 2048); + encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5)); + encodeA(b_max, 45 + head_offset, (int)(sensor_max[HUMI] * 10 + 0.5)); + if (failureMode != FAIL_PAYLOAD) { + encodeA(b_max, 48 + head_offset, (int)(sensor_max[DTEMP] * 10 + 0.5) + 2048); + encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS1])); + encodeA(b_max, 0 + head_offset, (int)(sensor_max[XS2])); + encodeB(b_max, 1 + head_offset, (int)(sensor_max[XS3])); + } + else { + encodeA(b_max, 48 + head_offset, 2048); + encodeB(b_max, 49 + head_offset, 0); + encodeA(b_max, 0 + head_offset, 0); + encodeB(b_max, 1 + head_offset, 0); + } + } else { + encodeB(b_max, 4 + head_offset, 2048); // 0 + encodeA(b_max, 6 + head_offset, 2048); // 0 + encodeB(b_max, 7 + head_offset, 2048); // 0 + + encodeB(b_max, 40 + head_offset, 2048); + encodeA(b_max, 42 + head_offset, 2048); + encodeB(b_max, 43 + head_offset, 2048); + + encodeA(b_max, 48 + head_offset, 2048); + // encodeB(b_max, 49 + head_offset, 2048); + } + encodeA(b_min, 12 + head_offset, (int)(voltage_min[map[PLUS_X]] * 100)); + encodeB(b_min, 13 + head_offset, (int)(voltage_min[map[PLUS_Y]] * 100)); + encodeA(b_min, 15 + head_offset, (int)(voltage_min[map[PLUS_Z]] * 100)); + encodeB(b_min, 16 + head_offset, (int)(voltage_min[map[MINUS_X]] * 100)); + encodeA(b_min, 18 + head_offset, (int)(voltage_min[map[MINUS_Y]] * 100)); + encodeB(b_min, 19 + head_offset, (int)(voltage_min[map[MINUS_Z]] * 100)); encodeA(b_min, 21 + head_offset, (int)(current_min[map[PLUS_X]] + 0.5) + 2048); encodeB(b_min, 22 + head_offset, (int)(current_min[map[PLUS_Y]] + 0.5) + 2048); encodeA(b_min, 24 + head_offset, (int)(current_min[map[PLUS_Z]] + 0.5) + 2048); encodeB(b_min, 25 + head_offset, (int)(current_min[map[MINUS_X]] + 0.5) + 2048); encodeA(b_min, 27 + head_offset, (int)(current_min[map[MINUS_Y]] + 0.5) + 2048); - encodeB(b_min, 28 + head_offset, (int)(current_min[map[MINUS_Z]] + 0.5) + 2048); - + encodeB(b_min, 28 + head_offset, (int)(current_min[map[MINUS_Z]] + 0.5) + 2048); + encodeA(b_min, 9 + head_offset, (int)(current_min[map[BAT]] + 0.5) + 2048); encodeA(b_min, 3 + head_offset, (int)(voltage_min[map[BAT]] * 100)); encodeA(b_min, 30 + head_offset, (int)(voltage_min[map[BAT2]] * 100)); encodeB(b_min, 46 + head_offset, (int)(current_min[map[BAT2]] + 0.5) + 2048); - + encodeB(b_min, 31 + head_offset, ((int)(other_min[SPIN] * 10)) + 2048); - encodeB(b_min, 37 + head_offset, (int)(other_min[RSSI] + 0.5) + 2048); + encodeB(b_min, 37 + head_offset, (int)(other_min[RSSI] + 0.5) + 2048); encodeA(b_min, 39 + head_offset, (int)(other_min[IHU_TEMP] * 10 + 0.5)); - - if (sensor_min[TEMP] != 1000.0) // make sure values are valid - { - encodeB(b_min, 4 + head_offset, (int)(sensor_min[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel - encodeA(b_min, 6 + head_offset, (int)(sensor_min[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel - encodeB(b_min, 7 + head_offset, (int)(sensor_min[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel - - encodeA(b_min, 33 + head_offset, (int)(sensor_min[PRES] + 0.5)); // Pressure - encodeB(b_min, 34 + head_offset, (int)(sensor_min[ALT] * 10.0 + 0.5)); // Altitude - encodeB(b_min, 40 + head_offset, (int)(sensor_min[GYRO_X] + 0.5) + 2048); - encodeA(b_min, 42 + head_offset, (int)(sensor_min[GYRO_Y] + 0.5) + 2048); - encodeB(b_min, 43 + head_offset, (int)(sensor_min[GYRO_Z] + 0.5) + 2048); - - encodeA(b_min, 48 + head_offset, (int)(sensor_min[DTEMP] * 10 + 0.5) + 2048); -// encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1] * 10 + 0.5) + 2048); - encodeB(b_min, 10 + head_offset, (int)(sensor_min[TEMP] * 10 + 0.5)); - encodeA(b_min, 45 + head_offset, (int)(sensor_min[HUMI] * 10 + 0.5)); - - encodeB(b_min, 49 + head_offset, (int)(sensor[XS1])); - encodeA(b_min, 0 + head_offset, (int)(sensor[XS2])); - encodeB(b_min, 1 + head_offset, (int)(sensor[XS3])); - } - else - { - encodeB(b_min, 4 + head_offset, 2048); // 0 - encodeA(b_min, 6 + head_offset, 2048); // 0 - encodeB(b_min, 7 + head_offset, 2048); // 0 - - encodeB(b_min, 40 + head_offset, 2048); - encodeA(b_min, 42 + head_offset, 2048); - encodeB(b_min, 43 + head_offset, 2048); - - encodeA(b_min, 48 + head_offset, 2048); -// encodeB(b_min, 49 + head_offset, 2048); - } - } + + if (sensor_min[TEMP] != 100000.0) // make sure values are valid + { + encodeB(b_min, 4 + head_offset, (int)(sensor_min[ACCEL_X] * 100 + 0.5) + 2048); // Xaccel + encodeA(b_min, 6 + head_offset, (int)(sensor_min[ACCEL_Y] * 100 + 0.5) + 2048); // Yaccel + encodeB(b_min, 7 + head_offset, (int)(sensor_min[ACCEL_Z] * 100 + 0.5) + 2048); // Zaccel + + encodeA(b_min, 33 + head_offset, (int)(sensor_min[PRES] + 0.5)); // Pressure + if (sensor_min[ALT] < 0) sensor_min[ALT] = 0.0; + encodeB(b_min, 34 + head_offset, (int)(sensor_min[ALT] / 10.0 + 0.5)); // Altitude + encodeB(b_min, 40 + head_offset, (int)(sensor_min[GYRO_X] + 0.5) + 2048); + encodeA(b_min, 42 + head_offset, (int)(sensor_min[GYRO_Y] + 0.5) + 2048); + encodeB(b_min, 43 + head_offset, (int)(sensor_min[GYRO_Z] + 0.5) + 2048); + + // encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1] * 10 + 0.5) + 2048); + encodeB(b_min, 10 + head_offset, (int)(sensor_min[TEMP] * 10 + 0.5)); + encodeA(b_min, 45 + head_offset, (int)(sensor_min[HUMI] * 10 + 0.5)); + + if (failureMode != FAIL_PAYLOAD) { + encodeA(b_min, 48 + head_offset, (int)(sensor_min[DTEMP] * 10 + 0.5) + 2048); + encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1])); + encodeA(b_min, 0 + head_offset, (int)(sensor_min[XS2])); + encodeB(b_min, 1 + head_offset, (int)(sensor_min[XS3])); + } + else { + encodeA(b_min, 48 + head_offset, 2048); + encodeB(b_min, 49 + head_offset, 0); + encodeA(b_min, 0 + head_offset, 0); + encodeB(b_min, 1 + head_offset, 0); + } + } else { + encodeB(b_min, 4 + head_offset, 2048); // 0 + encodeA(b_min, 6 + head_offset, 2048); // 0 + encodeB(b_min, 7 + head_offset, 2048); // 0 + + encodeB(b_min, 40 + head_offset, 2048); + encodeA(b_min, 42 + head_offset, 2048); + encodeB(b_min, 43 + head_offset, 2048); + + encodeA(b_min, 48 + head_offset, 2048); + // encodeB(b_min, 49 + head_offset, 2048); + } + } + encodeA(b, 30 + head_offset, BAT2Voltage); + + encodeB(b, 31 + head_offset, ((int)(other[SPIN] * 10)) + 2048); + + encodeA(b, 33 + head_offset, (int)(sensor[PRES] + 0.5)); // Pressure + if (sensor[ALT] < 0) sensor[ALT] = 0.0; + encodeB(b, 34 + head_offset, (int)(sensor[ALT] / 10.0 + 0.5)); // Altitude + encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1])); + encodeA(b_min, 0 + head_offset, (int)(sensor_min[XS2])); + encodeB(b_min, 1 + head_offset, (int)(sensor_min[XS3])); + // } + // else + // { + // encodeB(b_min, 4 + head_offset, 2048); // 0 + // encodeA(b_min, 6 + head_offset, 2048); // 0 + // encodeB(b_min, 7 + head_offset, 2048); // 0 + // + // encodeB(b_min, 40 + head_offset, 2048); + // encodeA(b_min, 42 + head_offset, 2048); + // encodeB(b_min, 43 + head_offset, 2048); + // + // encodeA(b_min, 48 + head_offset, 2048); + // // encodeB(b_min, 49 + head_offset, 2048); + // } + // + // } encodeA(b, 30 + head_offset, BAT2Voltage); encodeB(b, 31 + head_offset, ((int)(other[SPIN] * 10)) + 2048); - encodeA(b, 33 + head_offset, (int)(sensor[PRES] + 0.5)); // Pressure - encodeB(b, 34 + head_offset, (int)(sensor[ALT] * 10.0 + 0.5)); // Altitude + encodeA(b, 33 + head_offset, (int)(sensor[PRES] + 0.5)); // Pressure + if (sensor[ALT] < 0) sensor[ALT] = 0.0; + encodeB(b, 34 + head_offset, (int)(sensor[ALT] / 10.0 + 0.5)); // Altitude + encodeA(b, 45 + head_offset, (int)(sensor[HUMI] * 10 + 0.5)); // in place of sensor1 + encodeA(b, 39 + head_offset, (int)(other[TEMP] * 10 + 0.5)); encodeA(b, 36 + head_offset, Resets); encodeB(b, 37 + head_offset, (int)(other[RSSI] + 0.5) + 2048); - encodeA(b, 39 + head_offset, (int)(other[IHU_TEMP] * 10 + 0.5)); - encodeB(b, 40 + head_offset, (int)(sensor[GYRO_X] + 0.5) + 2048); encodeA(b, 42 + head_offset, (int)(sensor[GYRO_Y] + 0.5) + 2048); encodeB(b, 43 + head_offset, (int)(sensor[GYRO_Z] + 0.5) + 2048); - encodeA(b, 45 + head_offset, (int)(sensor[HUMI] * 10 + 0.5)); // in place of sensor1 + if (failureMode != FAIL_PAYLOAD) { + encodeA(b, 48 + head_offset, (int)(sensor[DTEMP] * 10 + 0.5) + 2048); + encodeB(b, 49 + head_offset, (int)(sensor[XS1])); + encodeA(b, 0 + head_offset, (int)(sensor[XS2])); + encodeB(b, 1 + head_offset, (int)(sensor[XS3])); + } + else { + encodeA(b, 48 + head_offset, 2048); + encodeB(b, 49 + head_offset, 0); + encodeA(b, 0 + head_offset, 0); + encodeB(b, 1 + head_offset, 0); + } encodeB(b, 46 + head_offset, BAT2Current); - encodeA(b, 48 + head_offset, (int)(sensor[DTEMP] * 10 + 0.5) + 2048); -// encodeB(b, 49 + head_offset, (int)(sensor[XS1] * 10 + 0.5) + 2048); - - encodeB(b, 49 + head_offset, (int)(sensor[XS1])); - encodeA(b, 0 + head_offset, (int)(sensor[XS2])); - encodeB(b, 1 + head_offset, (int)(sensor[XS3])); - - FILE * command_count_file = fopen("/home/pi/CubeSatSim/command_count.txt", "r"); - if (command_count_file != NULL) { - char count_string[10]; - if ( (fgets(count_string, 10, command_count_file)) != NULL) - groundCommandCount = atoi(count_string); -// fclose(command_count_file); - } else - printf("Error opening command_count.txt!\n"); + encodeA(b, 39 + head_offset, (int)(other[IHU_TEMP] * 10 + 0.5)); + + // encodeB(b, 49 + head_offset, (int)(sensor[XS1] * 10 + 0.5) + 2048); + + FILE* command_count_file = fopen("/home/pi/CubeSatSim/command_count.txt", "r"); + if (command_count_file != NULL) { + char count_string[10]; + if ((fgets(count_string, 10, command_count_file)) != NULL) + groundCommandCount = atoi(count_string); + else + printf("command_count.txt is invalid\n"); + // fclose(command_count_file); + } else + printf("Error opening command_count.txt!\n"); fclose(command_count_file); - -// printf("Command count: %d\n", groundCommandCount); - - int status = STEMBoardFailure + SafeMode * 2 + sim_mode * 4 + PayloadFailure1 * 8 + - (i2c_bus0 == OFF) * 16 + (i2c_bus1 == OFF) * 32 + (i2c_bus3 == OFF) * 64 + (camera == OFF) * 128 + groundCommandCount * 256; + + printf("Command count: %d\n", groundCommandCount); + int simulated; + simulated = sim_mode; + if (failureMode != FAIL_NONE) { + simulated = TRUE; + printf("Showing Simulated in FoxTelem\n"); + } + int i2c_1, i2c_3; + i2c_1 = i2c_bus1; + i2c_3 = i2c_bus3; + // printf("Bus1: %d Bus2: %d \n", i2c_1, i2c_3); + if (failureMode == FAIL_I2C1) { + i2c_1 = OFF; + // printf("I2C Bus 1 Simulated Failure\n"); + } else if (failureMode == FAIL_I2C3) { + i2c_3 = OFF; + // printf("I2C Bus 3 Simulated Failure\n"); + } + // int status = STEMBoardFailure + SafeMode * 2 + sim_mode * 4 + PayloadFailure1 * 8 + + // (i2c_bus0 == OFF) * 16 + (i2c_bus1 == OFF) * 32 + (i2c_bus3 == OFF) * 64 + (camera == OFF) * 128 + groundCommandCount * 256; + int status = STEMBoardFailure + SafeMode * 2 + simulated * 4 + PayloadFailure1 * 8 + (i2c_bus0 == OFF) * 16 + (i2c_1 == OFF) * 32 + (i2c_3 == OFF) * 64 + (cam == OFF) * 128 + groundCommandCount * 256; encodeA(b, 51 + head_offset, status); encodeB(b, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); - if ((mode == BPSK) || (mode == PACSAT)) { - encodeA(b_max, 51 + head_offset, status); + encodeA(b, 53 + head_offset, groundCommandCount); + + if ((mode == BPSK) || (mode == PACSAT)) { + encodeA(b_max, 51 + head_offset, status); encodeA(b_min, 51 + head_offset, status); encodeB(b_max, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); encodeB(b_min, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); } - + if (txAntennaDeployed == 0) { txAntennaDeployed = 1; printf("TX Antenna Deployed!\n"); @@ -1573,13 +2032,13 @@ void get_tlm_fox() { if (rxAntennaDeployed == 0) { rxAntennaDeployed = 1; printf("RX Antenna Deployed!\n"); - } - + } + if (mode == BPSK) { // wod field experiments unsigned long val = 0xffff; - encodeA(b, 64 + head_offset, 0xff & val); - encodeA(b, 65 + head_offset, val >> 8); - encodeA(b, 63 + head_offset, 0x00); + encodeA(b, 64 + head_offset, 0xff & val); + encodeA(b, 65 + head_offset, val >> 8); + encodeA(b, 63 + head_offset, 0x00); encodeA(b, 62 + head_offset, 0x01); encodeB(b, 74 + head_offset, 0xfff); } @@ -1612,6 +2071,7 @@ void get_tlm_fox() { else { // extra bracket for some reason? { + short int data10[headerLen + rsFrames * (rsFrameLen + parityLen)]; short int data8[headerLen + rsFrames * (rsFrameLen + parityLen)]; @@ -1619,7 +2079,7 @@ void get_tlm_fox() { int ctr3 = 0; for (i = 0; i < rsFrameLen; i++) { for (int j = 0; j < rsFrames; j++) { - if (!((i == (rsFrameLen - 1)) && (j == 2))) // skip last one for BPSK + if (!((i == (rsFrameLen - 1)) && (j == 2))) // skip last one for BPSK { if (ctr1 < headerLen) { rs_frame[j][i] = h[ctr1]; @@ -1628,30 +2088,23 @@ void get_tlm_fox() { data8[ctr1++] = rs_frame[j][i]; // printf ("data8[%d] = %x \n", ctr1 - 1, rs_frame[j][i]); } else { - if (mode == FSK) - { - rs_frame[j][i] = b[ctr3 % dataLen]; - update_rs(parities[j], b[ctr3 % dataLen]); - } else // BPSK - if ((int)(ctr3/dataLen) == 3) - { - rs_frame[j][i] = b_max[ctr3 % dataLen]; - update_rs(parities[j], b_max[ctr3 % dataLen]); - } - else if ((int)(ctr3/dataLen) == 4) - { - rs_frame[j][i] = b_min[ctr3 % dataLen]; - update_rs(parities[j], b_min[ctr3 % dataLen]); - } - else - { - rs_frame[j][i] = b[ctr3 % dataLen]; - update_rs(parities[j], b[ctr3 % dataLen]); - } - { - } - - // printf("%d rs_frame[%d][%d] = %x %d \n", + if (mode == FSK) { + rs_frame[j][i] = b[ctr3 % dataLen]; + update_rs(parities[j], b[ctr3 % dataLen]); + } else // BPSK + if ((int)(ctr3 / dataLen) == 3) { + rs_frame[j][i] = b_max[ctr3 % dataLen]; + update_rs(parities[j], b_max[ctr3 % dataLen]); + } else if ((int)(ctr3 / dataLen) == 4) { + rs_frame[j][i] = b_min[ctr3 % dataLen]; + update_rs(parities[j], b_min[ctr3 % dataLen]); + } else { + rs_frame[j][i] = b[ctr3 % dataLen]; + update_rs(parities[j], b[ctr3 % dataLen]); + } + {} + + // printf("%d rs_frame[%d][%d] = %x %d \n", // ctr1, j, i, b[ctr3 % DATA_LEN], ctr3 % DATA_LEN); data8[ctr1++] = rs_frame[j][i]; // printf ("data8[%d] = %x \n", ctr1 - 1, rs_frame[j][i]); @@ -1661,54 +2114,54 @@ void get_tlm_fox() { } } - #ifdef DEBUG_LOGGING - // printf("\nAt end of data8 write, %d ctr1 values written\n\n", ctr1); - /* - printf("Parities "); - for (int m = 0; m < parityLen; m++) { - printf("%d ", parities[0][m]); - } - printf("\n"); - */ - #endif - +#ifdef DEBUG_LOGGING +// printf("\nAt end of data8 write, %d ctr1 values written\n\n", ctr1); +/* + printf("Parities "); + for (int m = 0; m < parityLen; m++) { + printf("%d ", parities[0][m]); + } + printf("\n"); +*/ +#endif + int ctr2 = 0; memset(data10, 0, sizeof(data10)); - for (i = 0; i < dataLen * payloads + headerLen; i++) // 476 for BPSK + for (i = 0; i < dataLen * payloads + headerLen; i++) // 476 for BPSK { - data10[ctr2] = (Encode_8b10b[rd][((int) data8[ctr2])] & 0x3ff); - nrd = (Encode_8b10b[rd][((int) data8[ctr2])] >> 10) & 1; + data10[ctr2] = (Encode_8b10b[rd][((int)data8[ctr2])] & 0x3ff); + nrd = (Encode_8b10b[rd][((int)data8[ctr2])] >> 10) & 1; // printf ("data10[%d] = encoded data8[%d] = %x \n", - // ctr2, ctr2, data10[ctr2]); + // ctr2, ctr2, data10[ctr2]); - rd = nrd; // ^ nrd; + rd = nrd; // ^ nrd; ctr2++; } -// { - for (i = 0; i < parityLen; i++) { - for (int j = 0; j < rsFrames; j++) { - if ((uptime != 0) || (i != 0)) // don't correctly update parties if uptime is 0 so the frame will fail the FEC check and be discarded - data10[ctr2++] = (Encode_8b10b[rd][((int) parities[j][i])] & 0x3ff); - nrd = (Encode_8b10b[rd][((int) parities[j][i])] >> 10) & 1; + // { + for (i = 0; i < parityLen; i++) { + for (int j = 0; j < rsFrames; j++) { + if ((uptime != 0) || (i != 0)) // don't correctly update parties if uptime is 0 so the frame will fail the FEC check and be discarded + data10[ctr2++] = (Encode_8b10b[rd][((int)parities[j][i])] & 0x3ff); + nrd = (Encode_8b10b[rd][((int)parities[j][i])] >> 10) & 1; // printf ("data10[%d] = encoded parities[%d][%d] = %x \n", - // ctr2 - 1, j, i, data10[ctr2 - 1]); + // ctr2 - 1, j, i, data10[ctr2 - 1]); - rd = nrd; - } + rd = nrd; } - // } - #ifdef DEBUG_LOGGING - // printf("\nAt end of data10 write, %d ctr2 values written\n\n", ctr2); - #endif + } + // } +#ifdef DEBUG_LOGGING +// printf("\nAt end of data10 write, %d ctr2 values written\n\n", ctr2); +#endif int data; int val; - //int offset = 0; + // int offset = 0; - #ifdef DEBUG_LOGGING - // printf("\nAt start of buffer loop, syncBits %d samples %d ctr %d\n", syncBits, samples, ctr); - #endif +#ifdef DEBUG_LOGGING +// printf("\nAt start of buffer loop, syncBits %d samples %d ctr %d\n", syncBits, samples, ctr); +#endif for (i = 1; i <= syncBits * samples; i++) { write_wave(ctr, buffer); @@ -1718,7 +2171,7 @@ void get_tlm_fox() { val = sync; data = val & 1 << (bit - 1); // printf ("%d i: %d new frame %d sync bit %d = %d \n", - // ctr/SAMPLES, i, frames, bit, (data > 0) ); + // ctr/, i, frames, bit, (data > 0) ); if (mode == FSK) { phase = ((data != 0) * 2) - 1; // printf("Sending a %d\n", phase); @@ -1726,18 +2179,17 @@ void get_tlm_fox() { if (data == 0) { phase *= -1; if ((ctr - smaller) > 0) { - for (int j = 1; j <= smaller; j++) - buffer[ctr - j] = buffer[ctr - j] * 0.4; + for (int j = 1; j <= smaller; j++) buffer[ctr - j] = buffer[ctr - j] * 0.4; } flip_ctr = ctr; } } } } - #ifdef DEBUG_LOGGING - // printf("\n\nValue of ctr after header: %d Buffer Len: %d\n\n", ctr, buffSize); - #endif - for (i = 1; i <= (10 * (headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // 572 +#ifdef DEBUG_LOGGING +// printf("\n\nValue of ctr after header: %d Buffer Len: %d\n\n", ctr, buffSize); +#endif + for (i = 1; i <= (10 * (headerLen + dataLen * payloads + rsFrames * parityLen) * samples); i++) // 572 { write_wave(ctr, buffer); if ((i % samples) == 0) { @@ -1746,7 +2198,7 @@ void get_tlm_fox() { val = data10[symbol]; data = val & 1 << (bit - 1); // printf ("%d i: %d new frame %d data10[%d] = %x bit %d = %d \n", - // ctr/SAMPLES, i, frames, symbol, val, bit, (data > 0) ); + // ctr/, i, frames, symbol, val, bit, (data > 0) ); if (mode == FSK) { phase = ((data != 0) * 2) - 1; // printf("Sending a %d\n", phase); @@ -1754,8 +2206,7 @@ void get_tlm_fox() { if (data == 0) { phase *= -1; if ((ctr - smaller) > 0) { - for (int j = 1; j <= smaller; j++) - buffer[ctr - j] = buffer[ctr - j] * 0.4; + for (int j = 1; j <= smaller; j++) buffer[ctr - j] = buffer[ctr - j] * 0.4; } flip_ctr = ctr; } @@ -1763,53 +2214,29 @@ void get_tlm_fox() { } } } - #ifdef DEBUG_LOGGING - // printf("\nValue of ctr after looping: %d Buffer Len: %d\n", ctr, buffSize); - // printf("\ctr/samples = %d ctr/(samples*10) = %d\n\n", ctr/samples, ctr/(samples*10)); - #endif +#ifdef DEBUG_LOGGING +// printf("\nValue of ctr after looping: %d Buffer Len: %d\n", ctr, buffSize); +// printf("\ctr/samples = %d ctr/(samples*10) = %d\n\n", ctr/samples, ctr/(samples*10)); +#endif - int error = 0; - // int count; - // for (count = 0; count < dataLen; count++) { - // printf("%02X", b[count]); - // } - // printf("\n"); + // int error = 0; + // int count; + // for (count = 0; count < dataLen; count++) { + // printf("%02X", b[count]); + // } + // printf("\n"); // socket write - if (!socket_open && transmit) { - printf("Opening socket!\n"); - // struct sockaddr_in address; - // int valread; - struct sockaddr_in serv_addr; - // char *hello = "Hello from client"; - // char buffer[1024] = {0}; - if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { - printf("\n Socket creation error \n"); - error = 1; - } - - memset( & serv_addr, '0', sizeof(serv_addr)); - - serv_addr.sin_family = AF_INET; - serv_addr.sin_port = htons(PORT); - - // Convert IPv4 and IPv6 addresses from text to binary form - if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { - printf("\nInvalid address/ Address not supported \n"); - error = 1; - } - - if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { - printf("\nConnection Failed \n"); - printf("Error: %s\n", strerror(errno)); - error = 1; -// FILE * transmit_restartf2 = popen("sudo systemctl restart transmit", "r"); -// pclose(transmit_restartf2); -// sleep(10); // was 5 // sleep if socket connection refused - - // try again - error = 0; + socket_send(ctr); + /* + if (!socket_open && transmit) { + printf("Opening socket!\n"); + // struct sockaddr_in address; + // int valread; + struct sockaddr_in serv_addr; + // char *hello = "Hello from client"; + // char buffer[1024] = {0}; if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { printf("\n Socket creation error \n"); error = 1; @@ -1820,7 +2247,7 @@ void get_tlm_fox() { serv_addr.sin_family = AF_INET; serv_addr.sin_port = htons(PORT); - // Convert IPv4 and IPv6 addresses from text to binary form + // Convert IPv4 and IPv6 addresses from text to binary form if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { printf("\nInvalid address/ Address not supported \n"); error = 1; @@ -1830,89 +2257,109 @@ void get_tlm_fox() { printf("\nConnection Failed \n"); printf("Error: %s\n", strerror(errno)); error = 1; -// FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); -// pclose(transmit_restartf); -// sleep(10); // was 5 // sleep if socket connection refused - } - } - if (error == 1) { - printf("Socket error count: %d\n", error_count); -// ; //transmitStatus = -1; - if (error_count++ > 5) { - printf("Restarting transmit\n"); - FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); - pclose(transmit_restartf); - sleep(10); // was 5 // sleep if socket connection refused - } - } - else { - socket_open = 1; - error_count = 0; - } - } + // FILE * transmit_restartf2 = popen("sudo systemctl restart transmit", "r"); + // pclose(transmit_restartf2); + // sleep(10); // was 5 // sleep if socket connection refused + + // try again + error = 0; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + printf("\n Socket creation error \n"); + error = 1; + } - if (!error && transmit) { - // digitalWrite (0, LOW); - // printf("Sending %d buffer bytes over socket after %d ms!\n", ctr, (long unsigned int)millis() - start); - start = millis(); - int sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); -// printf("socket send 1 %d ms bytes: %d \n\n", (unsigned int)millis() - start, sock_ret); - fflush(stdout); - - if (sock_ret < (ctr * 2 + 2)) { - // printf("Not resending\n"); - sleep(0.5); - sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); -// printf("socket send 2 %d ms bytes: %d \n\n", millis() - start, sock_ret); - } - - loop_count++; - if ((firstTime == 1) || (((loop_count % 180) == 0) && (mode == FSK)) || (((loop_count % 80) == 0) && (mode == BPSK))) // do first time and was every 180 samples - { - int max; - if (mode == FSK) - if (sim_mode) - max = 6; - else if (firstTime == 1) - max = 4; // 5; // was 6 - else - max = 3; - else - if (firstTime == 1) - max = 5; // 5; // was 6 - else - max = 4; - - for (int times = 0; times < max; times++) - { - start = millis(); // send frame until buffer fills - sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); -// printf("socket send %d in %d ms bytes: %d \n\n",times + 2, (unsigned int)millis() - start, sock_ret); - - if ((millis() - start) > 500) { - printf("Buffer over filled!\n"); - break; - } + memset( & serv_addr, '0', sizeof(serv_addr)); - if (sock_ret < (ctr * 2 + 2)) { - // printf("Not resending\n"); - sleep(0.5); - sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); - printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); - } + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(PORT); + + // Convert IPv4 and IPv6 addresses from text to binary form + if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { + printf("\nInvalid address/ Address not supported \n"); + error = 1; + } + + if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { + printf("\nConnection Failed \n"); + printf("Error: %s\n", strerror(errno)); + error = 1; + // FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); + // pclose(transmit_restartf); + // sleep(10); // was 5 // sleep if socket connection refused + } + } + if (error == 1) { + printf("Socket error count: %d\n", error_count); + // ; //transmitStatus = -1; + if (error_count++ > 5) { + printf("Restarting transmit\n"); + FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); + pclose(transmit_restartf); + sleep(10); // was 5 // sleep if socket connection refused + } + } + else { + socket_open = 1; + error_count = 0; } - sampleTime = (unsigned int) millis(); // resetting time for sleeping - fflush(stdout); -// if (firstTime == 1) -// max -= 1; } - if (sock_ret == -1) { - printf("Error: %s \n", strerror(errno)); - socket_open = 0; - //transmitStatus = -1; + if (!error && transmit) { + // digitalWrite (0, LOW); + // printf("Sending %d buffer bytes over socket after %d ms!\n", ctr, (long unsigned int)millis() - start); + start = millis(); + int sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); + // printf("socket send 1 %d ms bytes: %d \n\n", (unsigned int)millis() - start, sock_ret); + fflush(stdout); + + if (sock_ret < (ctr * 2 + 2)) { + // printf("Not resending\n"); + sleep(0.5); + sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); + // printf("socket send 2 %d ms bytes: %d \n\n", millis() - start, sock_ret); + } + */ + + loop_count++; + if ((firstTime == 1) || (((loop_count % 180) == 0) && (mode == FSK)) || (((loop_count % 80) == 0) && (mode == BPSK))) // do first time and was every 180 samples + { + int max; + if (mode == FSK) + if (sim_mode) + max = 6; + else if (firstTime == 1) + max = 4; // 5; // was 6 + else + max = 3; + else if (firstTime == 1) + max = 5; // 5; // was 6 + else + max = 4; + + for (int times = 0; times < max; times++) { + /// start = millis(); // send frame until buffer fills + socket_send(ctr); + /// sock_ret = send(sock, buffer, (unsigned int)(ctr * 2 + 2), 0); + // printf("socket send %d in %d ms bytes: %d \n\n",times + 2, (unsigned int)millis() - start, sock_ret); + + /// if ((millis() - start) > 500) { + /// printf("Buffer over filled!\n"); + /// break; + /// } + + /// if (sock_ret < (ctr * 2 + 2)) { + // printf("Not resending\n"); + /// sleep(0.5); + /// sock_ret = send(sock, &buffer[sock_ret], (unsigned int)(ctr * 2 + 2 - sock_ret), 0); + /// printf("socket resend %d in %d ms bytes: %d \n\n",times, millis() - start, sock_ret); + /// } } + sampleTime = (unsigned int)millis(); // resetting time for sleeping + // fflush(stdout); + // if (firstTime == 1) + // max -= 1; } + if (socket_open == 1) firstTime = 0; // else if (frames_sent > 0) //5) @@ -1992,13 +2439,16 @@ void write_wave(int i, short int *buffer) } else { - if ((ctr - flip_ctr) < smaller) -// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); + if ((ctr - flip_ctr) < smaller) { +// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples] / 2); +// if (ctr < 1000) printf("*"); + } else -// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); buffer[ctr++] = (short int)(amplitude * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); - buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]); } -// printf("%d %d \n", i, buffer[ctr - 1]); +// buffer[ctr++] = (short int)(amplitude * 0.4 * phase * sin((float)(2*M_PI*i*freq_Hz/S_RATE))); + buffer[ctr++] = (short int)(phase * sin_map[ctr % sin_samples]); + } +// if (ctr < 1000) printf("%d %d %d \n", ctr, i, buffer[ctr - 1]); } @@ -2091,8 +2541,7 @@ int get_payload_serial(int debug_camera) { end_flag_detected = FALSE; jpeg_start = 0; - serialFlush (uart_fd); // flush serial buffer so latest payload is read - + serialFlush (uart_fd); // flush serial buffer so latest payload is read // #ifdef GET_IMAGE_DEBUG if (debug_camera) printf("Received from Payload:\n"); @@ -2302,3 +2751,473 @@ if (setting == ON) { } return; } + +void get_tlm_fc() { // FUNcube Mode telemetry generation + + printf("++++ Loop time: %5.3f sec +++++\n", (millis() - loopTime) / 1000.0); + fflush(stdout); + loopTime = millis(); + +//# define FC_EM +//#define JY_1 +#define FC_SIM + + /* create data, stream, and waveform buffers */ + + unsigned char source_bytes[256]; + int byte_count = 256; + + /* write telemetry into data buffer */ + +// printf("\nBLOCKSIZE = %d\n", BLOCKSIZE); +// printf("\nSYMPBLOCK = %d\n", SYMPBLOCK); + + memset(source_bytes, 0x00, sizeof(source_bytes)); +#ifdef FC_EM + source_bytes[0] = 0b00000001 ; // Sat Id is FUNcube-EM +#endif +#ifdef JY_1 +// source_bytes[0] = 0b11000001 ; // Sat Id is extended, Frame 2 (RT2 + WO2) + source_bytes[0] = 0xE0 | 0x20 | 0x00; // 1; // Sat Id is extended, Frame 34 (RT2 + IMG2) + + source_bytes[0] = source_bytes[0] | ( 0x01 & (uint8_t)(sequence % 2)); // alternate last bit for RT1, RT2. + + // source_bytes[1] = 0x08 ; // extended Nayify - works per code + source_bytes[1] = 0x10 ; // extended JY-1 - works, no documentation + + int extended = 1; +#endif +#ifdef FC_SIM +// source_bytes[0] = 0b11000001 ; // Sat Id is extended, Frame 2 (RT2 + WO2) + source_bytes[0] = 0xE0 | 0x20 | 0x00; // 1; // Sat Id is extended, Frame 34 (RT2 + IMG2) + + source_bytes[0] = source_bytes[0] | ( 0x01 & (uint8_t)(sequence % 2)); // alternate last bit for RT1, RT2. + + // source_bytes[1] = 0x08 ; // extended Nayify - works per code + source_bytes[1] = 0xfb ; // funcube sim sat id per AMSAT-UK allocation + int extended = 1; +#endif +#if defined(FC_SIM) || defined(JY_1) +// if (sequence > 10) { + if (image_file == NULL) { + image_file = fopen("/home/pi/CubeSatSim/image_file.bin", "r"); + image_id++; + printf("Opening file image_file.bin for image_id: %d\n", image_id); + } +// } + int pos = FC_PAYLOAD + extended; + int value; + if (image_file != NULL) { + printf("Writing image data to payload\n"); + while ((pos < 256) && ((value = getc(image_file)) != EOF)) { + source_bytes[pos++] = value; +// printf("%2x ", value); + } + if (value == EOF) { + image_file = NULL; + printf("End of file reached! Delete image_file.bin"); + FILE * delete_image = popen("sudo rm /home/pi/CubeSatSim/image_file.bin", "r"); + pclose(delete_image); + } + } + +#endif + +// printf("Volts: %f %f %f %f \n", voltage[map[BAT]], voltage[map[PLUS_X]] , voltage[map[PLUS_Y]], voltage[map[PLUS_Z]]); +// printf("AmpsPlus: %f %f %f %f \n", current[map[BAT]], current[map[PLUS_X]] , current[map[PLUS_Y]], current[map[PLUS_Z]]); +// printf("AmpsMinus: %f %f %f %f \n", current[map[BAT2]], current[map[MINUS_X]] , current[map[MINUS_Y]], current[map[MINUS_Z]]); + + float xmax = (voltage[map[PLUS_X]] > voltage[map[MINUS_X]]) ? voltage[map[PLUS_X]] : voltage[map[MINUS_X]]; + float ymax = (voltage[map[PLUS_Y]] > voltage[map[MINUS_Y]]) ? voltage[map[PLUS_Y]] : voltage[map[MINUS_Y]]; + float zmax = (voltage[map[PLUS_Z]] > voltage[map[MINUS_Z]]) ? voltage[map[PLUS_Z]] : voltage[map[MINUS_Z]]; + +// printf("Vmax: %f %f %f \n", xmax, ymax, zmax); + + uint16_t x = (uint16_t)(xmax * 1000) & 0x3fff; // 14 bits + uint16_t y = (uint16_t)(ymax * 1000) & 0x3fff; + uint16_t z = (uint16_t)(zmax * 1000) & 0x3fff; + uint16_t b = (uint16_t)(voltage[map[BAT]] * 1000) & 0x3fff; + + uint16_t ix = (uint16_t)((current[map[PLUS_X]] + current[map[MINUS_X]])) & 0x3ff; // 10 bits + uint16_t iy = (uint16_t)((current[map[PLUS_Y]] + current[map[MINUS_Y]])) & 0x3ff; + uint16_t iz = (uint16_t)((current[map[PLUS_Z]] + current[map[MINUS_Z]])) & 0x3ff; + + uint16_t ic = 0; + uint16_t ib = 0; + + if (current[map[BAT]] < 0 ) + ic = (uint16_t)(current[map[BAT]] * (-1)) & 0x3ff; // charging current + else + ib = (uint16_t)(current[map[BAT]]) & 0x3ff; // supplying current + +// printf("X %x Y %x Z %x B %x\n", x, y, z, b); +// printf("iX %x iY %x iZ %x iB %x iC\n", ix, iy, iz, ib, ic); + +#if defined(FC_SIM) || defined(JY_1) + source_bytes[extended + FC_EPS + 0] = 0xff & (x >> 6); // Vx + source_bytes[extended + FC_EPS + 1] = 0xfc & (x << 2); + source_bytes[extended + FC_EPS + 1] = source_bytes[extended + FC_EPS + 1] | (0x03 & (y >> 12)); + source_bytes[extended + FC_EPS + 2] = 0xff & (y >> 2); // Vy + source_bytes[extended + FC_EPS + 3] = 0xf0 & (y << 4); + + source_bytes[extended + FC_EPS + 3] = source_bytes[extended + FC_EPS + 3] | (0x0f & (z >> 10)); + source_bytes[extended + FC_EPS + 4] = 0xff & (z >> 2); // Vz + source_bytes[extended + FC_EPS + 5] = 0xc0 & (z << 6); + + source_bytes[extended + FC_EPS + 5] = source_bytes[extended + FC_EPS + 5] | (0x3f & (b >> 8)); + source_bytes[extended + FC_EPS + 6] = 0xff & (b >> 0); // Vb + + source_bytes[extended + FC_EPS + 7] = 0xff & (ix >> 2); // ix + source_bytes[extended + FC_EPS + 8] = 0xc0 & (iy << 6); // iy + + source_bytes[extended + FC_EPS + 8] = source_bytes[extended + FC_EPS + 8] | (0x3f & (iy >> 4)); + source_bytes[extended + FC_EPS + 9] = 0xf0 & (iy << 4); + + source_bytes[extended + FC_EPS + 9] = source_bytes[extended + FC_EPS + 9] | (0x0f & (iz >> 6)); + source_bytes[extended + FC_EPS + 10] = 0x3f & (iz << 2); // iz + + source_bytes[extended + FC_EPS + 10] = source_bytes[extended + FC_EPS + 10] | (0x03 & (ic >> 8)); + source_bytes[extended + FC_EPS + 11] = 0xff & (ic << 0); // ic battery charging curent + + source_bytes[extended + FC_EPS + 12] = 0xff & (ib >> 2); // ib battery discharging current + source_bytes[extended + FC_EPS + 13] = 0xc0 & (ib << 6); + + source_bytes[extended + FC_EPS + 13] = source_bytes[extended + FC_EPS + 13] | 0x3f & (((unsigned long int)reset_count) >> 2); + source_bytes[extended + FC_EPS + 14] = 0xff & (((unsigned long int)reset_count) << 6); // reset count + + uint8_t temp = (int)(other[IHU_TEMP] + 0.5); + + source_bytes[extended + FC_EPS + 17] = source_bytes[extended + FC_EPS + 17] | 0x3f & (temp >> 2); // cpu temp + source_bytes[extended + FC_EPS + 18] = 0xff & (temp << 6); + + source_bytes[extended + 48] = 0x0c; // Antenna 1 and 2 deployed + + source_bytes[extended + 49] = 0xff & ((unsigned long int)sequence >> 16); // sequence number + source_bytes[extended + 50] = 0xff & ((unsigned long int)sequence >> 8); + source_bytes[extended + 51] = 0xff & (unsigned long int)sequence++; + + uint16_t groundCommandCount = 0; + FILE * command_count_file = fopen("/home/pi/CubeSatSim/command_count.txt", "r"); + if (command_count_file != NULL) { + char count_string[10]; + if ( (fgets(count_string, 10, command_count_file)) != NULL) + groundCommandCount = (uint16_t) atoi(count_string); + else + printf("command_count.txt is invalid\n"); + } else + printf("Error opening command_count.txt!\n"); + fclose(command_count_file); + +// source_bytes[extended + 52] = 0xfc & (groundCommandCount << 2); // command doesn't work + + source_bytes[extended + 53] = 0x0f; // SW valid + source_bytes[extended + 54] = 0xe0; // SW valid + + if ((ix + iy + iz) < 4) + source_bytes[extended + 54] = source_bytes[extended + 54] | 0x10; // eclipse + if (SafeMode == 1) + source_bytes[extended + 54] = source_bytes[extended + 54] | 0x08; // safe mode +#endif + +#ifdef FC_EM + source_bytes[FC_EPS + 0] = 0xff & (((unsigned int)((voltage[map[PLUS_X]] + voltage[map[MINUS_X]]) * 1000) >> 8)); // mV + source_bytes[FC_EPS + 1] = 0xff & ((unsigned int)((voltage[map[PLUS_X]] + voltage[map[MINUS_X]]) * 1000)); + source_bytes[FC_EPS + 2] = 0xff & (((unsigned int)((voltage[map[PLUS_Y]] + voltage[map[MINUS_Y]]) * 1000) >> 8)); // mV + source_bytes[FC_EPS + 3] = 0xff & ((unsigned int)((voltage[map[PLUS_Y]] + voltage[map[MINUS_Y]]) * 1000)); + source_bytes[FC_EPS + 4] = 0xff & (((unsigned int)((voltage[map[PLUS_Z]] + voltage[map[MINUS_Z]]) * 1000) >> 8)); // mV + source_bytes[FC_EPS + 5] = 0xff & ((unsigned int)((voltage[map[PLUS_Z]] + voltage[map[MINUS_Z]]) * 1000)); + unsigned int total_solar_current = (unsigned int) (current[map[PLUS_X]] + current[map[MINUS_X]] + + current[map[PLUS_Y]] + current[map[MINUS_Y]] + + current[map[PLUS_Z]] + current[map[MINUS_Z]]); + source_bytes[FC_EPS + 6] = 0xff & total_solar_current >> 8; + source_bytes[FC_EPS + 7] = 0xff & total_solar_current; + source_bytes[FC_EPS + 8] = 0xff & (((unsigned int)(voltage[map[BAT]] * 1000) >> 8)); // mV + source_bytes[FC_EPS + 9] = 0xff & ((unsigned int)(voltage[map[BAT]] * 1000)); + source_bytes[FC_EPS + 10] = 0xff & (((unsigned int)(current[map[BAT]] * 1) >> 8)); // mA + source_bytes[FC_EPS + 11] = 0xff & ((unsigned int)(current[map[BAT]] * 1)); + source_bytes[FC_EPS + 12] = 0xff & (((unsigned long int)reset_count >> 8)); + source_bytes[FC_EPS + 13] = 0xff & ((unsigned long int)reset_count); + + source_bytes[FC_SW + 0] = 0xff & ((unsigned long int)sequence >> 16); // Sequence number + source_bytes[FC_SW + 1] = 0xff & ((unsigned long int)sequence >> 8); + source_bytes[FC_SW + 2] = 0xff & (unsigned long int)sequence++; + +#endif + +/**/ + printf("\nsource_bytes\n"); + for (int i=0; i<256; i++) + printf("%x ", source_bytes[i]); + printf("\n\n"); +/**/ + + /* convert data buffer into stream buffer */ + + const unsigned char* encoded_bytes = encode(source_bytes, byte_count); +/* + printf("\nencoded_bytes\n"); + for (int i=0; i<5200; i++) + printf("%d", encoded_bytes[i]); + printf("\n\n"); +*/ + /* convert to waveform buffer */ + + int data; + int val; + int i; + ctr = 0; + int symbol = 0; + smaller = (int) (S_RATE / (2 * freq_Hz)); +// printf("\n\nsmaller = %d \n\n",smaller); + + for (i = 1; i <= headerLen * samples; i++) { + write_wave(ctr, buffer); + if ((i % samples) == 0) { + phase *= -1; + if ((ctr - smaller) > 0) { + int j; + for (j = 1; j <= smaller; j++) { + buffer[ctr - j] = buffer[ctr - j] * 0.5; +// if (ctr < 1000) printf("# %d %d\n", ctr - j, buffer[ctr - j]); + } + } + flip_ctr = ctr; + } + } + + for (i = 1; i <= syncBits * samples; i++) { + write_wave(ctr, buffer); + // printf("%d ",ctr); + if ((i % samples) == 0) { + int bit = syncBits - i / samples + 1; + val = syncWord; + data = val & 1 << (bit - 1); +// printf ("--- %d i: %d sync bit %d = %d \n", +// ctr, i, bit, (data > 0) ); + if (data == 0) { + phase *= -1; + if ((ctr - smaller) > 0) { + int j; + for (j = 1; j <= smaller; j++) + buffer[ctr - j] = buffer[ctr - j] * 0.5; + } + flip_ctr = ctr; + } + } + } + + for (i = 1; i <= (dataLen * samples); i++) // 5200 + { + write_wave(ctr, buffer); + if ((i % samples) == 0) { + symbol = i / samples - 1; +// if (i < 100) printf("symbol = %d\n",symbol); + data = encoded_bytes[symbol]; + if (data == 0) { + phase *= -1; + if ((ctr - smaller) > 0) { + int j; + for (j = 1; j <= smaller; j++) { + buffer[ctr - j] = buffer[ctr - j] * 0.5; +// if (ctr < 1000) printf("# %d %d\n", ctr - j, buffer[ctr - j]); + } + } + flip_ctr = ctr; + } + } + } +// printf("symbol = %d\n",symbol); +// printf("\nctr = %d\n\n", ctr); + +// socket_send((((headerLen + syncBits + dataLen) * samples) * 2) + 2); + socket_send(ctr); + + if (!transmit) { + fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); + fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); + } + + int startSleep = millis(); + if ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(1.0); + while ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(0.1); + printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, millis() - sampleTime); + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); +} + +void socket_send(int length) { + + printf("Socket_send!\n"); + fflush(stdout); + int error = 0; + + if (!socket_open && transmit) { // open socket if not open + printf("Opening socket!\n"); + // struct sockaddr_in address; + // int valread; + struct sockaddr_in serv_addr; + // char *hello = "Hello from client"; + // char buffer[1024] = {0}; + // error_count = 0; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + printf("\n Socket creation error \n"); + error = 1; + } + + memset( & serv_addr, '0', sizeof(serv_addr)); + + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(PORT); + + // Convert IPv4 and IPv6 addresses from text to binary form + if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { + printf("\nInvalid address/ Address not supported \n"); + error = 1; + } + + if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { + printf("\nConnection Failed \n"); + printf("Error: %s\n", strerror(errno)); + fflush(stdout); + error = 1; + sleep(1); + + // try again + error = 0; + if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + printf("\n Socket creation error \n"); + error = 1; + } + + memset( & serv_addr, '0', sizeof(serv_addr)); + + serv_addr.sin_family = AF_INET; + serv_addr.sin_port = htons(PORT); + + // Convert IPv4 and IPv6 addresses from text to binary form + if (inet_pton(AF_INET, "127.0.0.1", & serv_addr.sin_addr) <= 0) { + printf("\nInvalid address/ Address not supported \n"); + error = 1; + } + + if (connect(sock, (struct sockaddr * ) & serv_addr, sizeof(serv_addr)) < 0) { + printf("\nConnection Failed \n"); + printf("Error: %s\n", strerror(errno)); + fflush(stdout); + error = 1; + sleep(1); + } + } + if (error == 1) { + printf("Socket error count: %d\n", error_count); +// ; //transmitStatus = -1; + if (error_count++ > 5) { + printf("Restarting transmit\n"); + fflush(stdout); + FILE * transmit_restartf = popen("sudo systemctl restart transmit", "r"); + pclose(transmit_restartf); + sleep(10); // was 5 // sleep if socket connection refused + } + } + else { + socket_open = 1; + error_count = 0; + } + } + +/* write waveform buffer over socket */ + +// int length = (((headerLen + syncBits + dataLen) * samples) * 2) + 2; // ctr * 2 + 2 like bpsk due to 2 bytes per sample. + length = length * 2 + 2; // convert from samples to bytes +// printf("length in bytes: %d\n", length); + + if (!error && transmit) { + // printf("Sending %d buffer bytes over socket after %d ms!\n", ctr, (long unsigned int)millis() - start); + start = millis(); + int sock_ret = send(sock, buffer, length, 0); + printf("socket send 1 %d ms bytes: %d \n\n", (unsigned int)millis() - start, sock_ret); + fflush(stdout); + + if (sock_ret < length) { + // printf("Not resending\n"); + sleep(0.5); + sock_ret = send(sock, &buffer[sock_ret], length - sock_ret, 0); +// printf("socket send 2 %d ms bytes: %d \n\n", millis() - start, sock_ret); + } + +// loop_count++; + + if (sock_ret == -1) { + printf("Error: %s \n", strerror(errno)); + socket_open = 0; + } + } + +/* + if (!transmit) { + fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); + fprintf(stderr, " See http://cubesatsim.org/wiki for info about building a CubeSatSim\n\n"); + } + + int startSleep = millis(); + if ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(1.0); + while ((millis() - sampleTime) < ((unsigned int)frameTime)) // - 750 + pi_zero_2_offset)) + sleep(0.1); + printf("Start sleep %d Sleep period: %d while period: %d\n", startSleep, millis() - startSleep, millis() - sampleTime); + sampleTime = (unsigned int) millis(); // resetting time for sleeping + fflush(stdout); + */ + + if (socket_open == 1) + firstTime = 0; +} + +int pi_sensors(char *buffer) +{ + char sensor_buffer[1000]; + FILE *sensor_read; + + strcpy(buffer, "OK BME280 "); + + sensor_read = sopen("/home/pi/raspberry-pi-bme280/bme280"); // read BME if present + fgets(sensor_buffer, 1000, sensor_read); + fprintf(stderr, "bme result: %s\n", sensor_buffer); + fclose(sensor_read); + if (sensor_buffer[strlen(sensor_buffer) - 1] == '\n') + sensor_buffer[strlen(sensor_buffer) - 1] = '\0'; // remove newline at end + strcat(buffer, sensor_buffer); + + strcat(buffer, " MPU6050 "); + + sensor_read = sopen("/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/mpu6050"); // read MPU if present + fgets(sensor_buffer, 1000, sensor_read); + fprintf(stderr, "mpu result: %s\n", sensor_buffer); + fclose(sensor_read); + if (sensor_buffer[strlen(sensor_buffer) - 1] == '\n') + sensor_buffer[strlen(sensor_buffer) - 1] = '\0'; // remove newline at end + strcat(buffer, sensor_buffer); + + fprintf(stderr, "pi_sensors string: %s\n", buffer); + + strcat(buffer, " GPS 0.0 0.0 0.0 TMP 0.0"); // place holders for GPS and diode temp +/* + strcat(buffer, " YPR "); + + sensor_read = sopen("/home/pi/MPU6050-C-CPP-Library-for-Raspberry-Pi/ypr"); // read MPU if present + fgets(sensor_buffer, 1000, sensor_read); + fprintf(stderr, "mpu result: %s\n", sensor_buffer); + fclose(sensor_read); + if (sensor_buffer[strlen(sensor_buffer) - 1] == '\n') + sensor_buffer[strlen(sensor_buffer) - 1] = '\0'; // remove newline at end + strcat(buffer, sensor_buffer); // no need to remove newline at end + + fprintf(stderr, "pi_sensors string: %s\n", buffer); +*/ + if (strncmp(buffer, "OK BME280 0.0 0.0 0.0 0.0 MPU6050 0.0 0.0 0.0 0.0 0.0 0.0 GPS 0.0 0.0 0.0", 57) == 0) + return (0); + else + return (1); +} From 876e1c011de49e6fcf5e18cfb9ca33dde2ba09ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 14:56:22 -0500 Subject: [PATCH 0687/1744] Update main.h resolve merge conflicts --- main.h | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 155 insertions(+), 14 deletions(-) diff --git a/main.h b/main.h index 068d45d6..dfa37b2e 100644 --- a/main.h +++ b/main.h @@ -13,6 +13,7 @@ #include #include //#include "TelemEncoding.h" +#include "codecAO40.h" #include #include #include @@ -38,26 +39,35 @@ #define PRES 3 #define ALT 4 #define HUMI 5 -#define GYRO_X 7 // MPU6050 is posisition 6 +#define GYRO_X 7 // MPU6050 label is posisition 6 #define GYRO_Y 8 #define GYRO_Z 9 #define ACCEL_X 10 #define ACCEL_Y 11 #define ACCEL_Z 12 -#define GPS1 14 // GPS is position 13 -#define GPS2 15 -#define GPS3 16 -#define DTEMP 18 // TMP is position 17 +#define GPS 13 // GPS label +#define GPS1 14 // latitude +#define GPS2 15 // longitude +#define GPS3 16 // altitude +#define DTEMP 18 // TMP label is position 17 #define XS1 20 // NEW user defined token will be position 19 #define XS2 21 #define XS3 22 -#define SENSOR_FIELDS 26 +#define NEW_SENSOR_FIELDS_MAX 6 +#define SENSOR_FIELDS (26 + 6) +#define FC_EPS 1 +#define FC_BOB 25 +#define FC_SW 50 +#define FC_PAYLOAD 55 +#define X 0 +#define Y 1 +#define Z 2 #define RSSI 0 #define IHU_TEMP 2 #define SPIN 1 -#define OFF - 1 +#define OFF -1 #define ON 1 #define CHECK 0 #define DISABLED 0 @@ -68,14 +78,12 @@ uint32_t tx_freq_hz = 434900000 + FREQUENCY_OFFSET; uint8_t data[1024]; uint32_t tx_channel = 0; -ax5043_conf_t hax5043; -ax25_conf_t hax25; - int twosToInt(int val, int len); float toAprsFormat(float input); float rnd_float(double min, double max); void get_tlm(); void get_tlm_fox(); +void get_tlm_fc(); int encodeA(short int * b, int index, int val); int encodeB(short int * b, int index, int val); void config_x25(); @@ -86,12 +94,16 @@ void update_rs(unsigned char parity[32], unsigned char c); void write_little_endian(unsigned int word, int num_bytes, FILE *wav_file); static int init_rf(); extern int Encode_8b10b[][256]; +extern const unsigned char ALPHA_TO[]; +// const unsigned char *CCodecAO40::encode(unsigned char *source_bytes, int byte_count); void program_radio(); +void socket_send(int length); int socket_open = 0; int sock = 0; int loop = -1, loop_count = 0; int firstTime = ON; // 0; +int secondTime = ON; long start; int testCount = 0; long time_start; @@ -100,6 +112,9 @@ FILE * file1; short int buffer[2336400]; // max size for 10 frames count of BPSK FILE *sopen(const char *program); FILE *telem_file; +long int sequence = 0; +int image_id = 0; +FILE *image_file; #define S_RATE (48000) // (44100) @@ -108,11 +123,28 @@ FILE *telem_file; #define BPSK 3 #define SSTV 4 #define CW 5 +#define FC 6 +#define REPEATER 7 #define PACSAT 8 #define REPEATER 11 #define TXCOMMAND 12 #define PACSATGND 13 +#define FAIL_COUNT 11 +#define FAIL_NONE -1 +#define FAIL_UNPLUG 1 +#define FAIL_SOLAR 2 +#define FAIL_DEGRADE 3 +#define FAIL_SHORT 4 +#define FAIL_I2C1 5 +#define FAIL_I2C3 6 +#define FAIL_CAMERA 7 +#define FAIL_PAYLOAD 8 +#define FAIL_BME 9 +#define FAIL_MPU 10 +#define FAIL_AUDIO 11 +int failureMode = FAIL_NONE; + int transmitStatus = -1; float amplitude; // = ; // 20000; // 32767/(10%amp+5%amp+100%amp) @@ -137,6 +169,8 @@ long int uptime; char call[5]; char sim_yes[10]; char hab_yes[10]; +char fail_yes[10]; +int fail_time = 60; int squelch = 3; // default squelch char rx[12], tx[12]; int tx_pl = 0; @@ -147,16 +181,16 @@ float sleepTime; unsigned int sampleTime = 0; int frames_sent = 0; int cw_id = ON; -int vB4 = FALSE, vB5 = FALSE, vB3 = FALSE, ax5043 = FALSE, transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF; +int transmit = FALSE, onLed, onLedOn, onLedOff, txLed, txLedOn, txLedOff, payload = OFF; // float voltageThreshold = 3.6, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100; -float voltageThreshold = 3.5, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100; +float voltageThreshold = 3.50, batteryVoltage = 4.5, batteryCurrent = 0, currentThreshold = 100; float latitude = 39.027702f, longitude = -77.078064f; float lat_file, long_file; double cpuTemp; int frameTime; long int newGpsTime; -float axis[3], angle[3], volts_max[3], amps_max[3], batt, speed, period, tempS, temp_max, temp_min, eclipse; +float axis[3], angle[3], volts_max[3], amps_max[3], batt, speed, period, tempS, temp_max, temp_min, eclipse, atmosphere, tempP, altSP, presP, altGP, humiP, changeP; int i2c_bus0 = OFF, i2c_bus1 = OFF, i2c_bus3 = OFF, camera = OFF, sim_mode = FALSE, SafeMode = FALSE; int rxAntennaDeployed = 0, txAntennaDeployed = 0, c2cStatus = 0; int sim_config = FALSE; // sim mode not set by configuration @@ -164,11 +198,12 @@ double eclipse_time; float voltage[9], current[9], sensor[SENSOR_FIELDS], other[3]; char sensor_payload[500]; +char sensor_string[SENSOR_FIELDS][32]; int test_i2c_bus(int bus); //const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/python/voltcurrent.py "; -const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/ina219.py "; +const char pythonCmd[] = "/home/pi/venv/bin/python3 -u /home/pi/CubeSatSim/ina219.py "; char pythonStr[100], pythonConfigStr[100], busStr[10]; int map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; char src_addr[5] = ""; @@ -200,8 +235,114 @@ int pi_zero_2_offset = 0; int hab_mode = FALSE; +int fail_rnd_mode = FALSE; int battery_saver_mode = FALSE; long int loopTime; +long int failTime = 0; +int gps_status = OFF; int error_count = 0; int groundCommandCount = 0; + + unsigned char m_RS_block[RSBLOCKS][NROOTS]; /* RS parity blocks */ + unsigned char m_encoded[SYMPBLOCK] ; /* encoded symbols */ + int m_encoded_bytes; /* Byte counter for encode_data() */ + int m_ileaver_index; /* Byte counter for interleaver */ + unsigned char m_conv_sr; /* Convolutional encoder shift register state */ + +void sensor_setup(); // defined in sensor_extension.c +int sensor_loop(char *sensor_buffer); // defined in sensor_extension.c +int pi_sensors(char *buffer); // used to read BME and MPU sensor if connected to Pi + +// from funcubeLib/common/fecConstants.h + +const unsigned char RS_poly[] = { + 249, 59, 66, 4, 43,126,251, 97, 30, 3,213, 50, 66,170, 5, 24 +}; + +/* Tables for RS decoder */ +/* Galois field log/antilog tables */ +const unsigned char ALPHA_TO[] = +{ + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x87, 0x89, 0x95, 0xad, 0xdd, 0x3d, 0x7a, 0xf4, + 0x6f, 0xde, 0x3b, 0x76, 0xec, 0x5f, 0xbe, 0xfb, 0x71, 0xe2, 0x43, 0x86, 0x8b, 0x91, 0xa5, 0xcd, + 0x1d, 0x3a, 0x74, 0xe8, 0x57, 0xae, 0xdb, 0x31, 0x62, 0xc4, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, 0x67, + 0xce, 0x1b, 0x36, 0x6c, 0xd8, 0x37, 0x6e, 0xdc, 0x3f, 0x7e, 0xfc, 0x7f, 0xfe, 0x7b, 0xf6, 0x6b, + 0xd6, 0x2b, 0x56, 0xac, 0xdf, 0x39, 0x72, 0xe4, 0x4f, 0x9e, 0xbb, 0xf1, 0x65, 0xca, 0x13, 0x26, + 0x4c, 0x98, 0xb7, 0xe9, 0x55, 0xaa, 0xd3, 0x21, 0x42, 0x84, 0x8f, 0x99, 0xb5, 0xed, 0x5d, 0xba, + 0xf3, 0x61, 0xc2, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, + 0x47, 0x8e, 0x9b, 0xb1, 0xe5, 0x4d, 0x9a, 0xb3, 0xe1, 0x45, 0x8a, 0x93, 0xa1, 0xc5, 0x0d, 0x1a, + 0x34, 0x68, 0xd0, 0x27, 0x4e, 0x9c, 0xbf, 0xf9, 0x75, 0xea, 0x53, 0xa6, 0xcb, 0x11, 0x22, 0x44, + 0x88, 0x97, 0xa9, 0xd5, 0x2d, 0x5a, 0xb4, 0xef, 0x59, 0xb2, 0xe3, 0x41, 0x82, 0x83, 0x81, 0x85, + 0x8d, 0x9d, 0xbd, 0xfd, 0x7d, 0xfa, 0x73, 0xe6, 0x4b, 0x96, 0xab, 0xd1, 0x25, 0x4a, 0x94, 0xaf, + 0xd9, 0x35, 0x6a, 0xd4, 0x2f, 0x5e, 0xbc, 0xff, 0x79, 0xf2, 0x63, 0xc6, 0x0b, 0x16, 0x2c, 0x58, + 0xb0, 0xe7, 0x49, 0x92, 0xa3, 0xc1, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0xc7, 0x09, 0x12, 0x24, + 0x48, 0x90, 0xa7, 0xc9, 0x15, 0x2a, 0x54, 0xa8, 0xd7, 0x29, 0x52, 0xa4, 0xcf, 0x19, 0x32, 0x64, + 0xc8, 0x17, 0x2e, 0x5c, 0xb8, 0xf7, 0x69, 0xd2, 0x23, 0x46, 0x8c, 0x9f, 0xb9, 0xf5, 0x6d, 0xda, + 0x33, 0x66, 0xcc, 0x1f, 0x3e, 0x7c, 0xf8, 0x77, 0xee, 0x5b, 0xb6, 0xeb, 0x51, 0xa2, 0xc3, 0x00, +}; + +const unsigned char INDEX_OF[]= +{ + 0xff, 0x00, 0x01, 0x63, 0x02, 0xc6, 0x64, 0x6a, 0x03, 0xcd, 0xc7, 0xbc, 0x65, 0x7e, 0x6b, 0x2a, + 0x04, 0x8d, 0xce, 0x4e, 0xc8, 0xd4, 0xbd, 0xe1, 0x66, 0xdd, 0x7f, 0x31, 0x6c, 0x20, 0x2b, 0xf3, + 0x05, 0x57, 0x8e, 0xe8, 0xcf, 0xac, 0x4f, 0x83, 0xc9, 0xd9, 0xd5, 0x41, 0xbe, 0x94, 0xe2, 0xb4, + 0x67, 0x27, 0xde, 0xf0, 0x80, 0xb1, 0x32, 0x35, 0x6d, 0x45, 0x21, 0x12, 0x2c, 0x0d, 0xf4, 0x38, + 0x06, 0x9b, 0x58, 0x1a, 0x8f, 0x79, 0xe9, 0x70, 0xd0, 0xc2, 0xad, 0xa8, 0x50, 0x75, 0x84, 0x48, + 0xca, 0xfc, 0xda, 0x8a, 0xd6, 0x54, 0x42, 0x24, 0xbf, 0x98, 0x95, 0xf9, 0xe3, 0x5e, 0xb5, 0x15, + 0x68, 0x61, 0x28, 0xba, 0xdf, 0x4c, 0xf1, 0x2f, 0x81, 0xe6, 0xb2, 0x3f, 0x33, 0xee, 0x36, 0x10, + 0x6e, 0x18, 0x46, 0xa6, 0x22, 0x88, 0x13, 0xf7, 0x2d, 0xb8, 0x0e, 0x3d, 0xf5, 0xa4, 0x39, 0x3b, + 0x07, 0x9e, 0x9c, 0x9d, 0x59, 0x9f, 0x1b, 0x08, 0x90, 0x09, 0x7a, 0x1c, 0xea, 0xa0, 0x71, 0x5a, + 0xd1, 0x1d, 0xc3, 0x7b, 0xae, 0x0a, 0xa9, 0x91, 0x51, 0x5b, 0x76, 0x72, 0x85, 0xa1, 0x49, 0xeb, + 0xcb, 0x7c, 0xfd, 0xc4, 0xdb, 0x1e, 0x8b, 0xd2, 0xd7, 0x92, 0x55, 0xaa, 0x43, 0x0b, 0x25, 0xaf, + 0xc0, 0x73, 0x99, 0x77, 0x96, 0x5c, 0xfa, 0x52, 0xe4, 0xec, 0x5f, 0x4a, 0xb6, 0xa2, 0x16, 0x86, + 0x69, 0xc5, 0x62, 0xfe, 0x29, 0x7d, 0xbb, 0xcc, 0xe0, 0xd3, 0x4d, 0x8c, 0xf2, 0x1f, 0x30, 0xdc, + 0x82, 0xab, 0xe7, 0x56, 0xb3, 0x93, 0x40, 0xd8, 0x34, 0xb0, 0xef, 0x26, 0x37, 0x0c, 0x11, 0x44, + 0x6f, 0x78, 0x19, 0x9a, 0x47, 0x74, 0xa7, 0xc1, 0x23, 0x53, 0x89, 0xfb, 0x14, 0x5d, 0xf8, 0x97, + 0x2e, 0x4b, 0xb9, 0x60, 0x0f, 0xed, 0x3e, 0xe5, 0xf6, 0x87, 0xa5, 0x17, 0x3a, 0xa3, 0x3c, 0xb7, +}; + +/* 8-bit parity table */ +const unsigned char Partab[] = { + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, +}; + +/* Scramble byte table */ +const unsigned char Scrambler[]= +{ + 0xff, 0x48, 0x0e, 0xc0, 0x9a, 0x0d, 0x70, 0xbc, 0x8e, 0x2c, 0x93, 0xad, 0xa7, 0xb7, 0x46, 0xce, + 0x5a, 0x97, 0x7d, 0xcc, 0x32, 0xa2, 0xbf, 0x3e, 0x0a, 0x10, 0xf1, 0x88, 0x94, 0xcd, 0xea, 0xb1, + 0xfe, 0x90, 0x1d, 0x81, 0x34, 0x1a, 0xe1, 0x79, 0x1c, 0x59, 0x27, 0x5b, 0x4f, 0x6e, 0x8d, 0x9c, + 0xb5, 0x2e, 0xfb, 0x98, 0x65, 0x45, 0x7e, 0x7c, 0x14, 0x21, 0xe3, 0x11, 0x29, 0x9b, 0xd5, 0x63, + 0xfd, 0x20, 0x3b, 0x02, 0x68, 0x35, 0xc2, 0xf2, 0x38, 0xb2, 0x4e, 0xb6, 0x9e, 0xdd, 0x1b, 0x39, + 0x6a, 0x5d, 0xf7, 0x30, 0xca, 0x8a, 0xfc, 0xf8, 0x28, 0x43, 0xc6, 0x22, 0x53, 0x37, 0xaa, 0xc7, + 0xfa, 0x40, 0x76, 0x04, 0xd0, 0x6b, 0x85, 0xe4, 0x71, 0x64, 0x9d, 0x6d, 0x3d, 0xba, 0x36, 0x72, + 0xd4, 0xbb, 0xee, 0x61, 0x95, 0x15, 0xf9, 0xf0, 0x50, 0x87, 0x8c, 0x44, 0xa6, 0x6f, 0x55, 0x8f, + 0xf4, 0x80, 0xec, 0x09, 0xa0, 0xd7, 0x0b, 0xc8, 0xe2, 0xc9, 0x3a, 0xda, 0x7b, 0x74, 0x6c, 0xe5, + 0xa9, 0x77, 0xdc, 0xc3, 0x2a, 0x2b, 0xf3, 0xe0, 0xa1, 0x0f, 0x18, 0x89, 0x4c, 0xde, 0xab, 0x1f, + 0xe9, 0x01, 0xd8, 0x13, 0x41, 0xae, 0x17, 0x91, 0xc5, 0x92, 0x75, 0xb4, 0xf6, 0xe8, 0xd9, 0xcb, + 0x52, 0xef, 0xb9, 0x86, 0x54, 0x57, 0xe7, 0xc1, 0x42, 0x1e, 0x31, 0x12, 0x99, 0xbd, 0x56, 0x3f, + 0xd2, 0x03, 0xb0, 0x26, 0x83, 0x5c, 0x2f, 0x23, 0x8b, 0x24, 0xeb, 0x69, 0xed, 0xd1, 0xb3, 0x96, + 0xa5, 0xdf, 0x73, 0x0c, 0xa8, 0xaf, 0xcf, 0x82, 0x84, 0x3c, 0x62, 0x25, 0x33, 0x7a, 0xac, 0x7f, + 0xa4, 0x07, 0x60, 0x4d, 0x06, 0xb8, 0x5e, 0x47, 0x16, 0x49, 0xd6, 0xd3, 0xdb, 0xa3, 0x67, 0x2d, + 0x4b, 0xbe, 0xe6, 0x19, 0x51, 0x5f, 0x9f, 0x05, 0x08, 0x78, 0xc4, 0x4a, 0x66, 0xf5, 0x58, 0xff, + 0x48, 0x0e, 0xc0, 0x9a, 0x0d, 0x70, 0xbc, 0x8e, 0x2c, 0x93, 0xad, 0xa7, 0xb7, 0x46, 0xce, 0x5a, + 0x97, 0x7d, 0xcc, 0x32, 0xa2, 0xbf, 0x3e, 0x0a, 0x10, 0xf1, 0x88, 0x94, 0xcd, 0xea, 0xb1, 0xfe, + 0x90, 0x1d, 0x81, 0x34, 0x1a, 0xe1, 0x79, 0x1c, 0x59, 0x27, 0x5b, 0x4f, 0x6e, 0x8d, 0x9c, 0xb5, + 0x2e, 0xfb, 0x98, 0x65, 0x45, 0x7e, 0x7c, 0x14, 0x21, 0xe3, 0x11, 0x29, 0x9b, 0xd5, 0x63, 0xfd, +}; From 04dda2aadfcef2fe3f52aae88521b2bf76cabc11 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 5 Mar 2026 15:56:29 -0500 Subject: [PATCH 0688/1744] Update transmit.py resolve merge conflicts --- transmit.py | 737 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 456 insertions(+), 281 deletions(-) diff --git a/transmit.py b/transmit.py index 602dd3cd..57feed85 100644 --- a/transmit.py +++ b/transmit.py @@ -3,13 +3,99 @@ import RPi.GPIO as GPIO from RPi.GPIO import output #import subprocess -#import time +import time from time import sleep #import os import sys from os import system +from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor import serial +import random +import subprocess + +def output(pin, value): + if (pin != 20): + command = "gpio -g write " + str(pin) + " " + str(value) + system(command) + print(command) + else: # ptt pin + GPIO.output(pin, value) + +def input(pin): + # command = "gpio -g read " + str(pin) + query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + print("Sucess!") + print(f"Output of the command (stdout): {result.stdout}") + return int(result.stdout) + except subprocess.CalledProcessError as e: + print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + print(f"Output of the command (stdout): {e.stdout}") + print(f"Error output of the command (stderr): {e.stderr}") + return -1 + +def setup(pin, config): + if config == "in" or config == "out" or config == "up" or config == "down": + if (pin != 20): + command = "gpio -g mode " + str(pin) + " " + config + system(command) + print(command) + else: # ptt pin + GPIO.setwarnings(False) + GPIO.setmode(GPIO.BCM) + if config == "out: + GPIO.setup(27, GPIO.OUT) + else: + GPIO.setup(27, GPIO.IN) + else: + print(f"Unknown GPIO setup configuration: {config}") + +def blink(times): + powerPin = 16 + for i in range(times): + system("gpio -g write " + str(powerPin) + " 0") # blink two times + sleep(0.1) + system("gpio -g write " + str(powerPin) + " 1") + sleep(0.1) + +def sim_failure_check(): + try: + global card + global cam_fail + global sim_mode + global sim_config + cam_fail = False + file = open("/home/pi/CubeSatSim/failure_mode.txt") + fail_mode = int(file.read(2)) +# print("Fail_mode: ") +# print(fail_mode) + if (fail_mode == 11): + card = "Device" # Change audio so no FM audio plays + print("Failure mode no FM audio") + sim_mode = True + elif (fail_mode == 7): + cam_fail = True + print("Failure mode camera fail") + sim_mode = True + card = "Headphones" + elif (fail_mode == -1): + print("No failure mode") + card = "Headphones" + if sim_config: + sim_mode = True + else: + print("Other failure mode") + card = "Headphones" + sim_mode = True + except: + print("No failure mode") + card = "Headphones" + if sim_config: + sim_mode = True def battery_saver_check(): try: @@ -22,6 +108,14 @@ def battery_saver_check(): except: print("battery saver not activated") # txc = True + +def blink(times): + powerPin = 16 + for i in range(times): + output(powerPin, 0) # blink + sleep(0.1) + output(powerPin, 1) + sleep(0.1) def increment_mode(): print("increment mode") @@ -38,76 +132,26 @@ def increment_mode(): print(mode) if (mode == 'a'): mode = 'f' - GPIO.output(powerPin, 0) # blink two times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(2) sleep(2.5) elif (mode == 'f'): mode = 'b' - GPIO.output(powerPin, 0) # blink three times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(3) sleep(2.5) elif (mode == 'b'): mode = 's' - GPIO.output(powerPin, 0) # blink four times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(4) sleep(2.5) elif (mode == 's'): mode = 'm' - GPIO.output(powerPin, 0) # blink five times - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1); - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) - sleep(0.1) - GPIO.output(powerPin, 0) - sleep(0.1) - GPIO.output(powerPin, 1) + blink(5) sleep(2.5) else: mode = 'a' - GPIO.output(powerPin, 0) # blink one time - sleep(0.1) - GPIO.output(powerPin, 1) + blink(1) sleep(2.5) try: @@ -117,13 +161,13 @@ def increment_mode(): file.close() print(".mode file written") - GPIO.setwarnings(False) - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) +# GPIO.setwarnings(False) + output(txLed, 0) + output(powerPin, 0) print("sudo reboot -h now") - GPIO.setwarnings(False) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.output(powerPin, 0); +# GPIO.setwarnings(False) + setup(powerPin, "out") + output(powerPin, 0); # system("reboot -h now") # release = True; @@ -135,8 +179,57 @@ def increment_mode(): except: print("can't write to .mode file") +def camera_photo(): + global cam_fail + global os_status + sim_failure_check() + system("sudo rm /home/pi/CubeSatSim/camera_out.jpg") + stored_image = False + try: + if os_status == "bookworm": + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + else: + system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + f = open("/home/pi/CubeSatSim/camera_out.jpg") + f.close() + print("Photo taken") + if (cam_fail == True): + system("cp /home/pi/CubeSatSim/sstv//sstv_image_2_320_x_256.jpeg /home/pi/CubeSatSim/camera_out.jpg") + print("Using stored image") + stored_image = True + except: + system("cp /home/pi/CubeSatSim/sstv//sstv_image_2_320_x_256.jpeg /home/pi/CubeSatSim/camera_out.jpg") + print("Using stored image") + stored_image = True + if (stored_image == False): + file='/home/pi/CubeSatSim/camera_out.jpg' + font1 = ImageFont.truetype('DejaVuSerif.ttf', 20) + font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 16) + + try: + filep = open("/home/pi/CubeSatSim/telem_string.txt") + telem_string = filep.readline() + except: + telem_string = "" + if (debug_mode == 1): + print("Can't read telem_string.txt") + print(telem_string) + + img = Image.open(file) + draw = ImageDraw.Draw(img) + # draw.text((10, 10), callsign, font=font2, fill='white') + # draw.text((120, 10), telem_string, font=font2, fill='white') + draw.text((12, 12), callsign, font=font1, fill='black') + draw.text((10, 10), callsign, font=font1, fill='white') + draw.text((112, 12), telem_string, font=font2, fill='black') # was 122 + draw.text((110, 10), telem_string, font=font2, fill='white') # was 120 + img.save(file) -print("CubeSatSim v2.1 transmit.py starting...") + return True + else: + return False + +print("CubeSatSim v2.2 transmit.py starting...") pd = 21 ptt = 20 @@ -147,20 +240,18 @@ powerPin = 16 command_tx = True -GPIO.setmode(GPIO.BCM) -GPIO.setwarnings(False) -GPIO.setup(13, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(12, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(txc_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP) -GPIO.setup(green, GPIO.OUT) -GPIO.output(powerPin, 1) +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) +setup(13, "up") +setup(12, "up") +setup(27, "up") +setup(txc_pin, "up") +setup(green, "out") +output(powerPin, 1) transmit = False txLed = 27 -txLedOn = 1 -txLedOff = 0 -if GPIO.input(12) == False: +if input(12) == False: print("LPF present") transmit = True else: @@ -168,38 +259,38 @@ else: # GPIO.setup(txLed, GPIO.OUT) -# output(txLed, txLedOff) +# output(txLed, 0) -GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 -GPIO.setwarnings(False) -GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 +# GPIO.setwarnings(False) +setup(txLed, "out") -GPIO.setup(pd, GPIO.OUT) +setup(pd, "out") #output(pd, 1) output(pd, 0) -GPIO.setup(ptt, GPIO.OUT) +setup(ptt, "out") output (ptt, 1) txc = False -if GPIO.input(txc_pin) == False: +if input(txc_pin) == False: print("TXC is present") txc = True; else: print("TXC not present") # txc = False # forcing it off -output(txLed, txLedOn) +output(txLed, 1) sleep(1) -output(txLed, txLedOff) +output(txLed, 0) battery_saver_check() -# print(txLedOn) +# print(1) print(txLed) # GPIO.setup(27, GPIO.OUT) # GPIO.output(27, 0) -debug_mode = 0 #no debugging transmit +debug_mode = 0 # change to 1 to debug transmit skip = False @@ -218,6 +309,14 @@ if __name__ == "__main__": print(transmit) + uptime_time = 55 # 55 second boot time if Pi Zero + try: + f = open("/home/pi/CubeSatSim/pi_zero2", "r") + f.close() + print("Pi Zero 2 detected!") + uptime_time = 30 # 30 second boot time if Pi Zero 2 + except: + print("Pi Zero 2 not detected") try: system("cat /proc/uptime > /home/pi/CubeSatSim/uptime") @@ -226,14 +325,16 @@ if __name__ == "__main__": print(up) uptime = float(up) print(uptime) - if (uptime < 45): - print("Uptime < 45 seconds") + if (uptime < uptime_time): + print("Uptime < threshold seconds") else: - print("Uptime > 45 seconds") + print("Uptime > threshold seconds") + print("Skip CW ID") skip = True file.close() except: print("Can't open /proc/uptime") + print(skip) if ( mode == "y"): try: @@ -277,29 +378,53 @@ if __name__ == "__main__": rx_value = '0' sq = '0' tx = '434.9000' - rx = '435.0000' + rx = '435.0000' + txr = '144.9000' + sim_mode = False + sim_config = False + hab_mode = False try: file = open("/home/pi/CubeSatSim/sim.cfg") # callsign = file.readline().split(" ")[0] config = file.readline().split() callsign = config[0] + if len(config) > 4: + if config[4] == 'y' or config[4] == 'yes': + sim_mode = True + sim_config = True + print("Simulated telemetry mode is configured") + else: + try: + if path.isfile("/home/pi/CubeSatSim/sim_mode_auto"): + print("Simulated telemetry mode automatically turned on!") + sim_mode = True + sim_config = True + except: + if (debug_mode == 1): + print("/home/pi/CubeSatSim/sim_mode_auto not found") if len(config) > 5: if (mode != 'p') and (mode != 'P'): # squelch off for Pacsat sq = config[5] print(f'squelch: {sq}') if len(config) > 6: - txf = float(config[6]) -# print(txf) -# print( "{:.4f}".format(txf)) - tx = "{:.4f}".format(txf) - print(tx) + txf = float(config[6]) + if (mode == 'e'): + txr = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + tx = "{:.4f}".format(txr) + else: + tx = "{:.4f}".format(txf) + print("Transmit frequency: ",tx) if len(config) > 7: rxf = float(config[7]) # print(rxf) # print( "{:.4f}".format(rxf)) rx = "{:.4f}".format(rxf) print(rx) + if len(config) > 8: + if config[8] == 'y' or config[8] == 'yes': + hab_mode = True + print("Balloon (HAB) mode is configured.") if len(config) > 9: rxpl = float(config[9]) # print(rxpl) @@ -316,11 +441,11 @@ if __name__ == "__main__": print # print(callsign) print(sq) - if sq == '8': - print("squelch set to 8, no command input!") - no_command = True - else: - no_command = False +# if sq == '8': +# print("squelch set to 8, no command input!") +# no_command = True +# else: + no_command = False print(no_command) except: callsign = "AMSAT" @@ -328,92 +453,119 @@ if __name__ == "__main__": print("Can't read callsign from sim.cfg file, defaulting to AMSAT") file.close() - if (mode != 'p') and (mode != 'P'): - try: - f = open("/home/pi/CubeSatSim/command_control", "r") - f.close() - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected - if GPIO.input(squelch) == False: - print("squelch not set correctly, no command input!") - no_command = True - else: + no_command = True + try: + f = open("/home/pi/CubeSatSim/command_control", "r") + f.close() +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) + setup(squelch, "up") ## pull up in case pin is not connected + if input(squelch) == False: + print("squelch not set correctly, no command input!") + else: + if (mode != 'n') and (mode != 'x'): print("command and control is activated") no_command = False - # system("/home/pi/CubeSatSim/command &") system("sudo systemctl start command") - except: - print("command and control not activated") - no_command = True - + else: + print("Command and control not activated since Transmit Commands mode") + txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated + except: + print("command and control not activated") + print(callsign) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - print(txLed) - print(txLedOn) - GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# print(txLed) +# print(1) +# setup(txLed, "out") + query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + os_status = result.stdout.strip() + print(f"Output of the command (stdout): {os_status}") + except subprocess.CalledProcessError as e: +# print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + os_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + if os_status != "VERSION_CODENAME=bullseye": + os_status = "bookworm" + else: + os_status = "bullseye" + print (os_status) + card = "Headphones" # default using pcm audio output of Pi Zero # card = "Device" # using USB sound card for audio output - print("Programming FM module!\n"); - output(pd, 1) - output (ptt, 1) + query = ["sudo", "systemctl", "is-active", "gpsd.socket"] try: - ser = serial.Serial("/dev/ttyAMA0", 9600) - print(ser.portstr) -# uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" - uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" - print(uhf_string) - for i in range(6): -# ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") - ser.write(uhf_string.encode()) - sleep(0.1) - ser.close() - ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data - except: - print("Error in serial write") - output(pd, 0) - -# if (mode != 'x') and (skip == False): -# sleep(10) # delay so cubesatsim code catches up - - system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1") - -# command_control_check() - -# if (mode != ) and (command_tx == True): -# if (command_tx == True): - if ((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False): -# battery_saver_mode - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) -# if (txc): -# output(pd, 1) -# output (ptt, 0) -# sleep(0.1) -# system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") -# sleep(0.1) -# output (ptt, 1) -# output(pd, 0) -# else: - if (True): + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + gpsd_status = result.stdout.strip() + print(f"Output of the command (stdout): {gpsd_status}") + except subprocess.CalledProcessError as e: +# print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + gpsd_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + + if (mode != 'e'): + + if (gpsd_status == "active"): + print("Stopping gpsd.socket") + system("sudo systemctl stop gpsd.socket") + print("Programming FM module!\n"); + output(pd, 1) + output (ptt, 1) + try: + ser = serial.Serial("/dev/ttyAMA0", 9600) + print(ser.portstr) + # uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" + uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" + print(uhf_string) + for i in range(6): + # ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") + ser.write(uhf_string.encode()) + sleep(0.1) + ser.close() + ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data + except: + print("Error in serial write") + output(pd, 0) + if (gpsd_status == "active"): + print("Restarting gpsd.socket") + system("sudo systemctl restart gpsd.socket") + + sim_failure_check() + if (hab_mode == True) and (mode == 'a'): + print("Don't transmit CW ID since APRS HAB mode is active") + else: + if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) + print("Transmit CW ID") + status = "" + if not no_command: + status = status + " C" + if sim_mode: + status = status + " S" if (debug_mode == 1): -# system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3") - system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: -# system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f 434.9e3 > /dev/null 2>&1") - system("echo 'hi hi de " + callsign + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + output(txLed, 0) + + sleep(1) + else: + print("Don't transmit CW ID since command_tx is False or APRS mode or change of mode") + - output(txLed, txLedOff) - - sleep(1) - else: - print("Don't transmit CW ID since command_tx is False or APRS mode") - if (transmit): - # print 'Length: ', len(sys.argv) # if (len(sys.argv)) > 1: @@ -451,12 +603,13 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") else: - GPIO.output(powerPin, 0) +# GPIO.output(powerPin, 0) print("Transmit APRS Commands") + system("sudo systemctl stop command") # while True: # sleep(0.1) - if (mode != 'n'): - system("touch /home/pi/CubeSatSim/ready") +# if (mode != 'n'): +# system("touch /home/pi/CubeSatSim/ready") while True: try: @@ -467,20 +620,21 @@ if __name__ == "__main__": system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # output(pd, 1) # output (ptt, 0) # sleep(.1) # # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) sleep(0.1) # add delay before transmit output (ptt, 0) sleep(0.3) # add even more time at start - system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/telem.wav") + system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/telem.wav") sleep(0.2) # add more time at end output (ptt, 1) # output(pd, 0) @@ -494,7 +648,7 @@ if __name__ == "__main__": sleep(0.1) # output (ptt, 1) # output(pd, 0) - output(txLed, txLedOff) + output(txLed, 0) system("sudo rm /home/pi/CubeSatSim/ready") f.close() @@ -502,11 +656,12 @@ if __name__ == "__main__": print("Ready for next packet!") sleep(0.5) + except: # command_control_check() sleep(1) elif (mode == 'm'): - system("touch /home/pi/CubeSatSim/cwready") +# system("touch /home/pi/CubeSatSim/cwready") print("CW") while True: # command_control_check() @@ -523,11 +678,12 @@ if __name__ == "__main__": system(command) ## chan = chan + 1 if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) if (txc): + sim_failure_check() # output (pd, 1) sleep(0.3) output (ptt, 0) @@ -539,8 +695,8 @@ if __name__ == "__main__": if (debug_mode == 1): system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: - system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + output(txLed, 0) # command_control_check() sleep(2) @@ -559,7 +715,10 @@ if __name__ == "__main__": # from pysstv.sstv import SSTV # camera = PiCamera() print("Testing for camera") - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + if os_status == "bookworm": + system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + else: + system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Camera present") @@ -571,7 +730,7 @@ if __name__ == "__main__": camera_present = 0 # while 1: - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) if (camera_present == 1): @@ -583,12 +742,13 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav") @@ -600,42 +760,14 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # sleep(1) except: print("image 2 did not load - copy from CubeSatSim/sstv directory") while 1: # command_control_check() - - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") # > /dev/null 2>&1") - print("Photo taken") - - file='/home/pi/CubeSatSim/camera_out.jpg' - font1 = ImageFont.truetype('DejaVuSerif.ttf', 20) - font2 = ImageFont.truetype('DejaVuSerif-Bold.ttf', 16) - - try: - filep = open("/home/pi/CubeSatSim/telem_string.txt") - telem_string = filep.readline() - except: - telem_string = "" - if (debug_mode == 1): - print("Can't read telem_string.txt") - print(telem_string) - - img = Image.open(file) - draw = ImageDraw.Draw(img) -# draw.text((10, 10), callsign, font=font2, fill='white') -# draw.text((120, 10), telem_string, font=font2, fill='white') - draw.text((12, 12), callsign, font=font1, fill='black') - draw.text((10, 10), callsign, font=font1, fill='white') - draw.text((122, 12), telem_string, font=font2, fill='black') - draw.text((120, 10), telem_string, font=font2, fill='white') - img.save(file) - -# command_control_check() - + camera_photo() system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/camera_out.jpg") system("sudo rm /home/pi/CubeSatSim/camera_out.jpg > /dev/null 2>&1") @@ -643,12 +775,14 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): +# print(card) + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/camera_out.jpg.wav") @@ -660,7 +794,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/camera_out.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) @@ -679,13 +813,14 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") @@ -697,7 +832,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(1) @@ -716,12 +851,13 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg.wav") @@ -733,7 +869,7 @@ if __name__ == "__main__": else: system("cat /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg.wav | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(10) @@ -746,13 +882,14 @@ if __name__ == "__main__": if (command_tx == True): # command_control_check() - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # battery_saver_check() if (txc): + sim_failure_check() # output(pd, 1) output (ptt, 0) system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/sstv.wav") @@ -761,102 +898,140 @@ if __name__ == "__main__": else: sleep(60) - output(txLed, txLedOff) + output(txLed, 0) # output (ptt, 1) # output(pd, 0) sleep(10) - elif (mode == 'b'): + elif (mode == 'b') or (mode == 'j'): # command_control_check() - print("BPSK") + if (mode == 'b'): + print("BPSK") + else: + print("FUNcube") print("turn on FM rx") output(pd, 1) output(ptt, 1) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# setup(txLed, "out") if (command_tx == True): # system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &") system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f " + tx + "e6 -t float &") print("Turning LED on/off and listening for carrier") + image_id = random.randint(0, 255) + print("Initial image_id: " + str(image_id) + "\n") while 1: - output(txLed, txLedOff) +# print ("LED on") + output(txLed, 0) sleep(0.4) # if (command_tx == False): -# output(txLed, txLedOn) +# output(txLed, 1) # sleep(0.03) -# output(txLed, txLedOff) +# output(txLed, 0) # command_control_check() if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # print(txLed) -# print(txLedOn) - sleep(4.2) +# print(1) + + if (mode == 'b'): + sleep(4.2) + else: # FUNcube mode image + for i in range(4): +# print("Checking image_file.bin") + try: + file = open("/home/pi/CubeSatSim/image_file.bin") + file.close() + # image_present = True + sleep(1.0) + except: + # image_present = False + + # if (image_present == False): + start = time.perf_counter() + camera_photo() + system("/home/pi/ssdv/ssdv -e -n -i " + str(image_id) + " -q 3 -J /home/pi/CubeSatSim/camera_out.jpg /home/pi/CubeSatSim/image_file.bin") + print("image_id: " + str(image_id) + "\n") + image_id = ( image_id + 1 ) % 256 + print("new image_id: " + str(image_id) + "\n") + elapsed_time = time.perf_counter() - start + print("Elapsed time: ") + print(elapsed_time) + if (elapsed_time < 9): + sleep(9 - time.perf_counter() + start) + # else: + sleep(0.6) elif (mode == 'e'): # code based on https://zr6aic.blogspot.com/2016/11/creating-2m-fm-repeater-with-raspberry.html - print("Repeater") - print("Stopping command and control") - system("sudo systemctl stop command") + print("Cross Band Repeater Mode") +# print("Stopping command and control") +# system("sudo systemctl stop command") print("turn on FM rx") output(pd, 1) output(ptt, 1) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) - GPIO.setup(powerPin, GPIO.OUT) - GPIO.setup(squelch, GPIO.IN, pull_up_down=GPIO.PUD_UP) ## pull up in case pin is not connected - GPIO.output(powerPin, 0) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# setup(txLed, "out") +# GPIO.setup(powerPin, GPIO.OUT) + setup(squelch, "up") ## pull up in case pin is not connected +# GPIO.output(powerPin, 1) # was 0 +# txf = float(tx) - 288.9 +# print("Transmit frequency: ",txf) + if (command_tx != True): + print("Beacon mode off so no repeater transmission") + + print("Ready to detect carrier") while True: - sleep(0.5) - if (GPIO.input(squelch) == False): + if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) -# system("arecord -D plughw:CARD=Device,DEV=0 | csdr convert_i16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") -## system("arecord -D plughw:CARD=Device,DEV=0 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") - sleep(1) - system("sudo arecord -D plughw:CARD=Device,DEV=0 -r48000 -fS16_LE -c1 | nc localhost 8011 &") - GPIO.output(powerPin, 1) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) - GPIO.output(powerPin, 0) - while (GPIO.input(squelch) == False): + system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") + while (input(squelch) == False): sleep(1) print("No carrier detected, stopping repeater") - output(txLed, txLedOff) + output(txLed, 0) + system("sudo rpitx -i null > /dev/null 2>&1") system("sudo killall -9 arecord > /dev/null 2>&1") system("sudo killall -9 nc > /dev/null 2>&1") system("sudo killall -9 rpitx > /dev/null 2>&1") - + print("Resetting audio") + system("sudo /etc/init.d/alsa-utils stop") + system("sudo /etc/init.d/alsa-utils start") + print("Finished resetting audio") + print("Ready to detect carrier") else: print("FSK") print("turn on FM rx") output(pd, 1) output(ptt, 1) - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 - GPIO.setup(txLed, GPIO.OUT) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 +# setup(txLed, "out") if (command_tx == True): system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") print("Turning LED on/off and listening for carrier") while 1: - output(txLed, txLedOff) + output(txLed, 0) sleep(0.4) # if (command_tx == False): -# output(txLed, txLedOn) +# output(txLed, 1) # sleep(0.03) -# output(txLed, txLedOff) +# output(txLed, 0) # command_control_check() if (command_tx == True): - GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 - GPIO.setup(txLed, GPIO.OUT) - output(txLed, txLedOn) +# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 +# setup(txLed, "out") + output(txLed, 1) # print(txLed) -# print(txLedOn) +# print(1) sleep(4.2) else: print("No Low Pass Filter so no telemetry transmit. See http://cubesatsim.org/wiki for instructions on how to build the LPF.") From ddefdb9d38c71809ad0ea79765cd45c344ff6e57 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:00:06 -0500 Subject: [PATCH 0689/1744] Update main.h remove redefinitions --- main.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/main.h b/main.h index 058c0012..082f230c 100644 --- a/main.h +++ b/main.h @@ -126,7 +126,6 @@ FILE *image_file; #define FC 6 #define REPEATER 7 #define PACSAT 8 -#define REPEATER 11 #define TXCOMMAND 12 #define PACSATGND 13 @@ -145,21 +144,6 @@ FILE *image_file; #define FAIL_AUDIO 11 int failureMode = FAIL_NONE; -#define FAIL_COUNT 11 -#define FAIL_NONE -1 -#define FAIL_UNPLUG 1 -#define FAIL_SOLAR 2 -#define FAIL_DEGRADE 3 -#define FAIL_SHORT 4 -#define FAIL_I2C1 5 -#define FAIL_I2C3 6 -#define FAIL_CAMERA 7 -#define FAIL_PAYLOAD 8 -#define FAIL_BME 9 -#define FAIL_MPU 10 -#define FAIL_AUDIO 11 -int failureMode = FAIL_NONE; - int transmitStatus = -1; float amplitude; // = ; // 20000; // 32767/(10%amp+5%amp+100%amp) From a05938d7410e4f9707fc6c686e69c56bd6e68ff6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:01:56 -0500 Subject: [PATCH 0690/1744] Update main.c fix else --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 26bb93ff..87909a07 100644 --- a/main.c +++ b/main.c @@ -518,8 +518,8 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); -// } else if (mode == BPSK) { - } else { + } else if (mode == BPSK) { +//// } else { bitRate = 1200; rsFrames = 3; From f3c4d4b3adb75bed70a9f8b09c3a3204ed255c20 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:04:50 -0500 Subject: [PATCH 0691/1744] Update main.c remove extra } --- main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.c b/main.c index 87909a07..78ece5ff 100644 --- a/main.c +++ b/main.c @@ -601,8 +601,6 @@ int main(int argc, char * argv[]) { if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored -// get_tlm_fox(); - } else if (mode == FC) // && !sim_mode) get_tlm_fc(); // fill transmit buffer with reset count 0 packets that will be ignored else if (mode == CW) From 39f523fc85a946f1414f92e885683e9a528c879f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 05:25:12 -0500 Subject: [PATCH 0692/1744] Update main.c missing PACSAT conditional --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 78ece5ff..39bbdbfe 100644 --- a/main.c +++ b/main.c @@ -518,7 +518,7 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); - } else if (mode == BPSK) { + } else if ((mode == BPSK) || (mode == PACSAT)) { //// } else { bitRate = 1200; From a0ff427c3b29cd33050d8eaa3d9339cb53b1fc7b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:43:19 -0500 Subject: [PATCH 0693/1744] Update main.c fix extra { --- main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.c b/main.c index 39bbdbfe..a34859e4 100644 --- a/main.c +++ b/main.c @@ -2731,9 +2731,8 @@ if (setting == ON) { FILE *command = popen("rm /home/pi/CubeSatSim/battery_saver", "r"); pclose(command); fprintf(stderr,"Turning Battery saver mode OFF\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { battery_saver_mode = OFF; - if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); From 08ceffde3794e6b81fe2535e4f2042360dda4d6e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:51:17 -0500 Subject: [PATCH 0694/1744] Update transmit.py fix output duplicate --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 57feed85..bc6f4b7c 100644 --- a/transmit.py +++ b/transmit.py @@ -1,7 +1,7 @@ #!/usr/bin/env python import RPi.GPIO as GPIO -from RPi.GPIO import output +#from RPi.GPIO import output #import subprocess import time from time import sleep From 61f71a12f4df9ff4eb037bb4198e8b39e6851395 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:52:18 -0500 Subject: [PATCH 0695/1744] Update transmit.py missing " --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index bc6f4b7c..6ab65269 100644 --- a/transmit.py +++ b/transmit.py @@ -47,7 +47,7 @@ def setup(pin, config): else: # ptt pin GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) - if config == "out: + if config == "out": GPIO.setup(27, GPIO.OUT) else: GPIO.setup(27, GPIO.IN) From 7df84939dc6bb0c2f9c4ff05f14d5381c2404614 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:57:17 -0500 Subject: [PATCH 0696/1744] Update transmit.py print GPIO setup --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 6ab65269..54415744 100644 --- a/transmit.py +++ b/transmit.py @@ -49,8 +49,10 @@ def setup(pin, config): GPIO.setmode(GPIO.BCM) if config == "out": GPIO.setup(27, GPIO.OUT) + print("GPIO.setup(27, GPIO.OUT") else: GPIO.setup(27, GPIO.IN) + print("GPIO.setup(27, GPIO.IN") else: print(f"Unknown GPIO setup configuration: {config}") From e243b99d4b9bdcc73443889c8f3537a7abf21e04 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 06:59:56 -0500 Subject: [PATCH 0697/1744] Update transmit.py change 27 to 20 --- transmit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index 54415744..9fc9675a 100644 --- a/transmit.py +++ b/transmit.py @@ -48,11 +48,11 @@ def setup(pin, config): GPIO.setwarnings(False) GPIO.setmode(GPIO.BCM) if config == "out": - GPIO.setup(27, GPIO.OUT) - print("GPIO.setup(27, GPIO.OUT") + GPIO.setup(20, GPIO.OUT) + print("GPIO.setup(20, GPIO.OUT)") else: - GPIO.setup(27, GPIO.IN) - print("GPIO.setup(27, GPIO.IN") + GPIO.setup(20, GPIO.IN) + print("GPIO.setup(20, GPIO.IN)") else: print(f"Unknown GPIO setup configuration: {config}") @@ -271,7 +271,7 @@ setup(pd, "out") #output(pd, 1) output(pd, 0) setup(ptt, "out") -output (ptt, 1) +output(ptt, 1) txc = False if input(txc_pin) == False: From 83b858f1eb148d6eb615805e47457fdc7987342b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 07:02:02 -0500 Subject: [PATCH 0698/1744] Update config missing fi --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 0a5993d3..67f3c90e 100755 --- a/config +++ b/config @@ -1263,6 +1263,7 @@ elif [ "$1" = "-e" ]; then reboot=1 else restart=1 + fi fi elif [ "$1" = "-n" ]; then From 3b75f3739cf5e312f2a5287874d8ddfb82653255 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 09:26:59 -0500 Subject: [PATCH 0699/1744] Update pacsatsim.sh add usermod gpio pi --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 1ea856b1..62c0ebd1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -139,7 +139,7 @@ echo # /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" - +sudo usermod -a -G gpio pi if [ "$loopback" = "1" ]; then From dda02ce8e17da945646505c01fc1f9e84e300bf9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 15:14:14 -0500 Subject: [PATCH 0700/1744] Update install add make clean --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index adbc9fc1..1c4d2ec7 100755 --- a/install +++ b/install @@ -448,6 +448,7 @@ if [ ! -f "$FILE" ]; then cd git clone https://github.com/alanbjohnston/g0kla_common.git cd g0kla_common/Debug/ + make clean make all sudo ./install.sh @@ -457,6 +458,7 @@ if [ ! -f "$FILE" ]; then cd pi_pacsat #git checkout master-debug cd Debug + make clean make all mkdir /home/pi/PacSat @@ -489,6 +491,7 @@ if [ ! -f "$FILE" ]; then cd pacsat_telem git checkout master-fox cd Debug + make clean make all fi From 4c173a9a0faa493dac457ce9e458cb5f64ea48a8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 16:00:18 -0500 Subject: [PATCH 0701/1744] add sudo usermod -a -G gpio pi --- pacsatsim-df.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh index 5abc76d1..90e5625c 100755 --- a/pacsatsim-df.sh +++ b/pacsatsim-df.sh @@ -4,6 +4,8 @@ pwm=1 sudo modprobe snd-aloop +sudo usermod -a -G gpio pi + if [ "$pwm" = "1" ] ; then direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 From 0942b36c3b749fba07a94c8c49c50198feb9b6b8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 17:27:57 -0500 Subject: [PATCH 0702/1744] Update pacsatsim.sh pacsat_telem not sudo --- pacsatsim.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 62c0ebd1..bf489175 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -163,8 +163,9 @@ fi ## echo "Don't close the direwolf window or the Pacsatsim will stop running." +export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH -sudo /home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & +/home/pi/pacsat_telem/Debug/pacsat_telem -v -d /home/pi/PacSat/pacsat & sleep 5 From 861aeee148387b23527bec7abc8c482c55077bfc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 6 Mar 2026 17:54:03 -0500 Subject: [PATCH 0703/1744] Update install remove cpu limitations, reinstall Direwolf if not latest --- install | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/install b/install index 1c4d2ec7..7f2e7272 100755 --- a/install +++ b/install @@ -61,9 +61,10 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt @@ -158,9 +159,11 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/firmware/cmdline.txt + - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt @@ -355,6 +358,24 @@ sudo apt-get install -y gcc g++ make cmake libasound2-dev libudev-dev libavahi-c # removed wiringpi and python-picamera python3-picamera sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev minicom +if [ -d "/home/pi/direwolf" ]; then + + # Get the URL of the 'origin' remote + REPO_URL=$(git config --get remote.origin.url) + + # Check if the command was successful and a URL was retrieved + if [ $? -eq 0 ] && [ -n "$REPO_URL" ]; then + + if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git"]; then + + echo "Current Direwolf git repository URL is $REPO_URL" + echo "Reinstalling Direwolf from https://github.com/wb2osz/direwolf.git" + sudo rm -r /home/pi/direwolf + fi + else + echo "Could not find the URL for the 'origin' remote for Direwolf" + fi + if [ ! -d "/home/pi/direwolf" ]; then cd @@ -366,6 +387,7 @@ if [ ! -d "/home/pi/direwolf" ]; then make -j4 sudo make install make install-conf + fi sudo apt-get install -y gpsd gpsd-clients libgps-dev python3-gps From 5f486fd396a65f6b037a4e545ebc93ce5c156c27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 08:59:14 -0400 Subject: [PATCH 0704/1744] Update transmit.py sudo for uptime --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 9fc9675a..e154bada 100644 --- a/transmit.py +++ b/transmit.py @@ -321,7 +321,7 @@ if __name__ == "__main__": print("Pi Zero 2 not detected") try: - system("cat /proc/uptime > /home/pi/CubeSatSim/uptime") + system("sudo cat /proc/uptime > /home/pi/CubeSatSim/uptime") file = open("/home/pi/CubeSatSim/uptime") up = file.read().split(" ")[0] print(up) From 882089f9100559ef197b0d0d62bf01250a3b0d1c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:18:42 -0400 Subject: [PATCH 0705/1744] Update main.c add missing start transmit --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index a34859e4..d8ab1d05 100644 --- a/main.c +++ b/main.c @@ -151,6 +151,8 @@ int main(int argc, char * argv[]) { fprintf(stderr, "Pi Zero 2 detected\n"); FILE * pi_zero2 = popen("touch /home/pi/CubeSatSim/pi_zero2", "r"); // store Pi Zero 2 flag pclose(pi_zero2); + FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); // missing start transmit? + pclose(transmit_stop); } else fprintf(stderr, "Not a Pi Zero or Pi Zero 2\n"); From 02fc6e03c0156b576a3c68f00e6087dce0fdf68c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:27:55 -0400 Subject: [PATCH 0706/1744] Update main.c not missing transmit --- main.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/main.c b/main.c index d8ab1d05..a34859e4 100644 --- a/main.c +++ b/main.c @@ -151,8 +151,6 @@ int main(int argc, char * argv[]) { fprintf(stderr, "Pi Zero 2 detected\n"); FILE * pi_zero2 = popen("touch /home/pi/CubeSatSim/pi_zero2", "r"); // store Pi Zero 2 flag pclose(pi_zero2); - FILE * transmit_stop = popen("sudo systemctl start transmit", "r"); // missing start transmit? - pclose(transmit_stop); } else fprintf(stderr, "Not a Pi Zero or Pi Zero 2\n"); From 30ee1b7b5172cfeec3fc25af7e9552be0876cd54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:29:45 -0400 Subject: [PATCH 0707/1744] Update transmit.py add sleep 20 --- transmit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transmit.py b/transmit.py index e154bada..d2feec64 100644 --- a/transmit.py +++ b/transmit.py @@ -233,6 +233,10 @@ def camera_photo(): print("CubeSatSim v2.2 transmit.py starting...") +print("\nSleeping 20 seconds\n") + +sleep(20) + pd = 21 ptt = 20 txc_pin = 7 From 3a7ece7c1ace4ef54332c97f044a99095a1741cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:36:56 -0400 Subject: [PATCH 0708/1744] Update transmit.py ptt gpio not RPI.GPIO --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index d2feec64..519699ea 100644 --- a/transmit.py +++ b/transmit.py @@ -15,7 +15,7 @@ import random import subprocess def output(pin, value): - if (pin != 20): + if (pin != 30): command = "gpio -g write " + str(pin) + " " + str(value) system(command) print(command) @@ -40,7 +40,7 @@ def input(pin): def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": - if (pin != 20): + if (pin != 30): command = "gpio -g mode " + str(pin) + " " + config system(command) print(command) From be66f93fcf8e5f2894648349bf57b1780417158d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:40:23 -0400 Subject: [PATCH 0709/1744] Update transmit.py remove GPIO.setup(pttPin, GPIO.IN) --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 519699ea..1b56ffcf 100644 --- a/transmit.py +++ b/transmit.py @@ -597,7 +597,7 @@ if __name__ == "__main__": GPIO.output(txLed, 0) print("0") - GPIO.setup(pttPin, GPIO.IN) +# GPIO.setup(pttPin, GPIO.IN) while (True): sleep(0.1) From e2920121e2416ef0390af413c85543b5fc771f27 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:48:37 -0400 Subject: [PATCH 0710/1744] Update transmit.py change put read to gpio --- transmit.py | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index 1b56ffcf..1ab21446 100644 --- a/transmit.py +++ b/transmit.py @@ -589,24 +589,31 @@ if __name__ == "__main__": print("Pacsat") # system("sudo systemctl restart pacsatsim") # txPin = 27 - pttPin = 20 +# pttPin = 20 - GPIO.setmode(GPIO.BCM) - GPIO.setwarnings(False) - GPIO.setup(txLed, GPIO.OUT) - GPIO.output(txLed, 0) +# GPIO.setmode(GPIO.BCM) +# GPIO.setwarnings(False) +# GPIO.setup(txLed, GPIO.OUT) +# GPIO.output(txLed, 0) + output(txLed, 0) print("0") # GPIO.setup(pttPin, GPIO.IN) while (True): sleep(0.1) - GPIO.wait_for_edge(pttPin, GPIO.FALLING) - GPIO.output(txLed, 1) + # GPIO.wait_for_edge(pttPin, GPIO.FALLING) + while (input(pttPin) != 0): + sleep(0.5) +# GPIO.output(txLed, 1) + output(txLed, 1) print("1") - sleep(0.1) +# sleep(0.1) GPIO.wait_for_edge(pttPin, GPIO.RISING) - GPIO.output(txLed, 0) + while (input(pttPin) != 1): + sleep(0.5) +# GPIO.output(txLed, 0) + output(txLed, 0) print("0") else: # GPIO.output(powerPin, 0) From 63f693bcbce12a303d7244a31316be60eabe920b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:51:34 -0400 Subject: [PATCH 0711/1744] Update transmit.py fix ptt --- transmit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index 1ab21446..f795f989 100644 --- a/transmit.py +++ b/transmit.py @@ -603,15 +603,15 @@ if __name__ == "__main__": while (True): sleep(0.1) # GPIO.wait_for_edge(pttPin, GPIO.FALLING) - while (input(pttPin) != 0): - sleep(0.5) + while (input(ptt) != 0): + sleep(0.2) # GPIO.output(txLed, 1) output(txLed, 1) print("1") # sleep(0.1) - GPIO.wait_for_edge(pttPin, GPIO.RISING) - while (input(pttPin) != 1): - sleep(0.5) +# GPIO.wait_for_edge(pttPin, GPIO.RISING) + while (input(ptt) != 1): + sleep(0.2) # GPIO.output(txLed, 0) output(txLed, 0) print("0") From 0aa1d7767ed5e3b29106b97a3e7771767a34241c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:52:17 -0400 Subject: [PATCH 0712/1744] Update transmit.py don't need sleep 20 at start --- transmit.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/transmit.py b/transmit.py index f795f989..7f5bc067 100644 --- a/transmit.py +++ b/transmit.py @@ -233,10 +233,6 @@ def camera_photo(): print("CubeSatSim v2.2 transmit.py starting...") -print("\nSleeping 20 seconds\n") - -sleep(20) - pd = 21 ptt = 20 txc_pin = 7 From 1bd0b8e008c0528783d079d7bad68980df981379 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 09:59:59 -0400 Subject: [PATCH 0713/1744] Update transmit.py input just print output --- transmit.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/transmit.py b/transmit.py index 7f5bc067..65006054 100644 --- a/transmit.py +++ b/transmit.py @@ -27,15 +27,17 @@ def input(pin): query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin try: result = subprocess.run(query, capture_output=True, text=True, check=True) - print(f"Command run was: {query}") - print("Sucess!") - print(f"Output of the command (stdout): {result.stdout}") +# print(f"Command run was: {query}") +# print("Sucess!") +# print(f"Output of the command (stdout): {result.stdout}") + print(f"{query}: {result.stdout}") return int(result.stdout) except subprocess.CalledProcessError as e: - print(f"Command failed with return code: {e.returncode}") - print(f"Command run was: {e.cmd}") - print(f"Output of the command (stdout): {e.stdout}") - print(f"Error output of the command (stderr): {e.stderr}") +# print(f"Command failed with return code: {e.returncode}") +# print(f"Command run was: {e.cmd}") +# print(f"Output of the command (stdout): {e.stdout}") +# print(f"Error output of the command (stderr): {e.stderr}") + print(f"{query}: -1") return -1 def setup(pin, config): From 9a4f5ff1f6daf5cac03801c91f4a5c5835bd207b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:07:56 -0400 Subject: [PATCH 0714/1744] Update transmit.py remove RPI.GPIO --- transmit.py | 105 ++++++---------------------------------------------- 1 file changed, 11 insertions(+), 94 deletions(-) diff --git a/transmit.py b/transmit.py index 65006054..65d30bd0 100644 --- a/transmit.py +++ b/transmit.py @@ -1,7 +1,5 @@ #!/usr/bin/env python -import RPi.GPIO as GPIO -#from RPi.GPIO import output #import subprocess import time from time import sleep @@ -15,48 +13,36 @@ import random import subprocess def output(pin, value): - if (pin != 30): - command = "gpio -g write " + str(pin) + " " + str(value) - system(command) - print(command) - else: # ptt pin - GPIO.output(pin, value) + command = "gpio -g write " + str(pin) + " " + str(value) + system(command) + print(command) def input(pin): # command = "gpio -g read " + str(pin) query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin + command = "gpio -g read " + str(pin) try: result = subprocess.run(query, capture_output=True, text=True, check=True) # print(f"Command run was: {query}") # print("Sucess!") # print(f"Output of the command (stdout): {result.stdout}") - print(f"{query}: {result.stdout}") + print(f"{command}: {result.stdout}") return int(result.stdout) except subprocess.CalledProcessError as e: # print(f"Command failed with return code: {e.returncode}") # print(f"Command run was: {e.cmd}") # print(f"Output of the command (stdout): {e.stdout}") # print(f"Error output of the command (stderr): {e.stderr}") - print(f"{query}: -1") + print(f"{command}: -1") return -1 def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": - if (pin != 30): - command = "gpio -g mode " + str(pin) + " " + config - system(command) - print(command) - else: # ptt pin - GPIO.setwarnings(False) - GPIO.setmode(GPIO.BCM) - if config == "out": - GPIO.setup(20, GPIO.OUT) - print("GPIO.setup(20, GPIO.OUT)") - else: - GPIO.setup(20, GPIO.IN) - print("GPIO.setup(20, GPIO.IN)") - else: - print(f"Unknown GPIO setup configuration: {config}") + command = "gpio -g mode " + str(pin) + " " + config + system(command) + print(command) +else: + print(f"Unknown gpio setup configuration: {config}") def blink(times): powerPin = 16 @@ -165,11 +151,9 @@ def increment_mode(): file.close() print(".mode file written") -# GPIO.setwarnings(False) output(txLed, 0) output(powerPin, 0) print("sudo reboot -h now") -# GPIO.setwarnings(False) setup(powerPin, "out") output(powerPin, 0); # system("reboot -h now") @@ -244,8 +228,6 @@ powerPin = 16 command_tx = True -# GPIO.setmode(GPIO.BCM) -# GPIO.setwarnings(False) setup(13, "up") setup(12, "up") setup(27, "up") @@ -261,12 +243,6 @@ if input(12) == False: else: print("No LPF") - -# GPIO.setup(txLed, GPIO.OUT) -# output(txLed, 0) - -# GPIO.setmode(GPIO.BCM) # Repeat to make LED work on Pi 4 -# GPIO.setwarnings(False) setup(txLed, "out") setup(pd, "out") @@ -291,8 +267,6 @@ battery_saver_check() # print(1) print(txLed) -# GPIO.setup(27, GPIO.OUT) -# GPIO.output(27, 0) debug_mode = 0 # change to 1 to debug transmit @@ -461,8 +435,6 @@ if __name__ == "__main__": try: f = open("/home/pi/CubeSatSim/command_control", "r") f.close() -# GPIO.setmode(GPIO.BCM) -# GPIO.setwarnings(False) setup(squelch, "up") ## pull up in case pin is not connected if input(squelch) == False: print("squelch not set correctly, no command input!") @@ -478,10 +450,6 @@ if __name__ == "__main__": print("command and control not activated") print(callsign) -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# print(txLed) -# print(1) -# setup(txLed, "out") query = ["grep", "VERSION_CODENAME=bullseye", "/etc/os-release"] try: @@ -549,8 +517,6 @@ if __name__ == "__main__": print("Don't transmit CW ID since APRS HAB mode is active") else: if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) print("Transmit CW ID") status = "" @@ -586,35 +552,20 @@ if __name__ == "__main__": else: print("Pacsat") # system("sudo systemctl restart pacsatsim") -# txPin = 27 -# pttPin = 20 - -# GPIO.setmode(GPIO.BCM) -# GPIO.setwarnings(False) -# GPIO.setup(txLed, GPIO.OUT) -# GPIO.output(txLed, 0) output(txLed, 0) print("0") -# GPIO.setup(pttPin, GPIO.IN) - while (True): sleep(0.1) - # GPIO.wait_for_edge(pttPin, GPIO.FALLING) while (input(ptt) != 0): sleep(0.2) -# GPIO.output(txLed, 1) output(txLed, 1) print("1") -# sleep(0.1) -# GPIO.wait_for_edge(pttPin, GPIO.RISING) while (input(ptt) != 1): sleep(0.2) -# GPIO.output(txLed, 0) output(txLed, 0) print("0") else: -# GPIO.output(powerPin, 0) print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: @@ -631,8 +582,6 @@ if __name__ == "__main__": system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # output(pd, 1) # output (ptt, 0) @@ -689,8 +638,6 @@ if __name__ == "__main__": system(command) ## chan = chan + 1 if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) if (txc): @@ -753,8 +700,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -786,8 +731,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -824,8 +767,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -862,8 +803,6 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -893,8 +832,6 @@ if __name__ == "__main__": if (command_tx == True): # command_control_check() -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) # battery_saver_check() @@ -923,9 +860,6 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) - -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# setup(txLed, "out") if (command_tx == True): # system("sudo nc -l 8080 | csdr convert_i16_f | csdr fir_interpolate_cc 2 | csdr dsb_fc | csdr bandpass_fir_fft_cc 0.002 0.06 0.01 | csdr fastagc_ff | sudo /home/pi/rpitx/sendiq -i /dev/stdin -s 96000 -f 434.9e6 -t float &") @@ -944,11 +878,7 @@ if __name__ == "__main__": # command_control_check() if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) -# print(txLed) -# print(1) if (mode == 'b'): sleep(4.2) @@ -984,11 +914,7 @@ if __name__ == "__main__": print("turn on FM rx") output(pd, 1) output(ptt, 1) -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# setup(txLed, "out") -# GPIO.setup(powerPin, GPIO.OUT) setup(squelch, "up") ## pull up in case pin is not connected -# GPIO.output(powerPin, 1) # was 0 # txf = float(tx) - 288.9 # print("Transmit frequency: ",txf) if (command_tx != True): @@ -998,8 +924,6 @@ if __name__ == "__main__": while True: if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) @@ -1023,9 +947,6 @@ if __name__ == "__main__": output(pd, 1) output(ptt, 1) -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi 4 -# setup(txLed, "out") - if (command_tx == True): system("sudo nc -l 8080 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 &") print("Turning LED on/off and listening for carrier") @@ -1038,11 +959,7 @@ if __name__ == "__main__": # output(txLed, 0) # command_control_check() if (command_tx == True): -# GPIO.setmode(GPIO.BCM) # added to make Tx LED work on Pi Zero 2 and Pi 4 -# setup(txLed, "out") output(txLed, 1) -# print(txLed) -# print(1) sleep(4.2) else: print("No Low Pass Filter so no telemetry transmit. See http://cubesatsim.org/wiki for instructions on how to build the LPF.") From f6821e6750ce344dc9fdf0e019afb873d6331107 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:08:50 -0400 Subject: [PATCH 0715/1744] Update transmit.py missing tab --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 65d30bd0..a1ac0991 100644 --- a/transmit.py +++ b/transmit.py @@ -41,7 +41,7 @@ def setup(pin, config): command = "gpio -g mode " + str(pin) + " " + config system(command) print(command) -else: + else: print(f"Unknown gpio setup configuration: {config}") def blink(times): From cf3e52a2d68c2f7152a827d7f4eb4a2782603b44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:22:00 -0400 Subject: [PATCH 0716/1744] Update install update pi_pacsat and pacsat_telem if changed --- install | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/install b/install index 7f2e7272..a9945eb7 100755 --- a/install +++ b/install @@ -505,6 +505,18 @@ if [ ! -f "$FILE" ]; then echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state fi +cd /home/pi/pi_pacsat/Debug/ + +git pull --no-rebase > .updated +grep 'changed' /home/pi/pi_pacsat/Debug/.updated +if [[ $(grep 'changed' /home/pi/pi_pacsat/Debug/.updated) ]]; then + + echo "updating pi_pacsat" + make clean + make all + FLAG=1 +fi + FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled if [ ! -f "$FILE" ]; then cd @@ -517,6 +529,19 @@ if [ ! -f "$FILE" ]; then make all fi +cd /home/pi/pacsat_telem/Debug/ + +git pull --no-rebase > .updated +# git checkout master-fox +grep 'changed' /home/pi/pacsat_telem/Debug/.updated +if [[ $(grep 'changed' /home/pi/pacsat_telem/Debug/.updated) ]]; then + + echo "updating pacsat_telem" + make clean + make all + FLAG=1 +fi + sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt From 30d189811c588b83e46fecdbee03ba3c57bfcdf2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:32:08 -0400 Subject: [PATCH 0717/1744] Update install rerun if install script is updated --- install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install b/install index a9945eb7..2c71a25a 100755 --- a/install +++ b/install @@ -428,6 +428,14 @@ if [ $checkout -eq 1 ]; then FLAG=1 echo "Running update script again" /home/pi/CubeSatSim/install + exit +fi + +grep 'install' /home/pi/CubeSatSim/.updated +if [[ $(grep 'install' /home/pi/CubeSatSim/.updated) ]]; then + echo "install script updated, running again" + /home/pi/CubeSatSim/install + exit fi make debug From 1f86ea0d8130b8211b8f9c58acbb6eee9179c4c6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:33:30 -0400 Subject: [PATCH 0718/1744] Update install add comment to update script --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 2c71a25a..6a705b6d 100755 --- a/install +++ b/install @@ -809,7 +809,7 @@ cd if [ "$noreboot" = "0" ] ; then - if [ $FLAG -eq 1 ]; then + if [ $FLAG -eq 1 ]; then # Not sure if this is needed echo "systemctl daemon-reload and reboot" sudo systemctl daemon-reload sudo reboot -h now From a5853945913c3774dc4f4c7e41b63f4743dbfdf7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:39:41 -0400 Subject: [PATCH 0719/1744] Update install add missing fi --- install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install b/install index 6a705b6d..d24d05cc 100755 --- a/install +++ b/install @@ -375,6 +375,7 @@ if [ -d "/home/pi/direwolf" ]; then else echo "Could not find the URL for the 'origin' remote for Direwolf" fi +fi if [ ! -d "/home/pi/direwolf" ]; then @@ -426,7 +427,7 @@ if [ $checkout -eq 1 ]; then git checkout $branch git pull --no-rebase > .updated FLAG=1 - echo "Running update script again" + echo "Running update again" /home/pi/CubeSatSim/install exit fi From 55021b4601d78743ae69d3979fc3c5d0adf77643 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 8 Mar 2026 10:46:09 -0400 Subject: [PATCH 0720/1744] Update install missing space before ] --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index d24d05cc..0152650b 100755 --- a/install +++ b/install @@ -366,7 +366,7 @@ if [ -d "/home/pi/direwolf" ]; then # Check if the command was successful and a URL was retrieved if [ $? -eq 0 ] && [ -n "$REPO_URL" ]; then - if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git"]; then + if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git" ]; then echo "Current Direwolf git repository URL is $REPO_URL" echo "Reinstalling Direwolf from https://github.com/wb2osz/direwolf.git" From 2bb215621c19ece8b2fc3c5a3cf4758ce4323f9d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 09:08:18 -0400 Subject: [PATCH 0721/1744] Update install enable cubesatsim --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 0152650b..3fcb3ead 100755 --- a/install +++ b/install @@ -618,7 +618,7 @@ if [ -f "$FILE" ]; then else echo "creating cubesatsim.service." sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service - sudo systemctl enable command + sudo systemctl enable cubesatsim FLAG=1 fi From 076e7b9725b62f2ea05ed163789c26c51146cf55 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 10:23:56 -0400 Subject: [PATCH 0722/1744] Update install move direwolf install message --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 3fcb3ead..7086ee4d 100755 --- a/install +++ b/install @@ -369,7 +369,6 @@ if [ -d "/home/pi/direwolf" ]; then if [ ! "$REPO_URL" = "https://github.com/wb2osz/direwolf.git" ]; then echo "Current Direwolf git repository URL is $REPO_URL" - echo "Reinstalling Direwolf from https://github.com/wb2osz/direwolf.git" sudo rm -r /home/pi/direwolf fi else @@ -379,6 +378,7 @@ fi if [ ! -d "/home/pi/direwolf" ]; then + echo "Installing Direwolf from https://github.com/wb2osz/direwolf.git" cd git clone https://github.com/wb2osz/direwolf.git cd direwolf From 37af54884cf55cea67ffb163f7453650addd8c8a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 11:33:35 -0400 Subject: [PATCH 0723/1744] Update install fix direwolf url check --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 7086ee4d..dd989b7a 100755 --- a/install +++ b/install @@ -360,6 +360,8 @@ sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev l if [ -d "/home/pi/direwolf" ]; then + cd + cd direwolf # Get the URL of the 'origin' remote REPO_URL=$(git config --get remote.origin.url) From 19a2bdb41575f5e5b6e38b086e5bd66db56bacb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 11:41:54 -0400 Subject: [PATCH 0724/1744] Update install only download PacSat Ground if not installed --- install | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/install b/install index dd989b7a..429931e1 100755 --- a/install +++ b/install @@ -559,21 +559,20 @@ sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt sudo raspi-config nonint do_vnc 0 -cd /tmp -wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz -tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop +if [ ! -d "/home/pi/PacSatGround" ]; then -rm PacsatGround_unix_0_46o.tar.gz + cd /tmp + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz + tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop + rm PacsatGround_unix_0_46o.tar.gz + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + mkdir /home/pi/PacSatGround + sudo usermod -a -G gpio pi + sudo apt-get install default-jdk -y -cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ - -mkdir /home/pi/PacSatGround - -sudo usermod -a -G gpio pi - -sudo apt-get install default-jdk -y +fi cd From 0c430f7586942289337d9094b3b9ae33e308a7b4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 15:44:07 +0000 Subject: [PATCH 0725/1744] delete update and replace with link to install --- update | 480 +-------------------------------------------------------- 1 file changed, 1 insertion(+), 479 deletions(-) mode change 100755 => 120000 update diff --git a/update b/update deleted file mode 100755 index 3ae8add9..00000000 --- a/update +++ /dev/null @@ -1,479 +0,0 @@ -#!/bin/bash - -echo -e "\nupdate script for CubeSatSim v2.2\n" - -if [ "$1" = "n" ] ; then -# if [ -z "$2" ] ; then - noreboot=1 -else - noreboot=0 -fi - -# echo "No reboot" -# echo $noreboot - -sudo rm /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/id.txt /home/pi/CubeSatSim/cw.txt > /dev/null 2>&1 - -if [ "$1" = "u" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - - sudo apt-get install -y git libasound2-dev i2c-tools build-essential libgd-dev libmagic-dev python3-pip minicom - -fi - -sudo apt-get install -y python3-smbus cmake - -sudo sed -i 's/update.sh/update /g' /etc/motd - -sudo sed -i 's/installed and/installed\nand/g' /etc/motd - -sudo sed -i 's/more information/more\ninformation/g' /etc/motd - -sudo sed -i 's/update to/update\nto/g' /etc/motd - -#sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 -sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt # remove single core - -cd /home/pi/CubeSatSim - -git pull --no-rebase > .updated - -make debug - -FILE=/home/pi/CubeSatSim/command_tx -if [ -f "$FILE" ]; then - echo "$FILE exists." -else - echo "creating $FILE" - echo "True\n" > /home/pi/CubeSatSim/command_tx -fi - -FILE=/home/pi/CubeSatSim/command_count.txt -if [ -f "$FILE" ]; then - echo "$FILE exists." -else - echo "creating $FILE" - echo "0\n" > /home/pi/CubeSatSim/command_count.txt -fi - -FLAG=0 - -if [[ $(diff systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service) ]]; then - echo "changed cubesatsim.service." - sudo cp /home/pi/CubeSatSim/systemd/cubesatsim.service /etc/systemd/system/cubesatsim.service - FLAG=1 -else - echo "no changes to cubesatsim.service." -fi - -FILE=/etc/systemd/system/rpitx.service -if [ -f "$FILE" ]; then - sudo systemctl disable rpitx - sudo rm /etc/systemd/system/rpitx.service -fi - -FILE=/etc/systemd/system/transmit.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then - echo "changed transmit.service." - sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - FLAG=1 - else - echo "no change to transmit.service." - fi -else - echo "creating transmit.service." - sudo cp /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service - FLAG=1 -fi - -FILE=/etc/systemd/system/command.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/command.service /etc/systemd/system/command.service) ]]; then - echo "changed command.service." - sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - FLAG=1 - else - echo "no change to command.service." - fi -else - echo "creating command.service." - sudo cp /home/pi/CubeSatSim/systemd/command.service /etc/systemd/system/command.service - sudo systemctl enable command - FLAG=1 -fi - -FILE=/etc/systemd/system/pacsatsim.service -if [ -f "$FILE" ]; then - if [[ $(diff systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then - echo "changed command.service." - sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service - FLAG=1 - else - echo "no change to pacsatsim.service." - fi -else - echo "creating pacsatsim.service." - sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service - sudo systemctl enable pacsatsim - FLAG=1 -fi - -FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg -if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 1." - cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg -fi - -FILE=/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg -if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 2." - cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg -fi - -grep 'update' /home/pi/CubeSatSim/.updated -if [[ $(grep 'update' /home/pi/CubeSatSim/.updated) ]]; then - echo "update script updated, running again" - /home/pi/CubeSatSim/update -fi - -if [ ! -d "/home/pi/PiSSTVpp" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - - sudo apt-get install -y python-picamera python3-picamera build-essential libgd-dev libmagic-dev - - - cd - - git clone https://github.com/alanbjohnston/PiSSTVpp.git - - cd PiSSTVpp - - make pisstvpp - - cd - - - sudo raspi-config nonint do_camera 0 - - - FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg - if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 1." - cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg - fi - - FILE=/home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg - if [ ! -f "$FILE" ]; then - echo "Copying SSTV image 2." - cp /home/pi/CubeSatSim/sstv/sstv_image_2_320_x_256.jpg /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg - fi - -# echo "You need to reboot to complete this update. Reboot now (y/n)?" - -# read -r ANS - -# if [ "$ANS" = "y" ]; then - -# sudo reboot now - -# else - -# echo "The CubeSatSim software may not work correctly until you reboot." - -# fi - -fi - -if [ ! -d "/home/pi/rpitx" ]; then - - cd - git clone https://github.com/alanbjohnston/rpitx.git - cd rpitx - ./install.sh - cd -else - - if [[ $(grep 'SYNCWITHPWM' /home/pi/rpitx/src/librpitx/src/fskburst.h) ]]; then - echo "rpitx library already updated" - else - echo "updating rpitx" - cd /home/pi/rpitx - git pull - ./update.sh - cd - fi -fi - -if [ ! -d "/home/pi/WiringPi" ]; then - - cd - - git clone https://github.com/PinkFreud/WiringPi - cd WiringPi - ./build debian - - sudo dpkg -i debian-template/wiringpi-2.61-1.deb - - cd - - cd CubeSatSim - make debug - - FLAG=1 - - cd - -fi - -cd /home/pi/pi-power-button - -git checkout master - - - git pull --no-rebase > .updated_p - - grep 'changed' /home/pi/pi-power-button/.updated_p - if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then - - echo "updating pi-power-button." - - script/install - - FLAG=1 - - - else - echo "nothing to do for pi-power-button." - fi - - if [[ $(grep 'dtparam=audio=on' /boot/config.txt) ]]; then - echo "dtparam=audio=on already in /boot/config.txt" - else - echo "adding dtparam=audio=on to /boot/config.txt" - sudo sh -c 'echo "\ndtparam=audio=on" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'dtoverlay=audremap,enable_jack=on' /boot/config.txt) ]]; then - echo "dtoverlay=audremap,enable_jack=on already in /boot/config.txt" - else - echo "adding dtoverlay=audremap,enable_jack=on to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=audremap,enable_jack=on" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'dtoverlay=pwm,pin=18,func=2' /boot/config.txt) ]]; then - echo "dtoverlay=pwm,pin=18,func=2 already in /boot/config.txt" - else - echo "adding dtoverlay=pwm,pin=18,func=2 to /boot/config.txt" - sudo sh -c 'echo "\ndtoverlay=pwm,pin=18,func=2" >> /boot/config.txt' - FLAG=1 - - cd /home/pi/pi-power-button - git pull --no-rebase - git checkout reboot-mode-change - script/install - -# sudo apt-get update && sudo apt-get dist-upgrade -y - sudo apt-get update -y - sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 python3-pil - sudo pip3 install adafruit-blinka RPI.GPIO adafruit-extended-bus adafruit-circuitpython-ina219 pillow - - fi - - if [[ $(grep 'disable_splash=1' /boot/config.txt) ]]; then - echo "disable_splash=1 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\ndisable_splash=1" >> /boot/config.txt' - FLAG=1 - fi - - if [[ $(grep 'boot_delay=0' /boot/config.txt) ]]; then - echo "boot_delay=0 already in /boot/config.txt" - else - echo "adding to /boot/config.txt" - sudo sh -c 'echo "\nboot_delay=0" >> /boot/config.txt' - FLAG=1 - fi - - if ! grep -q force_turbo=1 /boot/config.txt ; then - sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt' - FLAG=1 - fi - -#if [ ! -f "/home/pi/CubeSatSim/telem_string.txt" ]; then - -# sudo apt-get update && sudo apt-get dist-upgrade -y - -# sudo apt-get install -y libjpeg-dev zlib1g-dev libfreetype6-dev liblcms1-dev libopenjp2-7 libtiff5 -y - -# sudo pip3 install pillow - -#fi - -if [ ! -d "/home/pi/pi_pacsat" ]; then - - FLAG=1 - - cd - - git clone https://github.com/alanbjohnston/g0kla_common.git - - cd g0kla_common/Debug/ - - make all - - sudo ./install.sh - - cd - - git clone https://github.com/ac2cz/pi_pacsat.git - - cd pi_pacsat/Debug - - make all - - mkdir /home/pi/PacSat - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir - -# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - - export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH - - value=`cat /home/pi/CubeSatSim/sim.cfg` - echo "$value" > /dev/null - set -- $value - - echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=$1-12" >> pacsat.config - echo "broadcast_callsign=$1-11" >> pacsat.config - echo "digi_callsign=$1-1" >> pacsat.config - echo "max_frames_in_tx_buffer=5" >> pacsat.config - - echo "pb_open=1" > pacsat.state - echo "uplink_open=1" >> pacsat.state - - sudo sed -i 's/#hdmi_group=1/hdmi_group=2/g' /boot/config.txt - sudo sed -i 's/#hdmi_mode=1/hdmi_mode=16/g' /boot/config.txt - sudo sed -i 's/#hdmi_force_hotplug=1/hdmi_force_hotplug=1/g' /boot/config.txt - - sudo raspi-config nonint do_vnc 0 - -fi - -if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then - - echo "Installing PacSat Ground Station!" - - if [ ! -d "/home/pi/Desktop" ]; then - - echo - echo "You won't be able to run the PacSat Ground Station as this Pi OS does not seem to have the Desktop GUI installed." - echo - - else - - cd /tmp - - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz - - tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop - - rm PacsatGround_unix_0_46o.tar.gz - - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46m/* /home/pi/Desktop/PacsatGround/spacecraft/ - - mkdir /home/pi/PacSatGround - - sudo usermod -a -G gpio pi - - sudo apt-get install default-jdk -y - - fi - -cd - -fi - -cd /home/pi/direwolf - -#git status - -#git status | grep 'invert' - -if [[ ! $(git status | grep 'master-sync-invert') ]]; then - - echo "updating direwolf to master-sync-invert version" - - git pull --no-rebase - git checkout master-sync-invert - mkdir build - cd build - cmake .. - make -j4 - sudo make install - make install-conf - cd - -fi - -changed=0 -value=`cat /home/pi/CubeSatSim/sim.cfg` -# echo "$value" -echo "$value" > /dev/null -set -- $value - -if [ -z "$1" ] ; then n1="AMSAT" ; changed=1 ; else n1=$1 ; fi # callsign -if [ -z "$2" ] ; then n2="0" ; changed=1 ; else n2=$2 ; fi # reset count -if [ -z "$3" ] ; then n3="0" ; changed=1 ; else n3=$3 ; fi # lat -if [ -z "$4" ] ; then n4="0" ; changed=1 ; else n4=$4 ; fi # lon -if [ -z "$5" ] ; then n5="no" ; changed=1 ; else n5=$5 ; fi # sim mode -if [ -z "$6" ] ; then n6="3" ; changed=1 ; else n6=$6 ; fi # squelch -if [ -z "$7" ] ; then n7="434.9000" ; changed=1 ; else n7=$7 ; fi # transmit frequency -if [ -z "$8" ] ; then n8="435.0000" ; changed=1 ; else n8=$8 ; fi # receive frequency -if [ -z "$9" ] ; then n9="no" ; changed=1 ; else n9=$9 ; fi # hab mode -if [ -z "${10}" ] ; then m1="0" ; changed=1 ; else m1=${10} ; fi # rx pl code -if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code - -if [ $changed -eq 1 ]; then - echo -e "Current sim.cfg configuration file:" - echo - echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} - echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" - echo - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 > /home/pi/CubeSatSim/sim.cfg - echo -fi - -if [ "$noreboot" = "0" ] ; then - - if [ $FLAG -eq 1 ]; then - echo "systemctl daemon-reload and reboot" - sudo systemctl daemon-reload - sudo reboot -h now -# sudo cubesatsim - else - grep 'changed' /home/pi/CubeSatSim/.updated - if [[ $(grep 'changed' /home/pi/CubeSatSim/.updated) ]]; then - echo "reboot due to code changes " | wall - sudo reboot -h now -# sudo cubesatsim - else - echo "nothing to do." - fi - fi -else - if [ $FLAG -eq 1 ]; then - echo "reboot needed for changes to take effect" - fi -fi - -echo "CubeSatSim update complete." diff --git a/update b/update new file mode 120000 index 00000000..f7ffc47a --- /dev/null +++ b/update @@ -0,0 +1 @@ +install \ No newline at end of file From b76f9697ef73ce51ede54af8187fe011cf9cddb3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 15:04:06 -0400 Subject: [PATCH 0726/1744] Update direwolf-pacsatsim-pwm.conf update to work with Bookworm --- direwolf/direwolf-pacsatsim-pwm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 58667777..65a5bcc3 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,6 +1,6 @@ #ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 -PTT GPIO -20 +PTT GPIOD piochip0 -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 62781b10766ae5c69cf90be95f0cf4f31fd2daaa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 9 Mar 2026 15:25:23 -0400 Subject: [PATCH 0727/1744] Update direwolf-pacsatsim-pwm.conf fix typo --- direwolf/direwolf-pacsatsim-pwm.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 65a5bcc3..9dc44e29 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -1,6 +1,6 @@ #ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 -PTT GPIOD piochip0 -20 +PTT GPIOD gpiochip0 -20 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 8a2b7d1e198ec3e60fc13dcfec64bd0ccbe3e6c0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:10:16 -0400 Subject: [PATCH 0728/1744] Update main.h add python venv --- main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main.h b/main.h index 082f230c..08a9ad5e 100644 --- a/main.h +++ b/main.h @@ -202,6 +202,7 @@ char sensor_string[SENSOR_FIELDS][32]; int test_i2c_bus(int bus); //const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/python/voltcurrent.py "; +const char pythonVenv[] = "source /home/pi/venv/bin/activate"; const char pythonCmd[] = "/home/pi/venv/bin/python3 -u /home/pi/CubeSatSim/ina219.py "; char pythonStr[100], pythonConfigStr[100], busStr[10]; int map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; From 71a16255bdbaf4f14d2c5c9c3b938c6a4c45aeb3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:12:14 -0400 Subject: [PATCH 0729/1744] Update main.c add python env activation --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index a34859e4..a7b04e4a 100644 --- a/main.c +++ b/main.c @@ -617,6 +617,8 @@ int main(int argc, char * argv[]) { strcat(pythonConfigStr, " c"); fprintf(stderr, "pythonConfigStr: %s\n", pythonConfigStr); + + FILE *file2 = sopen(pythonVenv); // activate venv file1 = sopen(pythonConfigStr); // python sensor polling function From 0407da438df9aa4bb1e7fd6b5925ff67e95b3342 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:20:09 -0400 Subject: [PATCH 0730/1744] Update telem.c add venv --- telem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telem.c b/telem.c index ce4f14c3..e8a498e4 100644 --- a/telem.c +++ b/telem.c @@ -30,6 +30,9 @@ int main(int argc, char *argv[]) { strcat(pythonConfigStr, " s"); char cmdbuffer[1000]; + + FILE *file2 = sopen(pythonVenv); // activate venv + FILE *file1 = sopen(pythonConfigStr); // try new function fgets(cmdbuffer, 1000, file1); if (debug == ON) From f74042e7e28fff73d08d7cc0c1c596827dd66568 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 15:21:12 -0400 Subject: [PATCH 0731/1744] Update main.c remove test for i2c-bus 11 --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index a7b04e4a..a7b50540 100644 --- a/main.c +++ b/main.c @@ -330,13 +330,15 @@ int main(int argc, char * argv[]) { map[MINUS_X] = MINUS_Y; map[PLUS_Z] = MINUS_X; map[MINUS_Y] = PLUS_Z; - +/* if (access("/dev/i2c-11", W_OK | R_OK) >= 0) { // Test if I2C Bus 11 is present printf("/dev/i2c-11 is present\n\n"); snprintf(busStr, 10, "%d %d", test_i2c_bus(1), test_i2c_bus(11)); } else { snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); } +*/ + snprintf(busStr, 10, "%d %d", i2c_bus1, i2c_bus3); FILE * os_test = popen("cat /etc/os-release", "r"); fgets(cmdbuffer, 1000, os_test); From 6f2609dcd40a5c450a19fdaad69bb85d84d205db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 11 Mar 2026 16:39:53 -0400 Subject: [PATCH 0732/1744] Update direwolf-pacsatsim-pwm.conf add DIGIPEAT --- direwolf/direwolf-pacsatsim-pwm.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf index 9dc44e29..0b220148 100644 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ b/direwolf/direwolf-pacsatsim-pwm.conf @@ -17,3 +17,5 @@ TXDELAY 1000 TXTAIL 10 #TXTAIL 1 FULLDUP OFF + +DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From 87ded092284e6e3127d50a365efddc00b33ab5c1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 10:33:59 -0400 Subject: [PATCH 0733/1744] Update pacsat.sh change reset wording --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 321907d2..9ffc9657 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -21,7 +21,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround echo - echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" sleep 10 @@ -32,7 +32,7 @@ if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then mkdir /home/pi/PacSatGroundLoop echo - echo "The first time you run the Ground Station, you will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" sleep 10 From 7fab574ea90d6f100149447db3563cb7c916b59d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:02:04 -0400 Subject: [PATCH 0734/1744] Update command add /home/pi/venv/bin/ --- command | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/command b/command index 4021f59b..2356a1ff 100755 --- a/command +++ b/command @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nCommand and Control script for CubeSatSim v2.1\n" +echo -e "\nCommand and Control script for CubeSatSim v2.2\n" sudo modprobe snd-aloop @@ -60,11 +60,11 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "debug mode" - direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d else - direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py + direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py fi else @@ -109,11 +109,11 @@ else # echo "debug mode" -# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d +# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d # else -# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py +# direwolf -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py # fi @@ -130,11 +130,11 @@ else echo "debug mode" - python3 /home/pi/CubeSatSim/squelch_cc.py d + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py d else - python3 /home/pi/CubeSatSim/squelch_cc.py + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py fi fi From ea18e415f06fba00592f95deda1606ff65261c8d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:11:21 -0400 Subject: [PATCH 0735/1744] Update dtmf_aprs_cc.py add echos --- dtmf_aprs_cc.py | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 6afef09e..39af09e0 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -42,94 +42,98 @@ if __name__ == "__main__": mode = 'a' change_mode = True - if ((line.find(":t1#")) > 0): + elif ((line.find(":t1#")) > 0): system("echo '\nAPRS Mode!!\n'") mode = 'a' change_mode = True - if ((line.find("MODE=f")) > 0): + elif ((line.find("MODE=f")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - if ((line.find(":t2#")) > 0): + elif ((line.find(":t2#")) > 0): system("echo '\nFSK Mode!!\n'") mode = 'f' change_mode = True - if ((line.find("MODE=b")) > 0): + + elif ((line.find("MODE=b")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - if ((line.find(":t3#")) > 0): + elif ((line.find(":t3#")) > 0): system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True - if ((line.find("MODE=s")) > 0): + elif ((line.find("MODE=s")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - if ((line.find(":t4#")) > 0): + elif ((line.find(":t4#")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' change_mode = True - if ((line.find("MODE=m")) > 0): + elif ((line.find("MODE=m")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - if ((line.find(":t5#")) > 0): + elif ((line.find(":t5#")) > 0): system("echo '\nCW Mode!!\n'") mode = 'm' change_mode = True - if ((line.find("MODE=e")) > 0): + elif ((line.find("MODE=e")) > 0): system("echo '\nRepeater Mode!!\n'") mode = 'e' change_mode = True - if ((line.find(":t6#")) > 0): + elif ((line.find(":t6#")) > 0): system("echo '\nFUNcube Mode!!\n'") mode = 'j' change_mode = True - if ((line.find("MODE=G")) > 0): + elif ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") mode = 'p' change_mode = True - if ((line.find(":t8#")) > 0): + elif ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") mode = 'p' change_mode = True - if ((line.find("MODE=n")) > 0): + elif ((line.find("MODE=n")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - if ((line.find(":t11#")) > 0): + elif ((line.find(":t11#")) > 0): system("echo '\nTransmit Commands Mode!!\n'") mode = 'n' change_mode = True - if ((line.find("MODE=o")) > 0): + elif ((line.find("MODE=o")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True counter = (counter + 1) % 2 - if ((line.find(":t10#")) > 0): + elif ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True + + system("echo 'before if'") if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice if (mode == 'f'): blink(2) sleep(1) + system("echo 'after if'") elif (mode == 'b'): blink(3) @@ -174,7 +178,7 @@ if __name__ == "__main__": print("Can't write command_count file!") print("Command_count: ") print(command_count) - + system("echo 'print command count'") GPIO.output(txLed, 0) GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") @@ -182,6 +186,7 @@ if __name__ == "__main__": print("\n/home/pi/CubeSatSim/config -" + mode) system("/home/pi/CubeSatSim/config -" + mode) + system("echo 'config'") change_mode = False From 21782f6149a6ce32054d659d6d41dc70ae900b7d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:13:10 -0400 Subject: [PATCH 0736/1744] Update dtmf_aprs_cc.py remove GPIO --- dtmf_aprs_cc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 39af09e0..64cd49d3 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -179,8 +179,8 @@ if __name__ == "__main__": print("Command_count: ") print(command_count) system("echo 'print command count'") - GPIO.output(txLed, 0) - GPIO.output(powerPin, 0) + # GPIO.output(txLed, 0) + # GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") From 09eb0fbf367d42144a5f171fdde8296c27dfb2c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:16:34 -0400 Subject: [PATCH 0737/1744] Update dtmf_aprs_cc.py change to gpio command --- dtmf_aprs_cc.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 64cd49d3..6a77379c 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -13,7 +13,7 @@ def blink(times): # GPIO.output(27, 0) sleep(0.1) system("gpio write 27 1") -# GPIO.output(27, 1) +# output(27, 1) sleep(0.1) if __name__ == "__main__": @@ -179,6 +179,8 @@ if __name__ == "__main__": print("Command_count: ") print(command_count) system("echo 'print command count'") + system("gpio write " + str(txLed) + " 0") + system("gpio write " + str(powerPin) + " 0") # GPIO.output(txLed, 0) # GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") From 77e8cc788db724b67bfd2392cb4541f697e887d9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:18:12 -0400 Subject: [PATCH 0738/1744] Update dtmf_aprs_cc.py cleanup --- dtmf_aprs_cc.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 6a77379c..32b614d7 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -1,7 +1,5 @@ import sys from os import system -#import RPi.GPIO as GPIO -#from RPi.GPIO import output from time import sleep import logging logging.basicConfig(format='%(message)s') @@ -10,7 +8,6 @@ logging.basicConfig(format='%(message)s') def blink(times): for i in range(times): system("gpio write 27 0") -# GPIO.output(27, 0) sleep(0.1) system("gpio write 27 1") # output(27, 1) @@ -125,15 +122,12 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - - system("echo 'before if'") if (debug_mode == False) and (change_mode == True) and (counter == 1): # skip every other APRS command since Direwolf prints them twice if (mode == 'f'): blink(2) sleep(1) - system("echo 'after if'") elif (mode == 'b'): blink(3) @@ -178,19 +172,14 @@ if __name__ == "__main__": print("Can't write command_count file!") print("Command_count: ") print(command_count) - system("echo 'print command count'") system("gpio write " + str(txLed) + " 0") system("gpio write " + str(powerPin) + " 0") - # GPIO.output(txLed, 0) - # GPIO.output(powerPin, 0) system("sudo systemctl stop transmit") # system("sudo systemctl stop cubesatsim") print("\n/home/pi/CubeSatSim/config -" + mode) system("/home/pi/CubeSatSim/config -" + mode) - system("echo 'config'") - - + change_mode = False except: print("Error reading line (probably due to UTF-8 issue)") From c618768637d25b4cb759dcae13edfff95bc3670f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:51:40 -0400 Subject: [PATCH 0739/1744] Update dtmf_aprs_cc.py cleanup --- dtmf_aprs_cc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 32b614d7..e776b2f5 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -10,7 +10,6 @@ def blink(times): system("gpio write 27 0") sleep(0.1) system("gpio write 27 1") -# output(27, 1) sleep(0.1) if __name__ == "__main__": From 7d161c65a76813edc9b55d56c8dd3f8ae93f1e14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 13:58:06 -0400 Subject: [PATCH 0740/1744] Update config fix command_count.txt --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 67f3c90e..73eae931 100755 --- a/config +++ b/config @@ -876,7 +876,7 @@ elif [ "$1" = "-R" ]; then echo echo "Current commands count is:" - cat /home/pi/CubeSatSim/commands_count.txt + cat /home/pi/CubeSatSim/command_count.txt echo echo "Do you want to reset the commands count to zero (y/n) " From 6ef472e7854f945fe306872f0800f64fb6dfe314 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 14:39:26 -0400 Subject: [PATCH 0741/1744] Update install remove aprs files on update --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index 429931e1..13f9d3f0 100755 --- a/install +++ b/install @@ -12,6 +12,9 @@ if [ -f "$FILE" ]; then echo -e "\nUpdate script for CubeSatSim v2.2\n" + sudo rm /home/pi/CubeSatSim/telem.wav &>/dev/null + sudo rm /home/pi/CubeSatSim/t.txt &>/dev/null + if [ -z "$1" ] ; then checkout=0 else From 0f023afeb391ed21ec927fafdc799b1fac69e82a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 15:09:15 -0400 Subject: [PATCH 0742/1744] Update install also delete uptime file if update --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 13f9d3f0..2492d91e 100755 --- a/install +++ b/install @@ -14,6 +14,7 @@ if [ -f "$FILE" ]; then sudo rm /home/pi/CubeSatSim/telem.wav &>/dev/null sudo rm /home/pi/CubeSatSim/t.txt &>/dev/null + sudo rm /home/pi/CubeSatSim/uptime &>/dev/null if [ -z "$1" ] ; then checkout=0 From c76b1076cff85446ba5d96fc293f7f5d758b8674 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 12 Mar 2026 15:30:04 -0400 Subject: [PATCH 0743/1744] Update dtmf_aprs_cc.py remove counter on APRS mode 0 --- dtmf_aprs_cc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index e776b2f5..9ac5909f 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -115,7 +115,7 @@ if __name__ == "__main__": system("echo '\nBeacon Mode toggle!!\n'") mode = 'o' change_mode = True - counter = (counter + 1) % 2 +# counter = (counter + 1) % 2 elif ((line.find(":t10#")) > 0): system("echo '\nBeacon Mode toggle!!\n'") From e37992faf0674b735ccf9d32f540e30ef9e6f8ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:34:07 -0400 Subject: [PATCH 0744/1744] Update PacSatSim_rttelemetry.csv Altitude times 100 --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index ca11e389..f0873680 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -23,7 +23,7 @@ 21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells 23,int,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -24,float,Altitude,12,m,12,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude +24,float,Altitude,12,m,37,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count 26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication 27,float,IHUcpuTemp,12,C,5,Computer Hardware,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi From 5ce5e937dd59eed150e16d9fb616579670d5ae8e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:34:30 -0400 Subject: [PATCH 0745/1744] Update PacSatSim-coef.csv add Times 100 for Alt, use Sint16 for currents --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 48187077..16eac43c 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -29,12 +29,13 @@ 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW 29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset -31,-,Offset,-2048,1,0,0,0,0,None,0,4096,Offset +31,-,Offset,-2048,1,0,0,0,0,Sint16,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED +37,-,Times100,0,100.0,0,0,0,0,Sint16,0,4096,Multiply by 100 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From 4d09937032df7cc5d81b1ace36f3c0f4c21d5738 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:42:06 -0400 Subject: [PATCH 0746/1744] Update PacSatSim-coef.csv Try Counts for integers --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 16eac43c..46bcee48 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -29,13 +29,13 @@ 28,-,SSTVMode,0,0,0,0,0,0,Enum,0,4096,MartinM1:MartinM2:ScottieS1:ScottieS2:Robot36:PasokonP3:PasokonP5:PasokonP7:PD90:PD120:PD160:PD180:PD240:PD290:Robot8BW:Robot24BW 29,-,DivideBy100,0,0.01,0,0,0,0,None,0,4096,Divide by 100 30,-,DivideBy100Offset,-20.48,0.01,0,0,0,0,None,0,4096,Divide by 100 with Offset -31,-,Offset,-2048,1,0,0,0,0,Sint16,0,4096,Offset +31,-,Offset,-2048,1,0,0,0,0,Counts,0,4096,Offset 32,-,DivideBy10Offset,-204.8,0.1,0,0,0,0,None,0,4096,Divide by 10 with Offset 33,-,Status,0,0,0,0,0,0,Enum,0,4096,OFF:ON 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED -37,-,Times100,0,100.0,0,0,0,0,Sint16,0,4096,Multiply by 100 +37,-,Times100,0,100.0,0,0,0,0,Counts,0,4096,Multiply by 100 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From d87e304020e5577b494330501b36769fbf008ec7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:45:38 -0400 Subject: [PATCH 0747/1744] Update PacSatSim_rttelemetry.csv counts for pressure --- spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv index f0873680..24298614 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim_rttelemetry.csv @@ -22,7 +22,7 @@ 20,int,negZi,12,mA,31,-Z Panel,12,2,3,Current,INA219 -Z solar panel Current 21,float,BATT2_V,12,V,29,Battery2,5,1,3,Battery2 Voltage,INA219 Battery2 Voltage 22,float,spin,12,rpm,32,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -23,int,Pressure,12,hPa,0,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure +23,int,Pressure,12,hPa,2,Experiments,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure 24,float,Altitude,12,m,37,Experiments,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude 25,float,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count 26,float,rssi,12,dBm,31,Radio,1,1,3,RSSI,Received Signal Strength Indication From 248f92f053e08bbc9147d2f85564b40958fefa2b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 13:51:04 -0400 Subject: [PATCH 0748/1744] Update PacSatSim-coef.csv change to times 10 --- spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv index 46bcee48..cb9f0537 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv +++ b/spacecraft/PacSatGround_0.46o/PacSatSim-coef.csv @@ -35,7 +35,7 @@ 34,-,CommandStatus,0,0,0,0,0,0,Enum,0,4096,OFF:Carrier:DTMF/APRS 35,-,FailStatus,0,0,0,0,0,0,Enum,0,4096,OK:FAIL 36,-,AntStatus,0,0,0,0,0,0,Enum,0,4096,STOWED:DEPLOYED -37,-,Times100,0,100.0,0,0,0,0,Counts,0,4096,Multiply by 100 +37,-,Times10,0,10.0,0,0,0,0,Counts,0,4096,Multiply by 10 NOTES:,,,,,,,,,,,, Serial,Ignore,name,a,b,c,d,e,f,format,low limit,high limit,Comment Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,Echo value = a + bx + cx^2 + dx^3 + ex^4 + fx^5,,,,,,,,,,, From e046477303d7f48cb326ee16137c2a3d1b5c5e0d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 16:57:18 -0400 Subject: [PATCH 0749/1744] Update config for -o start and stop pacsatsim --- config | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/config b/config index 73eae931..7d0ed195 100755 --- a/config +++ b/config @@ -1139,8 +1139,9 @@ elif [ "$1" = "-o" ]; then value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value + MODE=$1 - if [ "$1" == "n" ]; then + if [ "$MODE" == "n" ]; then transmit_command "o" @@ -1151,34 +1152,27 @@ elif [ "$1" = "-o" ]; then FILE=/home/pi/CubeSatSim/beacon_off if [ -f "$FILE" ]; then - echo "Transmit beacon telemetry is off" -# echo -# echo "Do you want to turn beacon telemetry ON (y/n) " -# read reset - - reset="y" + echo "Transmit beacon telemetry is off" echo - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Turn beacon telemetry ON" - sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 - sudo systemctl restart transmit - # restart=1 + echo "Turn beacon telemetry ON" + sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 + sudo systemctl restart transmit + if [ "$MODE" = "p" ]; then + sudo systemctl restart pacsatsim fi else - echo "Transmit beacon telemetry is on" -# echo -# echo "Do you want to turn beacon telemetry OFF (y/n) " -# read reset - reset="y" + echo "Transmit beacon telemetry is on" echo - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Turn beacon telemetry OFF" - touch /home/pi/CubeSatSim/beacon_off + echo "Turn beacon telemetry OFF" + touch /home/pi/CubeSatSim/beacon_off + if [ "$MODE" = "p" ]; then + sudo systemctl stop pacsatsim + sudo systemctl stop transmit + else sudo systemctl restart transmit - # restart=1 fi fi sleep 3 From 04b2b7be846a838b192587c5b35b297f4e389933 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 17:27:56 -0400 Subject: [PATCH 0750/1744] Update transmit.py only do PacSat txLED if not safe mode --- transmit.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index a1ac0991..c431b015 100644 --- a/transmit.py +++ b/transmit.py @@ -556,15 +556,18 @@ if __name__ == "__main__": print("0") while (True): - sleep(0.1) - while (input(ptt) != 0): - sleep(0.2) - output(txLed, 1) - print("1") - while (input(ptt) != 1): - sleep(0.2) - output(txLed, 0) - print("0") + if (txc): + sleep(0.1) + while (input(ptt) != 0): + sleep(0.2) + output(txLed, 1) + print("1") + while (input(ptt) != 1): + sleep(0.2) + output(txLed, 0) + print("0") + else: + sleep(10) else: print("Transmit APRS Commands") system("sudo systemctl stop command") From 22a9c75cdd3be0305e1819129e60f322b05875db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 17:42:49 -0400 Subject: [PATCH 0751/1744] Create pacsatsim-direwolf-pwm-loop.conf --- direwolf/pacsatsim-direwolf-pwm-loop.conf | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 direwolf/pacsatsim-direwolf-pwm-loop.conf diff --git a/direwolf/pacsatsim-direwolf-pwm-loop.conf b/direwolf/pacsatsim-direwolf-pwm-loop.conf new file mode 100644 index 00000000..a459abac --- /dev/null +++ b/direwolf/pacsatsim-direwolf-pwm-loop.conf @@ -0,0 +1,21 @@ +#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 +ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 +PTT GPIOD gpiochip0 -27 +MYCALL AMSAT-12 +CHANNEL 0 +MODEM 1200 +##FULLDUP ON +##TXDELAY 15 +#FIX_BITS 1 AX25 + +# +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +#TXDELAY 100 +TXTAIL 10 +#TXTAIL 1 +FULLDUP OFF + +DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From a5d8b49f38ab727cc9f3dd45506e0e840f30799d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 13 Mar 2026 17:59:33 -0400 Subject: [PATCH 0752/1744] Update pacsatsim.sh add safe mode --- pacsatsim.sh | 47 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index bf489175..48826249 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -4,6 +4,8 @@ loopback=0 vox=0 +safe=0 + if [ "$1" = "l" ] ; then loopback=1 @@ -14,6 +16,13 @@ elif [ "$1" = "v" ] ; then fi +FILE=/home/pi/CubeSatSim/battery_saver +if [ -f "$FILE" ]; then + + safe=1 + +fi + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" @@ -71,8 +80,6 @@ if [ ! "$callsign" = "$oldcallsign" ] ; then fi - - sudo /etc/init.d/alsa-utils stop sudo /etc/init.d/alsa-utils start @@ -141,25 +148,51 @@ echo sudo usermod -a -G gpio pi -if [ "$loopback" = "1" ]; then +if [ "$safe" = "1" ] ; then + + echo "Safe mode - battery saver" +# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & + + arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & + + +elif [ "$loopback" = "1" ] ; then echo "Using audio loopback" - sudo /home/pi/CubeSatSim/pacsatsim-d.sh & +# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & elif [ "$vox" = "1" ]; then echo "Using Soundcard Audio TX and RX (VOX)" - sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & +# sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 & else echo "Using TXC FM transceiver" - sudo /home/pi/CubeSatSim/pacsatsim-df.sh & +# sudo /home/pi/CubeSatSim/pacsatsim-df.sh & + + pwm=1 + + if [ "$pwm" = "1" ] ; then + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & + + else + + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + + fi fi # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & -## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & +## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & ## echo "Don't close the direwolf window or the Pacsatsim will stop running." From 7072f03327f715a7db4494c211bfdbf793d71249 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 10:48:20 -0400 Subject: [PATCH 0753/1744] Rename pacsatsim-direwolf-pwm-loop.conf to pacsatsim-direwolf-pwm-loopback.conf --- ...irewolf-pwm-loop.conf => pacsatsim-direwolf-pwm-loopback.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename direwolf/{pacsatsim-direwolf-pwm-loop.conf => pacsatsim-direwolf-pwm-loopback.conf} (100%) diff --git a/direwolf/pacsatsim-direwolf-pwm-loop.conf b/direwolf/pacsatsim-direwolf-pwm-loopback.conf similarity index 100% rename from direwolf/pacsatsim-direwolf-pwm-loop.conf rename to direwolf/pacsatsim-direwolf-pwm-loopback.conf From 3b6daedb490fa399470175b3c935620d5448cb9e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 10:50:05 -0400 Subject: [PATCH 0754/1744] Rename pacsatsim-direwolf-pwm-loopback.conf to direwolf-pacsatsim-pwm-loopback.conf --- ...olf-pwm-loopback.conf => direwolf-pacsatsim-pwm-loopback.conf} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename direwolf/{pacsatsim-direwolf-pwm-loopback.conf => direwolf-pacsatsim-pwm-loopback.conf} (100%) diff --git a/direwolf/pacsatsim-direwolf-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf similarity index 100% rename from direwolf/pacsatsim-direwolf-pwm-loopback.conf rename to direwolf/direwolf-pacsatsim-pwm-loopback.conf From aad8a8c77a3b7d0876265f737bcfa825e4d575c8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 10:51:43 -0400 Subject: [PATCH 0755/1744] Update direwolf-pacsatsim-pwm-loopback.conf add loopback --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf index a459abac..2dc8d9eb 100644 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ b/direwolf/direwolf-pacsatsim-pwm-loopback.conf @@ -1,5 +1,4 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 +ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 PTT GPIOD gpiochip0 -27 MYCALL AMSAT-12 CHANNEL 0 From f907b83a18ba002dd1aa3cc27e8d05d3c955f68f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:13:09 -0400 Subject: [PATCH 0756/1744] Update direwolf-pacsatsim-pwm-loopback.conf ptt to 27 --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf index 2dc8d9eb..87a3ee6a 100644 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ b/direwolf/direwolf-pacsatsim-pwm-loopback.conf @@ -1,5 +1,5 @@ ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 -PTT GPIOD gpiochip0 -27 +PTT GPIOD gpiochip0 27 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 418ee8dcc418a77d3df3e9816455e6f93e36e947 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:45:03 -0400 Subject: [PATCH 0757/1744] Update direwolf-pacsatsim-pwm-loopback.conf gpis 17 for PTT (need jumper) --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf index 87a3ee6a..0d4d022d 100644 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ b/direwolf/direwolf-pacsatsim-pwm-loopback.conf @@ -1,5 +1,5 @@ ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 -PTT GPIOD gpiochip0 27 +PTT GPIOD gpiochip0 17 MYCALL AMSAT-12 CHANNEL 0 MODEM 1200 From 2e66c5e80410dc08e9c0692b41d0ff8b4373e3d6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:52:14 -0400 Subject: [PATCH 0758/1744] Update transmit.py add start/stop rpitx --- transmit.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index c431b015..f68fc3da 100644 --- a/transmit.py +++ b/transmit.py @@ -554,7 +554,8 @@ if __name__ == "__main__": # system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") - + rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 &" + stop_rpitx = "sudo killall -9 rpitx" while (True): if (txc): sleep(0.1) @@ -567,8 +568,19 @@ if __name__ == "__main__": output(txLed, 0) print("0") else: - sleep(10) - else: +# sleep(0.1) + while (input(17) == 0): + sleep(0.05) + system(rpitx) +# print("1") + while (input(17) -= 1): + sleep(0.05) + system(stop_rpitx) +# print("0") + +# sleep(10) + + else: print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: From 698cb0646f3ae777a4c1c7949af080e248d1e9f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:53:50 -0400 Subject: [PATCH 0759/1744] Update transmit.py typo --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f68fc3da..e84e2388 100644 --- a/transmit.py +++ b/transmit.py @@ -573,7 +573,7 @@ if __name__ == "__main__": sleep(0.05) system(rpitx) # print("1") - while (input(17) -= 1): + while (input(17) == 1): sleep(0.05) system(stop_rpitx) # print("0") From edada6e8b93bef851dd299c2a559e029b8209e54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:55:34 -0400 Subject: [PATCH 0760/1744] Update transmit.py indent fix --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index e84e2388..10696468 100644 --- a/transmit.py +++ b/transmit.py @@ -580,7 +580,7 @@ if __name__ == "__main__": # sleep(10) - else: + else: print("Transmit APRS Commands") system("sudo systemctl stop command") # while True: From da0f8f6301d667b825c1c083c8631665efcf8e45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 11:58:57 -0400 Subject: [PATCH 0761/1744] Update transmit.py kill arecord too --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 10696468..9d3342fc 100644 --- a/transmit.py +++ b/transmit.py @@ -555,7 +555,8 @@ if __name__ == "__main__": output(txLed, 0) print("0") rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 &" - stop_rpitx = "sudo killall -9 rpitx" + stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord" + system(stop_rpitx) while (True): if (txc): sleep(0.1) From 2b01295c5475df29cba93584dd61c82347228006 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 12:03:48 -0400 Subject: [PATCH 0762/1744] Update transmit.py rerun rpitx to stop it --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 9d3342fc..45f4af1b 100644 --- a/transmit.py +++ b/transmit.py @@ -555,7 +555,7 @@ if __name__ == "__main__": output(txLed, 0) print("0") rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 &" - stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord" + stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3" system(stop_rpitx) while (True): if (txc): From 3ad7cdb6f9bc9e4127711a2b3ebf7ba566a93619 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:20:36 -0400 Subject: [PATCH 0763/1744] Update pacsatsim.sh safe mode read frequency from sim.cfg --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 48826249..d0d08592 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -58,6 +58,7 @@ echo "$value" > /dev/null set -- $value callsign="$1" +frequency="$7e3" echo "Configured callsign is " echo $callsign @@ -155,7 +156,8 @@ if [ "$safe" = "1" ] ; then direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & - arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & +# arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & + arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f $frequency & elif [ "$loopback" = "1" ] ; then From f5b12239a871d68dbe057459bedb1be68881da4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:28:04 -0400 Subject: [PATCH 0764/1744] Update transmit.py for safe mode, use sim.cfg frequency --- transmit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 45f4af1b..520d3212 100644 --- a/transmit.py +++ b/transmit.py @@ -26,7 +26,7 @@ def input(pin): # print(f"Command run was: {query}") # print("Sucess!") # print(f"Output of the command (stdout): {result.stdout}") - print(f"{command}: {result.stdout}") +# print(f"{command}: {result.stdout}") return int(result.stdout) except subprocess.CalledProcessError as e: # print(f"Command failed with return code: {e.returncode}") @@ -554,8 +554,8 @@ if __name__ == "__main__": # system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") - rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 &" - stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3" + rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + rx + "e3 > /dev/null 2>&1 &" + stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" system(stop_rpitx) while (True): if (txc): From fb52cee8b8eaf2b233e4a550f2123174c20a3fe6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:29:01 -0400 Subject: [PATCH 0765/1744] Update pacsatsim.sh remove arecord and rpitx --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index d0d08592..5cf2da1a 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -157,7 +157,7 @@ if [ "$safe" = "1" ] ; then direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & - arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f $frequency & +# arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f $frequency & elif [ "$loopback" = "1" ] ; then From 6f0b5ad64127b3c0bb3bc61f70cd13fbdf1c4d97 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:43:26 -0400 Subject: [PATCH 0766/1744] Update transmit.py change to tx --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 520d3212..d5f180f2 100644 --- a/transmit.py +++ b/transmit.py @@ -4,7 +4,7 @@ import time from time import sleep #import os -import sys +import system from os import system from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor @@ -554,7 +554,7 @@ if __name__ == "__main__": # system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") - rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + rx + "e3 > /dev/null 2>&1 &" + rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" system(stop_rpitx) while (True): From 344da1ae49fdb3ee386c58b086f4a514eac449df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:43:48 -0400 Subject: [PATCH 0767/1744] Update transmit.py fix sys --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d5f180f2..56d62236 100644 --- a/transmit.py +++ b/transmit.py @@ -5,7 +5,7 @@ import time from time import sleep #import os import system -from os import system +from os import sys from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor import serial From a85fa3d797847e91989a5f832f1dcff72c2963cf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:56:00 -0400 Subject: [PATCH 0768/1744] Update transmit.py change back to sys --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 56d62236..189f4f97 100644 --- a/transmit.py +++ b/transmit.py @@ -4,7 +4,7 @@ import time from time import sleep #import os -import system +import sys from os import sys from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor From 657e82899d19f0a819128419e7404f5e54b141ae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 14 Mar 2026 14:57:12 -0400 Subject: [PATCH 0769/1744] Update transmit.py fix system --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 189f4f97..b6ac4475 100644 --- a/transmit.py +++ b/transmit.py @@ -5,7 +5,7 @@ import time from time import sleep #import os import sys -from os import sys +from os import system from os import path from PIL import Image, ImageDraw, ImageFont, ImageColor import serial From 4a9811ec945894cda37d20324086055dc06ff720 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 10:43:46 -0400 Subject: [PATCH 0770/1744] Update transmit.py don't stop and start rpitx --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index b6ac4475..13c66910 100644 --- a/transmit.py +++ b/transmit.py @@ -557,6 +557,7 @@ if __name__ == "__main__": rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" system(stop_rpitx) + system(rpitx) while (True): if (txc): sleep(0.1) @@ -572,11 +573,11 @@ if __name__ == "__main__": # sleep(0.1) while (input(17) == 0): sleep(0.05) - system(rpitx) +## system(rpitx) # print("1") while (input(17) == 1): sleep(0.05) - system(stop_rpitx) +## system(stop_rpitx) # print("0") # sleep(10) From 85fed02a784a9d6f1aa67f9699cd64bf9eac0378 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 10:50:15 -0400 Subject: [PATCH 0771/1744] Update direwolf-pacsatsim.conf to common settings --- direwolf/direwolf-pacsatsim.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index 87f09de1..c80de461 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,6 +1,10 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO 20 -MYCALL AMSAT +MYCALL AMSAT-1 # was -12 CHANNEL 0 MODEM 1200 +DWAIT 0 +SLOTTIME 10 +PERSIST 63 +TXDELAY 1000 +TXTAIL 10 FULLDUP OFF +DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From 41c74f422c5ebb413791f2efad9e9007538032c6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 10:56:59 -0400 Subject: [PATCH 0772/1744] Update pacsatsim.sh use direwolf template to create conf --- pacsatsim.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 5cf2da1a..e7088bcf 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -149,11 +149,15 @@ echo sudo usermod -a -G gpio pi + if [ "$safe" = "1" ] ; then echo "Safe mode - battery saver" # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + PTT="PTT GPIOD gpiochip0 17" + direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & @@ -193,6 +197,16 @@ else fi +echo "$ADEVICE" > /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +echo "$PTT" >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +cat /home/pi/CubeSatSim/direwolf-pacsatsim.conf >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf + +echo +echo "direwolf-pacsatsim-tmp.conf" +echo +cat /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +echo + # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & ## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & From 8348da54e98b8d10c5109c455d55e044b47a31ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:00:46 -0400 Subject: [PATCH 0773/1744] Update pacsatsim.sh fix file names --- pacsatsim.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index e7088bcf..f12f7d84 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -197,14 +197,16 @@ else fi -echo "$ADEVICE" > /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf -echo "$PTT" >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf -cat /home/pi/CubeSatSim/direwolf-pacsatsim.conf >> /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +DIREWOLF_CONF="/home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf" + +echo "$ADEVICE" > $DIREWOLF_CONF +echo "$PTT" >> $DIREWOLF_CONF +cat /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf >> $DIREWOLF_CONF echo -echo "direwolf-pacsatsim-tmp.conf" +echo "$DIREWOLF_CONF" echo -cat /home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf +cat $DIREWOLF_CONF echo # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & From dcdc203e1f58959097d0bd4cf31f6faec8c37b63 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:03:48 -0400 Subject: [PATCH 0774/1744] Update pacsatsim.sh add configured callsign --- pacsatsim.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index f12f7d84..6fe6b541 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -200,6 +200,7 @@ fi DIREWOLF_CONF="/home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf" echo "$ADEVICE" > $DIREWOLF_CONF +echo "MYCALL $callsign-1" >> $DIREWOLF_CONF echo "$PTT" >> $DIREWOLF_CONF cat /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim.conf >> $DIREWOLF_CONF From 70220236d6fde5ff0b6a495bb67efa151d225980 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:04:22 -0400 Subject: [PATCH 0775/1744] Update direwolf-pacsatsim.conf remove callsign --- direwolf/direwolf-pacsatsim.conf | 1 - 1 file changed, 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index c80de461..b96fc68f 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -1,4 +1,3 @@ -MYCALL AMSAT-1 # was -12 CHANNEL 0 MODEM 1200 DWAIT 0 From b4adf4d0591cad9022ebc1a0ec1d4aeadf036d96 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:07:58 -0400 Subject: [PATCH 0776/1744] Update pacsatsim.sh move direwolf call --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6fe6b541..65edc986 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -158,7 +158,7 @@ if [ "$safe" = "1" ] ; then ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm-loopback.conf -t 0 & # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f $frequency & @@ -210,6 +210,8 @@ echo cat $DIREWOLF_CONF echo +direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 & + # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & ## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & From 0d8355d0181b7cc5012f29fce9d9f81d52ec32ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:13:56 -0400 Subject: [PATCH 0777/1744] Update pacsatsim.sh add pwm --- pacsatsim.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 65edc986..9ec4bd20 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -187,7 +187,10 @@ else if [ "$pwm" = "1" ] ; then - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & else From 836ec52844131ab6dc5390a7390e8ac686d56686 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:18:02 -0400 Subject: [PATCH 0778/1744] Update transmit.py don't stop start rpitx unless safe mode --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 13c66910..32e89afa 100644 --- a/transmit.py +++ b/transmit.py @@ -556,8 +556,9 @@ if __name__ == "__main__": print("0") rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" - system(stop_rpitx) - system(rpitx) + if not txc: + system(stop_rpitx) + system(rpitx) while (True): if (txc): sleep(0.1) From 288e4b47abdb5839b108f7b47ef995888b05feaf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:36:27 -0400 Subject: [PATCH 0779/1744] Update pacsatsim.sh add soundcard mode --- pacsatsim.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 9ec4bd20..50b9d975 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -183,10 +183,11 @@ else echo "Using TXC FM transceiver" # sudo /home/pi/CubeSatSim/pacsatsim-df.sh & - pwm=1 + #pwm=1 if [ "$pwm" = "1" ] ; then - + + echo "Using Soundcard input (JP13), PWM output" ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" @@ -194,7 +195,10 @@ else else - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & + echo "Using Soundcard input (JP13) and output (JP14)" + ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & fi From 2941a55e61ebd8be8973b6e8cbfa8133548cfb0c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:42:35 -0400 Subject: [PATCH 0780/1744] Update pacsatsim.sh back to pwm --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 50b9d975..49d07f06 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -183,7 +183,7 @@ else echo "Using TXC FM transceiver" # sudo /home/pi/CubeSatSim/pacsatsim-df.sh & - #pwm=1 + pwm=1 if [ "$pwm" = "1" ] ; then From 85ea8724ba4b8ce50dfa4641c6b82509dcec47eb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 11:51:08 -0400 Subject: [PATCH 0781/1744] Update pacsatsim.sh add vox and pwm set by parameters --- pacsatsim.sh | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 49d07f06..8b42d752 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -5,6 +5,8 @@ loopback=0 vox=0 safe=0 +card=0 +pwm=0 if [ "$1" = "l" ] ; then @@ -13,6 +15,14 @@ if [ "$1" = "l" ] ; then elif [ "$1" = "v" ] ; then vox=1 + +elif [ "$1" = "c" ] ; then + + card=1 + +else + + pwm=1 fi @@ -173,35 +183,28 @@ elif [ "$loopback" = "1" ] ; then elif [ "$vox" = "1" ]; then - echo "Using Soundcard Audio TX and RX (VOX)" + echo "Using Soundcard Audio TX and RX (VOX, no PTT)" + ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 17" # sudo /home/pi/CubeSatSim/pacsatsim-dj.sh & - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 & +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 & -else - - echo "Using TXC FM transceiver" -# sudo /home/pi/CubeSatSim/pacsatsim-df.sh & - - pwm=1 - - if [ "$pwm" = "1" ] ; then +elif [ "$pwm" = "1" ] ; then - echo "Using Soundcard input (JP13), PWM output" + echo "FM TXC using Soundcard input (JP13), PWM output" ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 & - else +else - echo "Using Soundcard input (JP13) and output (JP14)" + echo "FM TXC using Soundcard input (JP13) and output (JP14)" ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 -20" # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 & - fi - fi DIREWOLF_CONF="/home/pi/CubeSatSim/direwolf-pacsatsim-tmp.conf" From cdf9ec99b3268764ef2a5fdc0fc5b48da627f032 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 15:39:22 -0400 Subject: [PATCH 0782/1744] Update pacsatsim.sh loopback changes --- pacsatsim.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 8b42d752..54ef4c89 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -159,8 +159,17 @@ echo sudo usermod -a -G gpio pi +if [ "$loopback" = "1" ] ; then -if [ "$safe" = "1" ] ; then + echo "Using audio loopback" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=0" + PTT="PTT GPIOD gpiochip0 17" + +# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & + +elif [ "$safe" = "1" ] ; then echo "Safe mode - battery saver" # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & @@ -174,13 +183,6 @@ if [ "$safe" = "1" ] ; then # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f $frequency & -elif [ "$loopback" = "1" ] ; then - - echo "Using audio loopback" -# sudo /home/pi/CubeSatSim/pacsatsim-d.sh & - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - elif [ "$vox" = "1" ]; then echo "Using Soundcard Audio TX and RX (VOX, no PTT)" From 21b9687ddbebe11ee2a1d70985c5890fd154f51c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 15:45:19 -0400 Subject: [PATCH 0783/1744] Update direwolf-pacsat.conf default pacsat conf --- groundstation/direwolf/direwolf-pacsat.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index e526e272..3b9d337b 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -1,5 +1,9 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Headphones,DEV=0 -PTT GPIO 20 +CHANNEL 0 +MODEM 1200 KISSPORT 8100 +AGWPORT 8002 +DWAIT 20 +SLOTTIME 300 +PERSIST 63 +TXDELAY 1000 FULLDUP OFF From 0dd73605ea05e455802d11a995d25bf60d93f7c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 15:55:22 -0400 Subject: [PATCH 0784/1744] Update pacsat.sh update to using default direwolf conf --- groundstation/pacsat.sh | 52 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9ffc9657..d4ff81ed 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -16,6 +16,26 @@ elif [ "$1" = "v" ] ; then fi +FILE=/home/pi/CubeSatSim/battery_saver +if [ -f "$FILE" ]; then + + safe=1 + +fi + +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" +frequency="$7e3" + +echo -n "Callsign is " +echo $callsign +echo -n "Transmit Frequency is " +echo $frequency +echo + if [ ! -d "/home/pi/PacSatGround" ] ; then mkdir /home/pi/PacSatGround @@ -132,10 +152,40 @@ elif [ "$vox" = "1" ]; then else echo "Using TXC FM Transceiver" - /home/pi/CubeSatSim/groundstation/pacsat-df.sh & + pwm=1 +# /home/pi/CubeSatSim/groundstation/pacsat-df.sh & + + if [ "$pwm" = "1" ] ; then + +# direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 & + + echo "FM TXC using Soundcard input (JP13), PWM output" + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" + + else + + direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + + fi fi +DIREWOLF_CONF="/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" + +echo "$ADEVICE" > $DIREWOLF_CONF +echo "MYCALL $callsign-1" >> $DIREWOLF_CONF +echo "$PTT" >> $DIREWOLF_CONF +cat /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat.conf >> $DIREWOLF_CONF + +echo +echo "$DIREWOLF_CONF" +echo +cat $DIREWOLF_CONF +echo + +direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & + # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & ##arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & From 4ebdc99d773ed632793f45fc8383f8ec91a73645 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 16:12:46 -0400 Subject: [PATCH 0785/1744] Update pacsat.sh add loopback --- groundstation/pacsat.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d4ff81ed..215c52a0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -142,7 +142,12 @@ if [ "$loopback" = "1" ]; then #/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" echo "Using Audio Loopback" - /home/pi/CubeSatSim/groundstation/pacsat-d.sh & +# /home/pi/CubeSatSim/groundstation/pacsat-d.sh & + +# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 + + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="PTT GPIOD gpiochip0 17" elif [ "$vox" = "1" ]; then From fef665ee8f4e41a904e6e056447da2840c4e5bd9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 16:21:06 -0400 Subject: [PATCH 0786/1744] Update transmit.py add safe mode txLed on/off --- transmit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 32e89afa..d7d8ea5e 100644 --- a/transmit.py +++ b/transmit.py @@ -565,20 +565,22 @@ if __name__ == "__main__": while (input(ptt) != 0): sleep(0.2) output(txLed, 1) - print("1") +# print("1") while (input(ptt) != 1): sleep(0.2) output(txLed, 0) - print("0") +# print("0") else: # sleep(0.1) while (input(17) == 0): sleep(0.05) ## system(rpitx) + output(txLed, 1) # print("1") while (input(17) == 1): sleep(0.05) ## system(stop_rpitx) + output(txLed, 0) # print("0") # sleep(10) From 5b961fc5582e744ac3f30f546e74547e6e59da13 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 17:39:33 -0400 Subject: [PATCH 0787/1744] Update install bookworm vnc and desktop execute --- install | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install b/install index 2492d91e..74a10384 100755 --- a/install +++ b/install @@ -170,6 +170,8 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then # sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt + + sudo sed -i 's/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/firmware/config.txt if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" @@ -813,6 +815,10 @@ cd #fi +sed -i 's/quick_exec=0/quick_exec=1/' ~/.config/libfm/libfm.conf + +sudo apt install -y raspberrypi-ui-mods + if [ "$noreboot" = "0" ] ; then if [ $FLAG -eq 1 ]; then # Not sure if this is needed From a09d1aea2a344f111cb0058ae3c83593542be067 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 17:45:07 -0400 Subject: [PATCH 0788/1744] Update transmit.py add Safe Mode print --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d7d8ea5e..ac8c42b1 100644 --- a/transmit.py +++ b/transmit.py @@ -558,7 +558,8 @@ if __name__ == "__main__": stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" if not txc: system(stop_rpitx) - system(rpitx) + system(rpitx) + print("Safe Mode!") while (True): if (txc): sleep(0.1) From 623c181effde9d8e4943864934f4e269d9e7194c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 15 Mar 2026 18:03:36 -0400 Subject: [PATCH 0789/1744] Update .gitignore add tmp conf files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 04810931..acb007e4 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,6 @@ logt.txt telem.txt.bk failure_mode.txt sim_mode_auto +direwolf-pacsatsim-tmp.conf +groundstation/direwolf-pacsat-tmp.conf +tlm.bin From 60d11e78d79c7070a1cff5ff98aa622044a9335a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 08:58:50 -0600 Subject: [PATCH 0790/1744] directory preloaded with PacSatSim --- spacecraft/PacSatGround_0.46o/PacSatGround.zip | Bin 0 -> 3076 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGround.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip new file mode 100644 index 0000000000000000000000000000000000000000..1ed803547071145536dee3358a256583ad2daf27 GIT binary patch literal 3076 zcmb7`3pkT|9LHbgl5~1hb8vF2W-6K6$?Y5`Q_6jWagbt0>tHkUgmOx59k-gO5IR;i zYL#$Y!l+b^)5WbMiKD1==02e~?`sFMSx(#Yf44n*_WAz)zu))${%3Cu6I%&Dk9sW0 zWA@E|mu~CWZw1XgNDc0k8~(GQtjUg@j52B4Tf005E&82QhH)hbw?5 zAZARhQrcP+06u|VBlt1AOcaSsB;m;v0zP<_P6x@Uf^_^|TVjtYymCb2ba*HH2RjyG zwcQ77tG>*CL?XAed-W)%$H3sNt> ztw9?0h7{X%G=c^G$BtlW(5 zNM(jfVx@Lc#hrEN>Ea`+W1o7snbvvVi`Q%zrjN#WVpgP7jp$9s$K@6wVaA`N>s#q6Q*fNjRrErveeydwd89}>|Ta}L_EuiAz>tmbkgvw zlXI-UT%7CheHO7v)W})ag}rks^W=G_?dQNDd0}7Sg z+GSQ^BYVu;DqKJcwxcZ#@2-^^{hHb^n7>I~rPvji!o{)UJ zwYzOx`LWGN{)1;jK*&_ix1%s00yQ==&`h~9WjCYOk3IxsiIs{s7AJe2IwNDxI@S}% zj1kSj61(yl*#T+SR1)M=0tbrpYm6UpLS%xQIHt$y=ws?*Vtrm?{*>K=pG~r{Vun(Q5^{ZT<1gHgxvo{=chN9`uc&?ByepK4)h_A@i+>R9ES4oo;N-uzz269 zIU8A0b`p)$)KlMHhG1=W)-q%<5Zl#MHSZKMHWxOj7nMbeh{~tS%WsXBM>MA0ZZ(-s zBYPTc{2;n3i-h(5IoFe5>6@(VVQ$`|_B{Rmx;|Y!?Qq>2a6jy2Ec|#P%1?wU3oJCH zfv+h_!uQ~0W4p_Y+nQ{!a%k~YFB~f*6rf&nu`ZZhD1uMuY;V4rj$E#2P{Us5|MLs^ zngZwN2UAEWA1}&mwSizCpe3{y5N*S&7o#GeMW7`}!v`%#(_Uz8IbU(|0>zQMaCjWq z%a_6(Rs>jF=+Xsp6C5JCOa)f$0IP$6DZcFsL~fXabK_5PNCjGaZP-V(wT9`)#12fz zN}IgUDzw@Vm&;tS_3v<%oAt%(D=eR;|5h^7*}_zaXoZ$9}N?Q`m%q-9|Gr0YJW>$pXqkE+HtinT-)a?nPs zk@39#wt-yFs+KFKuB4M6oIQH1U?NUGHL)o6O-fFF9R0AX$+a>6f{a+Lk@B@4w13RR z{dsffC2P7+Pxn%d#eNI73T^$!B>(1d!$v!$8zP(&r}LYc7OV?4?BFQBTB&Y*rQ@fz znHOpP8Vj!t6V*xT%t#J0CBKsgG*cV2$0Ig&zfyQzt)Zfra{htgpxu59ktkQtr&)Z^ zBP`Ip_(+%HM}N*L{g?x}FlD>ovotk$TaN<^S)NOlz`Siy=uI&HlqB1(A9-nGFn(WD zzofmjh^R75*m*4vx(Ry70RNz&SKgBroV_^r^yZrg7b)!Q<{}}RUW(kqkL2Yqnm?$t zM40gwFBrbO#Sen6%oD+gZATB0U zXf8WJi6wJ$Vaogx2w+YE+Kb0>67xCw^-9P^N)^i~@nq`qT7rqnyQ}ZS`5HH$uONBJ zY+dM=V7hY2Tnir*AkSs(@?^oFovRrdcBufF#1p$9eTgvSz4Zh`m$z;y3I2{O(C60Mg*o6rAWaN$AtRrWxQd literal 0 HcmV?d00001 From 10b7a28ee9dc4bef3c95a1df89a743dc6ab802bd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:03:02 -0400 Subject: [PATCH 0791/1744] Update pacsat-config.sh download preloaded PacSatGround --- groundstation/pacsat-config.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 6a2ce55c..352396b4 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -152,6 +152,11 @@ sudo killall -9 direwolf &>/dev/null if [ "$ANS" = "1" ] ; then sudo rm -r /home/pi/PacSatGround + cd + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/60d11e78d79c7070a1cff5ff98aa622044a9335a/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip + sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop fi From d720f030552ef7a8ad9dcfab80fdadaa9c8a2f85 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:48:02 -0400 Subject: [PATCH 0792/1744] Update transmit.py if beacon on, restart pacsatsim --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index ac8c42b1..fffd0909 100644 --- a/transmit.py +++ b/transmit.py @@ -551,7 +551,8 @@ if __name__ == "__main__": print("Pacsat Ground Station") else: print("Pacsat") -# system("sudo systemctl restart pacsatsim") + if (command_tx == True): + system("sudo systemctl restart pacsatsim") output(txLed, 0) print("0") rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" From add244e5417fb2260a10525f708a2cd06a5c93ec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:51:41 -0400 Subject: [PATCH 0793/1744] Update transmit.py stop pacsatsim if not mode p --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index fffd0909..a3fcda5c 100644 --- a/transmit.py +++ b/transmit.py @@ -324,7 +324,8 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) -# system("sudo systemctl stop pacsatsim") + if ( mode != "p"): + system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") From d05f624998983793725b4b41c56582cf16e3d541 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 11:52:27 -0400 Subject: [PATCH 0794/1744] Update main.c move start/stop pacsatsim to transmit --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index a7b50540..2f1954a6 100644 --- a/main.c +++ b/main.c @@ -273,7 +273,7 @@ int main(int argc, char * argv[]) { } } } - +/* if ( mode == PACSAT) { FILE * pacsat_file = popen("sudo systemctl restart pacsatsim", "r"); pclose(pacsat_file); @@ -282,7 +282,7 @@ int main(int argc, char * argv[]) { FILE * pacsat_file = popen("sudo systemctl stop pacsatsim", "r"); pclose(pacsat_file); } - +*/ // Open telemetry file with STEM Payload Data telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a"); if (telem_file == NULL) From cf44ee82d37a12181aff1c447121b06bcd6e562e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 12:02:06 -0400 Subject: [PATCH 0795/1744] Update config don't restart/stop pacsatsim for beacon on/off --- config | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/config b/config index 7d0ed195..9be7c3e1 100755 --- a/config +++ b/config @@ -1158,9 +1158,9 @@ elif [ "$1" = "-o" ]; then echo "Turn beacon telemetry ON" sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 sudo systemctl restart transmit - if [ "$MODE" = "p" ]; then - sudo systemctl restart pacsatsim - fi +# if [ "$MODE" = "p" ]; then +# sudo systemctl restart pacsatsim +# fi else echo "Transmit beacon telemetry is on" @@ -1168,12 +1168,12 @@ elif [ "$1" = "-o" ]; then echo "Turn beacon telemetry OFF" touch /home/pi/CubeSatSim/beacon_off - if [ "$MODE" = "p" ]; then - sudo systemctl stop pacsatsim - sudo systemctl stop transmit - else +# if [ "$MODE" = "p" ]; then +# sudo systemctl stop pacsatsim +# sudo systemctl stop transmit +# else sudo systemctl restart transmit - fi +# fi fi sleep 3 fi From 71321b0c92677d9696cd0fd07a8051c4543205b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 12:08:15 -0400 Subject: [PATCH 0796/1744] Update transmit.py add print to start pacsatsim --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index a3fcda5c..4127e8db 100644 --- a/transmit.py +++ b/transmit.py @@ -554,6 +554,7 @@ if __name__ == "__main__": print("Pacsat") if (command_tx == True): system("sudo systemctl restart pacsatsim") + print("Starting PacSatSim") output(txLed, 0) print("0") rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" From a90e87ac061f279082da29e36c53d76ebfd453ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:32:33 -0400 Subject: [PATCH 0797/1744] add !command_tx to stop pacsatsim --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 4127e8db..d299389c 100644 --- a/transmit.py +++ b/transmit.py @@ -324,8 +324,6 @@ if __name__ == "__main__": print("Can't open .mode file, defaulting to FSK") print("Mode is: ") print(mode) - if ( mode != "p"): - system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/beacon_off") @@ -337,6 +335,9 @@ if __name__ == "__main__": print("Can't open beacon_off file, defaulting to False") print("Command_tx: ") print(command_tx) + + if (mode != "p") || (!command_tx): + system("sudo systemctl stop pacsatsim") try: file = open("/home/pi/CubeSatSim/command_count.txt", "r") From cb92741418aa488084711b76dadfb661990e6a77 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:33:28 -0400 Subject: [PATCH 0798/1744] Update transmit.py fix or --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d299389c..d0069606 100644 --- a/transmit.py +++ b/transmit.py @@ -336,7 +336,7 @@ if __name__ == "__main__": print("Command_tx: ") print(command_tx) - if (mode != "p") || (!command_tx): + if (mode != "p") or (!command_tx): system("sudo systemctl stop pacsatsim") try: From 7a7e4e0c5b14624a98e9fb9c05248b4fa7a72a49 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:34:40 -0400 Subject: [PATCH 0799/1744] Update transmit.py fix not --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d0069606..5ac26bb3 100644 --- a/transmit.py +++ b/transmit.py @@ -336,7 +336,7 @@ if __name__ == "__main__": print("Command_tx: ") print(command_tx) - if (mode != "p") or (!command_tx): + if (mode != "p") or (command_tx == False): system("sudo systemctl stop pacsatsim") try: From 3caa7043332e9f835975bac55d0c54f8fae4242a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 13:47:23 -0600 Subject: [PATCH 0800/1744] Add files via upload --- .../PacSatGround_0.46o/PacSatGround.zip | Bin 3076 -> 3076 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip index 1ed803547071145536dee3358a256583ad2daf27..ed8a02312015782bdc385e835d1b838ba137755c 100644 GIT binary patch delta 947 zcmZpXXp!Iv@MdP=VgP}l+KD_WY}&CqG9ScDHeiA2aHFn~Z z^m^ZSlYZn0J+#p-@Oh-Y<*`#ON9arbZ;D#iFRgIjS#qdUG@xmRX7oqCH9~Dl+^drO zjJco5@~qvtrJ?I+k7)F?r~WUw_s$bgDGlb9oENjLihX)@p=1f$Opj0N|0y@!YuWnd z>*dDOJBF`!6q?L@^hC`6*k5tsId>kb99KC!Sweksz4E*VDzCi%I~#>$Kb_xI@32^+ zRBXm4p17}p?l-gEiUy}!Iry3P9q6|>yC_fvS& ztt9I$TNFjsFdc8*QnE4T$qU|u^ImxezOMUTeRb>f+bofrpUzo3?X}XKsZpl)e{>qoj3DY@Wl0x8DD*~*L}f$;*t_C^W7Gk3f10#v*+vm9y3~T=5a5| zl-(<*uDGD?|1th(ZdSXs_YMRH+TPZRwHMR3yK^r+x1n^-+t&)umb`8J*X94({}t!C z!>?|>=y~wF+D19OaDm@Dx0>{wtG^~L@ohfG{wpeb_1fT?>&L%UJvl4u+PKhO_*CP{ zN>0a{8?OA(oX_w3j~SX!Sb-@es&?`pCOvSP(2fNq6(*pFFS8X`#5#6zFLM)9aP4G4 z785o-V7k!*sS%x=z`_O+&0w*{B6^I)7G2b=cCs3)HrtPw9hpBs2@-4quNg2=D&D{S zg%Riu#>s}PqLa8e)HxZLA(cBku}tC z`ApW&d~Mfaq8yGU9qZCP{b~7^);NETNxN3I^7!jT?`=N4cL$GEvyaNp@c)92`G=yu z{d#%8=-rIcI~KEi3X8hcAOGv-^m|u0DS6UE&z{LA>jnJ_guX8QuPC`{>nH!C_6q`g zthjwD+1CGBu{dYzx2~1OvI@&*A4|5)WXMWfle{eWu*HM*^64d0-`!zI`}yT(W9sSs z-OG<3ea~2;kZ4|U@Y}BGvJ+Ka*{*fidO%yP)N^~Z6Ce8%-LRk)=4@U2y;iVUva5w? z#~l?9KDl(uqCk`Sx%rovEJKaL-#P!D-7#VD-PuVylP(`ma$cNl>pS0gn_u^wdvQOt z9dkFzM%@zN3Tu4q6tyctujmWghICc)2UXX9?|pUabZ*m{n?>isPL~S4^IALWeQoQz zpYv-T{$xL|_3*}bx${1sSDv{3k)ibWe6cUgDVY=78uOgw_DphH@hrW5`A3GiEZbQx zZt08bpDYltzy5Li+E%9dVfhbMu9%lQb)9^-xP0FG&1MIz&V4HtD8BT~q5kOduj*e} zo+p0IDRKMo*LL2-%@zUb<;wdu-?{qB;L8eTxoUn9uq2 zz?D5M3vwc|{!KaGuJ)f1nowAQDdj@gABEHO4V3FmLlY5z)m`;aH z7GyDDn+Hrc^FV4uCnvD5fkZP{tg(n5W3fdS-554mja8d14`@Oj+yvf@z(lEd|MnL~ zpgR~R8?uT{;^t82WMGCU+mTsX!Og(P@`9Ox0ZbSm()Z4=$%k3>*=m92RX|(~6cJ@} z28+~6ZjNJ%VPrZPHhB-b5fji`AJ}E#IbgCVhcgq Date: Mon, 16 Mar 2026 13:53:34 -0600 Subject: [PATCH 0801/1744] Add files via upload --- .../PacSatGround_0.46o/PacSatGround.zip | Bin 3076 -> 2662 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip index ed8a02312015782bdc385e835d1b838ba137755c..900415dcd54bc85e08ddeafaeec93d4cc324e294 100644 GIT binary patch delta 459 zcmY+9y-EW?6oqfHv&rrqk!1|YE*o4eY^;Kc5VC3lD#A847XFl488BiY2o^yL!EWyh zSVX~6Qsgbv#upH@3y6(PK<6ehkf{#eIcMg~wf|WV+leKpg+-BvGSG&-l4o&tbV^(H zOjKdJ000i`UA7LEANw~+7GPijlsF$d!PD(Ywh(Jmr_7OTzS|8EvFOR!?oMt$L*H3n zAd}Fliz17r)fFC#ir6Hyklx%Wx)VzxU|7X4waY0Yy`rECoKSi2%_E&QOS;FJ!5IxY z?FQptoTFz4r^h#s+N0PN$6}{O^U_n&T8TVwB7o9tv!m-jo zX!pTcRYik&P2JYGY55eo3(7MVKl3xR+;vqlc(^~O8!v96f-#&juHqtn$=oCY!m*z7 Hp&`H@&lFKl delta 803 zcmaDR(js9N;LXg!#Q*|9wFNO?29)4skYNZ&Ob$*gaWBd*%}db_4dG;9){fng`5>a~12CvjjGTOc!%kiqY7of6C5?{2s6bUC z!09C~3s(a&hm{3gO%A6E+(8g?VldRivq?_A&1odB1~&_2-!2Sw8`z{LTX9KDcHrdF zH$zKXA}D&LSkc`f%x*0YQv(T@3=B01?5dL=v5Uz|z|8{rX*-5GE)IKn9jF?JS)6R> Y_C<48im(Dj85p>M&;jU|b?hJ>0LI?EGynhq From 9009f08738e6c98b35de892b94b49c3745e54ba5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 15:55:20 -0400 Subject: [PATCH 0802/1744] Delete spacecraft/PacSatGround_0.46o/PacSatGround.zip --- spacecraft/PacSatGround_0.46o/PacSatGround.zip | Bin 2662 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatGround.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip deleted file mode 100644 index 900415dcd54bc85e08ddeafaeec93d4cc324e294..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2662 zcmWIWW@h1H00Fbwf*3FZO0YA?Fcg;*=%plOvBbS7 zzcepJub?QuAhoC@Gqo7(BvskEuVf)K}zm6UZ6%PG$Fu%e4^Ru%@yQWLO`_O!G?y3*R3e~q9(q8;M zVGcvL-m`u4iklZ}%lN*V^dnE`p^bKd&m-+EkDY2cLSOQKQ`EYCX@&dFl0&7U0ZltJ zqd)Sk5o%N7UX|o$%>7K3XYI}{4P8fjM5CuY^?%8|cb?5 zdVE^{Pr2z{%hoqvFE^&%F?_wF&}8PLCu07`{)!9Fx${`%xXR(l66%wc=RHt)<^A8; zC?xyo{H}V3#S*1rGd}UeeGPQKne|pQINi#@&%F0|)g^{2ha!&qEN?435O06(h1T7j zjAuT*{LFlMTD`b`fA@Xn7Y>K=J~X{8)wfpiyiy(2nAI5W^J-Gw_7)kw6VYpy1myFG z)K3lIE#mW85w@pGf7vAOOxML3R`-{%7OhHIcc=ZExuBx^Zu6r>N0;>z0y@F;8CbCY<-mJMeYg_v))#r{89Y-28OT+G($q z?o5p`z5ko*?q~a-hd%Sq3q7>)z3sf2&w?kef6Vymo4xJ}_7j(sc$x3E*i@+Y2AnwrtDrhb;SjB|BvxUbF}ou(Dt@gti71N-JN^sxecXr-o93Nw&ZQ& zzb^mR{;xRC9e#E5MbCrZ)i%oMg$w-Nxz(iaT>Uk1iEr~c_FqxitJenCTtEJ;>d9GI z*T#kR!lxQnR&qMt+;HWO=6rtNf6R!~ZG)CQxIx*YATc>LxhOHML?4_UnSp8XKlUsF zN#Gzu!hh%OwFl-8W?&+hM>PbJ)`K&1(GxnzU=T)2=&=)hy_pRK+TQ;Z<+i=8ztKyv zebHJDtw&Yzn@(<#-sO31X6M%b_pYo}*n95xlgg84UYxyg%j2turhE9+q$A5C_6EM1 zctm;i#kQKQ2bV>KY~KC!Pnui*R;i%v|dsbBT8-E2zF=C-Gk=C5pDULIk)?rYAfS#A2CcM82Ru$i5F zYSYKN`~Ph;Hd=DPBiz`iHTV{<* zl!{Yhn_sgdA{SKfK#M&v#RV^TfRO=-TToe}jTr@~h1bl>+tbp4CiDWa7>XGwnMJ9| zCHX~_dMQcpvI}G;T9ihAp4PZ^M~9=DuCco54wd~Hq52m4SE!h(D(D{GxI$y&CH2ia zS{RumW=cqCbxEjPoOywLdb$zUQbLMg3=SIc` zRYn^`(!-X9i8S=+r87Rh9vWwBO80m&fq8L62i{VJw4VUq( RKy3^RTtJu&OaxECJOI-LSm*!% From aa0742af68c6a6a8a1c96a6ccab37ca51705fd26 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 13:58:05 -0600 Subject: [PATCH 0803/1744] Add files via upload --- spacecraft/PacSatGround_0.46o/PacSatGround.zip | Bin 0 -> 2662 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGround.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip new file mode 100644 index 0000000000000000000000000000000000000000..900415dcd54bc85e08ddeafaeec93d4cc324e294 GIT binary patch literal 2662 zcmWIWW@h1H00Fbwf*3FZO0YA?Fcg;*=%plOvBbS7 zzcepJub?QuAhoC@Gqo7(BvskEuVf)K}zm6UZ6%PG$Fu%e4^Ru%@yQWLO`_O!G?y3*R3e~q9(q8;M zVGcvL-m`u4iklZ}%lN*V^dnE`p^bKd&m-+EkDY2cLSOQKQ`EYCX@&dFl0&7U0ZltJ zqd)Sk5o%N7UX|o$%>7K3XYI}{4P8fjM5CuY^?%8|cb?5 zdVE^{Pr2z{%hoqvFE^&%F?_wF&}8PLCu07`{)!9Fx${`%xXR(l66%wc=RHt)<^A8; zC?xyo{H}V3#S*1rGd}UeeGPQKne|pQINi#@&%F0|)g^{2ha!&qEN?435O06(h1T7j zjAuT*{LFlMTD`b`fA@Xn7Y>K=J~X{8)wfpiyiy(2nAI5W^J-Gw_7)kw6VYpy1myFG z)K3lIE#mW85w@pGf7vAOOxML3R`-{%7OhHIcc=ZExuBx^Zu6r>N0;>z0y@F;8CbCY<-mJMeYg_v))#r{89Y-28OT+G($q z?o5p`z5ko*?q~a-hd%Sq3q7>)z3sf2&w?kef6Vymo4xJ}_7j(sc$x3E*i@+Y2AnwrtDrhb;SjB|BvxUbF}ou(Dt@gti71N-JN^sxecXr-o93Nw&ZQ& zzb^mR{;xRC9e#E5MbCrZ)i%oMg$w-Nxz(iaT>Uk1iEr~c_FqxitJenCTtEJ;>d9GI z*T#kR!lxQnR&qMt+;HWO=6rtNf6R!~ZG)CQxIx*YATc>LxhOHML?4_UnSp8XKlUsF zN#Gzu!hh%OwFl-8W?&+hM>PbJ)`K&1(GxnzU=T)2=&=)hy_pRK+TQ;Z<+i=8ztKyv zebHJDtw&Yzn@(<#-sO31X6M%b_pYo}*n95xlgg84UYxyg%j2turhE9+q$A5C_6EM1 zctm;i#kQKQ2bV>KY~KC!Pnui*R;i%v|dsbBT8-E2zF=C-Gk=C5pDULIk)?rYAfS#A2CcM82Ru$i5F zYSYKN`~Ph;Hd=DPBiz`iHTV{<* zl!{Yhn_sgdA{SKfK#M&v#RV^TfRO=-TToe}jTr@~h1bl>+tbp4CiDWa7>XGwnMJ9| zCHX~_dMQcpvI}G;T9ihAp4PZ^M~9=DuCco54wd~Hq52m4SE!h(D(D{GxI$y&CH2ia zS{RumW=cqCbxEjPoOywLdb$zUQbLMg3=SIc` zRYn^`(!-X9i8S=+r87Rh9vWwBO80m&fq8L62i{VJw4VUq( RKy3^RTtJu&OaxECJOI-LSm*!% literal 0 HcmV?d00001 From 8e0dcb858034c34b9479e911484aea34cde6962d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 16:04:17 -0400 Subject: [PATCH 0804/1744] Update pacsat-config.sh add reset ground station with zip file --- groundstation/pacsat-config.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 352396b4..e2b86625 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -154,11 +154,15 @@ sudo killall -9 direwolf &>/dev/null sudo rm -r /home/pi/PacSatGround cd sudo rm PacSatGround.zip - wget https://github.com/alanbjohnston/CubeSatSim/raw/60d11e78d79c7070a1cff5ff98aa622044a9335a/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGroundLoop + sudo rm PacSatGround.zip fi else From 3ac84675d2d94376a663d094dd4eec7336d378a3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 16:29:01 -0400 Subject: [PATCH 0805/1744] Update pacsat-config.sh change properties file for satellite --- groundstation/pacsat-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index e2b86625..4c6cf617 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -131,9 +131,9 @@ sudo killall -9 direwolf &>/dev/null else if [ "$ANS" = "1" ] ; then - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties else - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties fi echo echo "Changing callsign to " From 7e94f40ea9a66196c546449c770e349cae754112 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 16 Mar 2026 16:31:04 -0400 Subject: [PATCH 0806/1744] Update pacsat-config.sh change old callsign too --- groundstation/pacsat-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 4c6cf617..65b49fde 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -113,9 +113,9 @@ sudo killall -9 direwolf &>/dev/null echo if [ "$ANS" = "1" ] ; then - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGround/spacecraft/PacSatSim.properties) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) else - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) fi echo "Current value of remote PacSat callsign is" echo $oldcallsign From 16e78829787583ec6db0b4c66d6a3e341e8a8471 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 11:37:38 -0400 Subject: [PATCH 0807/1744] Update asound.conf add ipc permissions to everyone --- asound.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asound.conf b/asound.conf index cf3cc9a0..a752802a 100644 --- a/asound.conf +++ b/asound.conf @@ -22,6 +22,7 @@ pcm.softvol { pcm.shared_speaker { type dmix ipc_key 1024 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" rate 48000 @@ -35,6 +36,7 @@ pcm.shared_speaker { pcm.shared_mic { type dsnoop ipc_key 2048 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" # channels 1 From 8db0be76f4dc0e3467029afd1c20a97e11a4a042 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 11:42:35 -0400 Subject: [PATCH 0808/1744] Update asound.conf add ipc permissions to everyone --- asound.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asound.conf b/asound.conf index cf3cc9a0..a752802a 100644 --- a/asound.conf +++ b/asound.conf @@ -22,6 +22,7 @@ pcm.softvol { pcm.shared_speaker { type dmix ipc_key 1024 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" rate 48000 @@ -35,6 +36,7 @@ pcm.shared_speaker { pcm.shared_mic { type dsnoop ipc_key 2048 + ipc_perm 0666 slave { pcm "hw:CARD=Device,DEV=0" # channels 1 From 000bf1f9e32effd9ce3d737181833eedd6df8848 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 14:03:02 -0400 Subject: [PATCH 0809/1744] Update pacsat.sh add safe and fix vox and other modes --- groundstation/pacsat.sh | 58 ++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 27 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 215c52a0..d64eacb3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -4,15 +4,25 @@ loopback=0 vox=0 +safe=0 +card=0 +pwm=0 + if [ "$1" = "l" ] ; then loopback=1 - echo "PacSat Ground Station with Loopback" elif [ "$1" = "v" ] ; then - vox=1 - echo "PacSat Ground Station with Soundcard (VOX)" + vox=1 + +elif [ "$1" = "c" ] ; then + + card=1 + +else + + pwm=1 fi @@ -139,41 +149,35 @@ echo sudo usermod -a -G gpio pi if [ "$loopback" = "1" ]; then -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-df.sh" echo "Using Audio Loopback" -# /home/pi/CubeSatSim/groundstation/pacsat-d.sh & + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="PTT GPIOD gpiochip0 17" -# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 +elif [ "$safe" = "1" ] ; then - ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" - PTT="PTT GPIOD gpiochip0 17" + echo "Safe mode - battery saver" + ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + PTT="PTT GPIOD gpiochip0 17" elif [ "$vox" = "1" ]; then - echo "Using Soundcard Audio TX RX (VOX)" - /home/pi/CubeSatSim/groundstation/pacsat-dj.sh & - -else - - echo "Using TXC FM Transceiver" - pwm=1 -# /home/pi/CubeSatSim/groundstation/pacsat-df.sh & - - if [ "$pwm" = "1" ] ; then + echo "Using Soundcard Audio TX and RX (VOX, no PTT)" + ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 17" -# direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 & - - echo "FM TXC using Soundcard input (JP13), PWM output" - ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" - PTT="PTT GPIOD gpiochip0 -20" +elif [ "$pwm" = "1" ] ; then + + echo "FM TXC using Soundcard input (JP13), PWM output" + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" - else +else - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 & + echo "FM TXC using Soundcard input (JP13) and output (JP14)" + ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 -20" - fi - fi DIREWOLF_CONF="/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" From 2a3d546fef6b9bed3a63508fe7b11c2bce73f131 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 17:59:20 -0400 Subject: [PATCH 0810/1744] Update config remove commented out code --- config | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/config b/config index 9be7c3e1..c4ab7d94 100755 --- a/config +++ b/config @@ -1158,22 +1158,13 @@ elif [ "$1" = "-o" ]; then echo "Turn beacon telemetry ON" sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 sudo systemctl restart transmit -# if [ "$MODE" = "p" ]; then -# sudo systemctl restart pacsatsim -# fi - else echo "Transmit beacon telemetry is on" echo echo "Turn beacon telemetry OFF" touch /home/pi/CubeSatSim/beacon_off -# if [ "$MODE" = "p" ]; then -# sudo systemctl stop pacsatsim -# sudo systemctl stop transmit -# else - sudo systemctl restart transmit -# fi + sudo systemctl restart transmit fi sleep 3 fi From e9edb14d331389cab7aabc38a71751ae0c43be62 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 18:11:04 -0400 Subject: [PATCH 0811/1744] Update pacsat.sh add pkill --- groundstation/pacsat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index d64eacb3..9aac313a 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -1,6 +1,8 @@ #!/bin/bash -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat Ground Station +# script to auto decode packets using Direwolf and FM TXC and run Pacsat Ground Station + +sudo pkill -f "/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" loopback=0 vox=0 From 080f5680744f822e4530dcce19c9fc5d11f37b26 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:00:28 -0400 Subject: [PATCH 0812/1744] Update pacsatsim.sh detect sound card, TXC, and RTL --- pacsatsim.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 54ef4c89..86836f78 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -33,6 +33,30 @@ if [ -f "$FILE" ]; then fi +if [[ $(arecord -l | grep "USB Audio Device") ]] ; then + echo "USB Sound Card detected" + soundcard=1 +else + echo "No USB Sound Card detected" + soundcard=0 + +gpio -g mode 7 up +if [[ $(gpio -g read 7 | grep 0) ]]; then + echo "TXC is present" + txc=1 +else: + echo "TXC not present" + txc=0 + +timeout 1 rtl_test &> out.txt +if [[ $(grep "No supported" out.txt) ]] ; then + echo "No RTL-SDR detected" + rtl=0 +else + echo "RTL-SDR detected." + rtl=1 +fi + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" From 28c335c9852eed570c78d61c0ee630aab04f485b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:10:14 -0400 Subject: [PATCH 0813/1744] fix missing fi --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 86836f78..20bb50f1 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -39,14 +39,16 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] ; then else echo "No USB Sound Card detected" soundcard=0 +fi gpio -g mode 7 up -if [[ $(gpio -g read 7 | grep 0) ]]; then +if [[ $(gpio -g read 7 | grep 0) ]] ; then echo "TXC is present" txc=1 else: echo "TXC not present" txc=0 +fi timeout 1 rtl_test &> out.txt if [[ $(grep "No supported" out.txt) ]] ; then From 86a17ea38e2065a613cca77fdfda70888647debf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:44:03 -0400 Subject: [PATCH 0814/1744] Update pacsatsim.sh fix else --- pacsatsim.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 20bb50f1..78c952a8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -43,10 +43,10 @@ fi gpio -g mode 7 up if [[ $(gpio -g read 7 | grep 0) ]] ; then - echo "TXC is present" - txc=1 -else: - echo "TXC not present" + echo "TXC is present" + txc=1 +else + echo "TXC not present" txc=0 fi From 53b7455e2e35fc7d902a20bb5bb9955cee893b1a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:49:00 -0400 Subject: [PATCH 0815/1744] Update pacsat.sh with tests for sound card, txc, and rtl --- groundstation/pacsat.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9aac313a..61ece654 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -28,6 +28,32 @@ else fi +if [[ $(arecord -l | grep "USB Audio Device") ]] ; then + echo "USB Sound Card detected" + soundcard=1 +else + echo "No USB Sound Card detected" + soundcard=0 +fi + +gpio -g mode 7 up +if [[ $(gpio -g read 7 | grep 0) ]] ; then + echo "TXC is present" + txc=1 +else + echo "TXC not present" + txc=0 +fi + +timeout 1 rtl_test &> out.txt +if [[ $(grep "No supported" out.txt) ]] ; then + echo "No RTL-SDR detected" + rtl=0 +else + echo "RTL-SDR detected." + rtl=1 +fi + FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then From 918bff84464af0a338eb9e21dce65e28c691723b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 19:51:20 -0400 Subject: [PATCH 0816/1744] Update config add to status --- config | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/config b/config index c4ab7d94..861b0624 100755 --- a/config +++ b/config @@ -324,6 +324,32 @@ if [ "$1" = "" ]; then echo "Transmit beacon telemetry is ON" fi + if [[ $(arecord -l | grep "USB Audio Device") ]] ; then + echo "USB Sound Card detected" + soundcard=1 + else + echo "No USB Sound Card detected" + soundcard=0 + fi + + gpio -g mode 7 up + if [[ $(gpio -g read 7 | grep 0) ]] ; then + echo "FM TXC is present" + txc=1 + else + echo "FM TXC not present" + txc=0 + fi + + timeout 1 rtl_test &> out.txt + if [[ $(grep "No supported" out.txt) ]] ; then + echo "No RTL-SDR detected" + rtl=0 + else + echo "RTL-SDR detected" + rtl=1 + fi + echo echo -e "Current sim.cfg configuration file:" # echo From 1fe7a1b57b74cbb61663b59ae71580bd7a9747d2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 22:15:11 -0400 Subject: [PATCH 0817/1744] Update pacsat.sh print error messages if txc or sound card not present --- groundstation/pacsat.sh | 42 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 61ece654..461d8069 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -184,27 +184,61 @@ if [ "$loopback" = "1" ]; then elif [ "$safe" = "1" ] ; then - echo "Safe mode - battery saver" ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" + if [ ! "$txc" = "1" ] then + echo "Safe mode - battery saver won't work since no TXC present" + sleep 5 + elif [ ! "$soundcard" = "1" ] ; then + echo "Safe mode - battery saver won't work since no sound card present" + sleep 5 + else + echo "Safe mode - battery saver" + fi + elif [ "$vox" = "1" ]; then - echo "Using Soundcard Audio TX and RX (VOX, no PTT)" ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 17" + if [ "$soundcard" = "1" ] ; then + echo "Using Soundcard Audio TX and RX (VOX, no PTT)" + else + echo "Soundcard Audio TX and RX (VOX, no PTT) will not work since no sound card present" + sleep 5 + fi + elif [ "$pwm" = "1" ] ; then - echo "FM TXC using Soundcard input (JP13), PWM output" ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" + + if [ ! "$txc" = "1" ] then + echo "FM TXC using Soundcard input (JP13), PWM output won't work since no TXC present" + sleep 5 + elif [ ! "$soundcard" = "1" ] ; then + echo "FM TXC using Soundcard input (JP13), PWM output won't work since no sound card present" + sleep 5 + else + echo "FM TXC using Soundcard input (JP13), PWM output" + fi else echo "FM TXC using Soundcard input (JP13) and output (JP14)" ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" - PTT="PTT GPIOD gpiochip0 -20" + PTT="PTT GPIOD gpiochip0 -20" + + if [ ! "$txc" = "1" ] then + echo "FM TXC using Soundcard input (JP13) and output (JP14) won't work since no TXC present" + sleep 5 + elif [ ! "$soundcard" = "1" ] ; then + echo "FM TXC using Soundcard input (JP13), output (JP14) won't work since no sound card present" + sleep 5 + else + echo "FM TXC using Soundcard input (JP13), output JP14" + fi fi From 0761ced4ca8074e066a6ab77222fa3657bd3e800 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 22:21:16 -0400 Subject: [PATCH 0818/1744] Update pacsat.sh missing ; --- groundstation/pacsat.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 461d8069..ad7910aa 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -176,7 +176,7 @@ echo sudo usermod -a -G gpio pi -if [ "$loopback" = "1" ]; then +if [ "$loopback" = "1" ] ; then echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" @@ -187,7 +187,7 @@ elif [ "$safe" = "1" ] ; then ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" - if [ ! "$txc" = "1" ] then + if [ ! "$txc" = "1" ] ; then echo "Safe mode - battery saver won't work since no TXC present" sleep 5 elif [ ! "$soundcard" = "1" ] ; then @@ -197,7 +197,7 @@ elif [ "$safe" = "1" ] ; then echo "Safe mode - battery saver" fi -elif [ "$vox" = "1" ]; then +elif [ "$vox" = "1" ] ; then ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 17" @@ -214,7 +214,7 @@ elif [ "$pwm" = "1" ] ; then ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" - if [ ! "$txc" = "1" ] then + if [ ! "$txc" = "1" ] ; then echo "FM TXC using Soundcard input (JP13), PWM output won't work since no TXC present" sleep 5 elif [ ! "$soundcard" = "1" ] ; then @@ -230,7 +230,7 @@ else ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" PTT="PTT GPIOD gpiochip0 -20" - if [ ! "$txc" = "1" ] then + if [ ! "$txc" = "1" ] ; then echo "FM TXC using Soundcard input (JP13) and output (JP14) won't work since no TXC present" sleep 5 elif [ ! "$soundcard" = "1" ] ; then @@ -264,7 +264,7 @@ direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & cd /home/pi/Desktop/PacsatGround/ -if [ "$loopback" = "1" ]; then +if [ "$loopback" = "1" ] ; then setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGroundLoop" # removed & From 7fbfb32309bab1c9814ff4d363a37a90c2e930b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 17 Mar 2026 22:28:02 -0400 Subject: [PATCH 0819/1744] Update pacsat.sh cleanup --- groundstation/pacsat.sh | 46 ----------------------------------------- 1 file changed, 46 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index ad7910aa..545dea57 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -135,45 +135,11 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null -echo - #sudo systemctl restart pacsatsim #sudo /etc/init.d/alsa-utils stop #sudo /etc/init.d/alsa-utils start - -#echo "Waiting 10 seconds for Pacsatsim to start" - -#sleep 10 - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -#echo "Receive frequency is $8 MHz" -#echo "Transmit frequency is $7 MHz" -#echo -#echo "To change, quit and type CubeSatSim/config -F" -#echo - -#frequency="$8e6" - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -#echo - -echo -echo "The Pacsat Ground Station is running on this Pi using FM receiver or RTL-SDR" -echo - -#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -#setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & - -#direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 # & -#/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0" - sudo usermod -a -G gpio pi if [ "$loopback" = "1" ] ; then @@ -257,11 +223,6 @@ echo direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & -# arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & -##arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 435045 & - -# echo "Don't close the direwolf window or the Pacsatsim will stop running." - cd /home/pi/Desktop/PacsatGround/ if [ "$loopback" = "1" ] ; then @@ -273,13 +234,6 @@ else setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" # removed & fi -#cd /home/pi/Desktop/PacSatGround_0.46m_linux/ - -#sudo setsid java -Xmx512M -jar PacSatGround.jar "/home/pi/PacSatGround" - -cd - -#sudo systemctl stop pacsatsim sleep 10 From a3c3c165db88b402fdd4351f2346b4a2cc29419a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 12:24:16 -0400 Subject: [PATCH 0820/1744] Update PacSatSim.dat fix satellite name --- spacecraft/PacSatGround_0.46o/PacSatSim.dat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim.dat b/spacecraft/PacSatGround_0.46o/PacSatSim.dat index 1e5abfff..7b738eb6 100644 --- a/spacecraft/PacSatGround_0.46o/PacSatSim.dat +++ b/spacecraft/PacSatGround_0.46o/PacSatSim.dat @@ -10,7 +10,7 @@ layout0.name=TLMP1 layout1.filename=PacSatSim_rttelemetry.csv layout1.name=WOD passMeasurementsFileName=passmeasurements.csv -name=ISS +name=CubeSatSim description=PacSatSim satId=3 catalogNumber=0 From c6a2c31495ab4163f48e8ab511b3b38462370dff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:10:39 -0400 Subject: [PATCH 0821/1744] Update install fix kms setting --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 74a10384..06805f10 100755 --- a/install +++ b/install @@ -172,6 +172,8 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt sudo sed -i 's/#dtoverlay=vc4-fkms-v3d/dtoverlay=vc4-fkms-v3d/g' /boot/firmware/config.txt + sudo sed -i 's/#dtoverlay=vc4-kms-v3d/dtoverlay=vc4-kms-v3d/g' /boot/firmware/config.txt + if [[ $(grep 'dtoverlay=i2c-gpio,bus=3,i2c_gpio_delay_us=1,i2c_gpio_sda=23,i2c_gpio_scl=24' /boot/firmware/config.txt) ]]; then echo "dtoverlay=i2c-gpio already in /boot/firmware/config.txt" From a26bff8679574498f61eb7d2eb70892870fda1b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:13:58 -0400 Subject: [PATCH 0822/1744] Update pacsat-config.sh add missing cd --- groundstation/pacsat-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 65b49fde..776ea84b 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -159,6 +159,7 @@ sudo killall -9 direwolf &>/dev/null sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop + cd sudo rm PacSatGround.zip wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGroundLoop From d93ef609c1535fd9f1908409a20ff3e7ba8c5e92 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:14:44 -0400 Subject: [PATCH 0823/1744] Update pacsat.sh on first run, download zip file of spacecraft --- groundstation/pacsat.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 545dea57..9dcf8742 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -76,10 +76,15 @@ echo if [ ! -d "/home/pi/PacSatGround" ] ; then - mkdir /home/pi/PacSatGround - + sudo rm -r /home/pi/PacSatGround + cd + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGround + sudo rm PacSatGround.zip + echo - echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign" sleep 10 @@ -87,10 +92,13 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then - mkdir /home/pi/PacSatGroundLoop + sudo rm PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGroundLoop + sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to put in your callsign, add the Pacsatsim spacecraft then restart the Pacsat Ground Station" + echo "The first time you run the Ground Station, you will need to put in your callsign" sleep 10 From 3efc2cb03883feac0868e5317d4b54ab6cb489e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 13:24:59 -0400 Subject: [PATCH 0824/1744] Update pacsat.sh fix first time prints --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9dcf8742..8cd8114d 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -76,7 +76,6 @@ echo if [ ! -d "/home/pi/PacSatGround" ] ; then - sudo rm -r /home/pi/PacSatGround cd sudo rm PacSatGround.zip wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip @@ -84,7 +83,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to put in your callsign" + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" sleep 10 @@ -92,13 +91,14 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then + cd sudo rm PacSatGround.zip wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to put in your callsign" + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" sleep 10 From 000641f36fff1c7c3e1582096d07e01befb2a5f3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 15:51:03 -0400 Subject: [PATCH 0825/1744] Update config don't print no rtl-sdr --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 861b0624..9c01db76 100755 --- a/config +++ b/config @@ -343,7 +343,7 @@ if [ "$1" = "" ]; then timeout 1 rtl_test &> out.txt if [[ $(grep "No supported" out.txt) ]] ; then - echo "No RTL-SDR detected" +# echo "No RTL-SDR detected" rtl=0 else echo "RTL-SDR detected" From fd367d77a2dd0c995cc374ab3393f261fb4a7cee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 16:25:24 -0400 Subject: [PATCH 0826/1744] Update transmit.py repeater mode gain 8000 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 5ac26bb3..5c55381a 100644 --- a/transmit.py +++ b/transmit.py @@ -950,7 +950,7 @@ if __name__ == "__main__": if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") output(txLed, 1) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 16000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 8000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") while (input(squelch) == False): From 7c00ec70f18aa41b81880369841c04786104a97c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 16:27:22 -0400 Subject: [PATCH 0827/1744] Update transmit.py repeater gain 4000 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 5c55381a..cfaa2730 100644 --- a/transmit.py +++ b/transmit.py @@ -950,7 +950,7 @@ if __name__ == "__main__": if (input(squelch) == False) and (command_tx == True): print("Carrier detected, starting repeater") output(txLed, 1) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 8000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") while (input(squelch) == False): From 88956a36b2d55b7a9db5c829756fe676a4b5f507 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 18 Mar 2026 23:59:56 -0400 Subject: [PATCH 0828/1744] Delete pacsatsim-d.sh --- pacsatsim-d.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 pacsatsim-d.sh diff --git a/pacsatsim-d.sh b/pacsatsim-d.sh deleted file mode 100755 index 7480af0c..00000000 --- a/pacsatsim-d.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 From 50ba696b8b17c2e1635440a0b4e3ca38a222e0e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:13 -0400 Subject: [PATCH 0829/1744] Delete pacsat-test.sh --- pacsat-test.sh | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 pacsat-test.sh diff --git a/pacsat-test.sh b/pacsat-test.sh deleted file mode 100755 index dd43979c..00000000 --- a/pacsat-test.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim-d.sh" - -sleep 1 - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/pacsatsim.sh" - -sleep 1 - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-loopback.conf -t 0" - -sleep 1 - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "bash /home/pi/CubeSatSim/groundstation/pacsat.sh" - - From 55028e0692e8b08a128204825456c70ddd91b240 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:29 -0400 Subject: [PATCH 0830/1744] Delete pacsatsim-df.sh --- pacsatsim-df.sh | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 pacsatsim-df.sh diff --git a/pacsatsim-df.sh b/pacsatsim-df.sh deleted file mode 100755 index 90e5625c..00000000 --- a/pacsatsim-df.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -pwm=1 - -sudo modprobe snd-aloop - -sudo usermod -a -G gpio pi - -if [ "$pwm" = "1" ] ; then - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-pwm.conf -t 0 - -else - - direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14.conf -t 0 - -fi From 2ea40d3500c99ba156858e6b644ec8539bd1ac8c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:43 -0400 Subject: [PATCH 0831/1744] Delete pacsatsim-dj.sh --- pacsatsim-dj.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 pacsatsim-dj.sh diff --git a/pacsatsim-dj.sh b/pacsatsim-dj.sh deleted file mode 100755 index 888124e6..00000000 --- a/pacsatsim-dj.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-jp14-half.conf -t 0 From 97fd6433a8b6d5c6cc5d2a68b941c973a1ac67db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:00:59 -0400 Subject: [PATCH 0832/1744] Delete pacsatsim-djf.sh --- pacsatsim-djf.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 pacsatsim-djf.sh diff --git a/pacsatsim-djf.sh b/pacsatsim-djf.sh deleted file mode 100755 index 1d0c3036..00000000 --- a/pacsatsim-djf.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 From fe33cc013dc458ecf8631d6f6f77bca3ac9b158d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:01:33 -0400 Subject: [PATCH 0833/1744] Delete pacsatsim-f.sh --- pacsatsim-f.sh | 211 ------------------------------------------------- 1 file changed, 211 deletions(-) delete mode 100755 pacsatsim-f.sh diff --git a/pacsatsim-f.sh b/pacsatsim-f.sh deleted file mode 100755 index 2a8bb965..00000000 --- a/pacsatsim-f.sh +++ /dev/null @@ -1,211 +0,0 @@ -#!/bin/bash - -# script to auto decode packet using rtl_fm and Direwolf and run Pacsat - -export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - -#sudo systemctl stop cubesatsim - -#sudo systemctl stop transmit - -sudo systemctl stop command &>/dev/null - -sudo modprobe snd-aloop - -#sudo systemctl stop openwebrx - -#sudo systemctl stop rtl_tcp &>/dev/null - -#pkill -o chromium &>/dev/null - -#sudo killall -9 rtl_fm &>/dev/null - -#sudo killall -9 direwolf &>/dev/null - -#udo killall -9 aplay &>/dev/null - -#sudo killall -9 qsstv &>/dev/null - -#sudo killall -9 rtl_tcp &>/dev/null - -#sudo killall -9 java &>/dev/null - -#sudo killall -9 CubicSDR &>/dev/null - -#sudo killall -9 zenity &>/dev/null - -echo - -#frequency=$(zenity --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" 437100 "Serenity CubeSat 4800 bps" Serenity "Test Serenity CubeSat decoding with WAV file" APRS "Test APRS decoding with CubeSatSim WAV file") - -#echo $frequency - -#if [ -z "$frequency" ]; then - -#echo "No choice made. Exiting." - -#sleep 3 - -#exit - -#echo "Choose the number for the packet decoding option:" -#echo -#echo "1. APRS US 2m (144390 kHz)" -#echo "2. CubeSatSim (434900 kHz)" -#echo "3. APRS European 2m (144800 kHz)" -#echo "4. APRS Australian 2m (145175 kHz)" -#echo "5. APRS on another frequency" -#echo "6. APRS on ISS (145825 kHz)" -#echo "7. Serenity CubeSat 4800 bps (437.1 MHz)" -#echo "8. Test Serenity CubeSat decoding with WAV file" -#echo "9. Test APRS decoding with CubeSatSim WAV file" -#echo - -#read -r choice - -choice=2 - -#fi - -if [ "$choice" = "1" ] || [ "$frequency" = "144390" ]; then - - frequency=144390000 - -elif [ "$choice" = "2" ] || [ "$frequency" = "434900" ] ; then - - frequency=434900000 - echo - echo "If your Pacsat Ground Station is transmitting packets, you will see them here" - echo - -elif [ "$choice" = "3" ] || [ "$frequency" = "144800" ]; then - - frequency=144800000 - -elif [ "$choice" = "4" ] || [ "$frequency" = "145175" ]; then - - frequency=145175000 - -elif [ "$choice" = "5" ] || [ "$frequency" = "Other" ] ; then - - echo - - echo "Enter the frequency in kiloHertz" - - echo - - read -r frequency - - frequency=$frequency"000" - - #echo $frequency - -elif [ "$choice" = "6" ] || [ "$frequency" = "145825" ] ; then - - frequency=145825000 - echo - echo "If the ISS is overhead and in APRS mode (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "7" ] || [ "$frequency" = "437100" ] ; then - - frequency=437100000 - echo - echo "If the Serenity CubeSat is overhead and transmitting (see tracking application such as Gpredict), you will see packets." - echo - -elif [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] ; then - - echo "A recorded WAV file will play and you should see some packets decoded" - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - -# aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & -# aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/SDRSharp_20210830_200034Z_437097377Hz_AF.wav & - aplay -D hw:0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/groundstation/WAV/beacon_test_2.wav & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -elif [ "$choice" = "8" ] || [ "$frequency" = "APRS" ] ; then - - echo "A recorded APRS WAV file from the CubeSatSim will play and you should see a packet decoded." - - echo - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - #aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav & - (while true; do (sleep 2 && aplay -D hw:${2:0:1},0,0 /home/pi/CubeSatSim/telem.wav &>/dev/null); done) & - - timeout 30 direwolf -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf.conf -r 48000 -t 0 - - echo - - echo "Test complete. This window will close in 10 seconds." - - sleep 5 - - exit - -#fi - -fi - -#echo - -#echo "Note that the 'Tuned to' frequency will be different from the chosen frequency due to the way SDRs work." - -echo - -if [ "$choice" = "7" ] || [ "$choice" = "8" ] || [ "$frequency" = "Serenity" ] || [ "$frequency" = "437100000" ] ; then - - echo -e "Auto decoding 4800 bps AX.25 packets on $frequency Hz" - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-4800.conf -t 0 & - -else - -# echo -e "Auto decoding APRS Pacsat packets on $frequency Hz" - -# direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & - - /usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/pacsatsim-df.sh" - -### arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & - - echo "Don't close the direwolf window or the Pacsatsim will stop running." - - echo -fi - -sleep 5 - -value=`aplay -l | grep "Loopback"` -echo "$value" > /dev/null -set -- $value - -#rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -D hw:0,0 -r 48000 -t raw -f S16_LE -c 1 & - -cd /home/pi/pi_pacsat/Debug - -./pi_pacsat -c pacsat.config -d /home/pi/PacSat - -sleep 5 From 941db56402f0abdd0a7107d6574e77aa1d86df00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:01:56 -0400 Subject: [PATCH 0834/1744] Delete txLED.py --- txLED.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 txLED.py diff --git a/txLED.py b/txLED.py deleted file mode 100644 index af9b6d51..00000000 --- a/txLED.py +++ /dev/null @@ -1,25 +0,0 @@ -import RPi.GPIO as GPIO -import subprocess -import time -import os -from time import sleep - -txPin = 27 -pttPin = 20 - -GPIO.setmode(GPIO.BCM) -GPIO.setwarnings(False) -GPIO.setup(txPin, GPIO.OUT) -GPIO.output(txPin, 0) -print("0") -GPIO.setup(pttPin, GPIO.IN, pull_up_down=GPIO.PUD_UP) - -while (True): - sleep(0.1) - GPIO.wait_for_edge(pttPin, GPIO.FALLING) - GPIO.output(txPin, 1) - sleep(0.1) - print("1") - GPIO.wait_for_edge(pttPin, GPIO.RISING) - GPIO.output(txPin, 0) - print("0") From 41a81a72e44851de9400458010eb1ee22287956c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:02:29 -0400 Subject: [PATCH 0835/1744] Delete direwolf/direwolf-pacsatsim-jp14-half.conf --- direwolf/direwolf-pacsatsim-jp14-half.conf | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-jp14-half.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-half.conf b/direwolf/direwolf-pacsatsim-jp14-half.conf deleted file mode 100644 index d6a05876..00000000 --- a/direwolf/direwolf-pacsatsim-jp14-half.conf +++ /dev/null @@ -1,9 +0,0 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -#FULLDUP ON -FULLDUP OFF -TXDELAY 15 -#FIX_BITS 1 AX25 From 699241ced8a643054e85a2992f466204e9311873 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:02:40 -0400 Subject: [PATCH 0836/1744] Delete direwolf/direwolf-pacsatsim-jp14-loop.conf --- direwolf/direwolf-pacsatsim-jp14-loop.conf | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-jp14-loop.conf diff --git a/direwolf/direwolf-pacsatsim-jp14-loop.conf b/direwolf/direwolf-pacsatsim-jp14-loop.conf deleted file mode 100644 index bd04ddbc..00000000 --- a/direwolf/direwolf-pacsatsim-jp14-loop.conf +++ /dev/null @@ -1,15 +0,0 @@ -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -#FULLDUP ON -TXDELAY 15 -#FIX_BITS 1 AX25 -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -TXTAIL 10 -FULLDUP OFF From cc3a2452d1ade9d200986c11a064be28a2be7122 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:03:03 -0400 Subject: [PATCH 0837/1744] Delete direwolf/direwolf-pacsatsim-jp14.conf --- direwolf/direwolf-pacsatsim-jp14.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-jp14.conf diff --git a/direwolf/direwolf-pacsatsim-jp14.conf b/direwolf/direwolf-pacsatsim-jp14.conf deleted file mode 100644 index 750c0fee..00000000 --- a/direwolf/direwolf-pacsatsim-jp14.conf +++ /dev/null @@ -1,19 +0,0 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -ADEVICE shared_mic plughw:CARD=Device,DEV=0 -PTT GPIO -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF From e88234a816f35e92245d8eca52ce0b9b39262515 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:03:15 -0400 Subject: [PATCH 0838/1744] Delete direwolf/direwolf-pacsatsim-loopback.conf --- direwolf/direwolf-pacsatsim-loopback.conf | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-loopback.conf diff --git a/direwolf/direwolf-pacsatsim-loopback.conf b/direwolf/direwolf-pacsatsim-loopback.conf deleted file mode 100644 index f2ebf026..00000000 --- a/direwolf/direwolf-pacsatsim-loopback.conf +++ /dev/null @@ -1,18 +0,0 @@ -ADEVICE plughw:CARD=Loopback,DEV=0 plughw:CARD=Loopback,DEV=0 -PTT GPIO -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF From bb4d84bc645b654d3e915a14591584c624ee7ad5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:03:45 -0400 Subject: [PATCH 0839/1744] Delete direwolf/direwolf-pacsatsim-pwm-loopback.conf --- direwolf/direwolf-pacsatsim-pwm-loopback.conf | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-pwm-loopback.conf diff --git a/direwolf/direwolf-pacsatsim-pwm-loopback.conf b/direwolf/direwolf-pacsatsim-pwm-loopback.conf deleted file mode 100644 index 0d4d022d..00000000 --- a/direwolf/direwolf-pacsatsim-pwm-loopback.conf +++ /dev/null @@ -1,20 +0,0 @@ -ADEVICE shared_mic plughw:CARD=Loopback,DEV=0 -PTT GPIOD gpiochip0 17 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF - -DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From 20a6e49d84e15c464480bb0abcb6e2a1251d43db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:04:01 -0400 Subject: [PATCH 0840/1744] Delete direwolf/direwolf-pacsatsim-pwm.conf --- direwolf/direwolf-pacsatsim-pwm.conf | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 direwolf/direwolf-pacsatsim-pwm.conf diff --git a/direwolf/direwolf-pacsatsim-pwm.conf b/direwolf/direwolf-pacsatsim-pwm.conf deleted file mode 100644 index 0b220148..00000000 --- a/direwolf/direwolf-pacsatsim-pwm.conf +++ /dev/null @@ -1,21 +0,0 @@ -#ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -ADEVICE shared_mic plughw:CARD=Headphones,DEV=0 -PTT GPIOD gpiochip0 -20 -MYCALL AMSAT-12 -CHANNEL 0 -MODEM 1200 -##FULLDUP ON -##TXDELAY 15 -#FIX_BITS 1 AX25 - -# -DWAIT 0 -SLOTTIME 10 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 100 -TXTAIL 10 -#TXTAIL 1 -FULLDUP OFF - -DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From ced62e0286295d8810126705b2765ae18c8a1132 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:04:32 -0400 Subject: [PATCH 0841/1744] Delete direwolf/direwolf.conf --- direwolf/direwolf.conf | 1 - 1 file changed, 1 deletion(-) delete mode 100644 direwolf/direwolf.conf diff --git a/direwolf/direwolf.conf b/direwolf/direwolf.conf deleted file mode 100644 index 701d80b4..00000000 --- a/direwolf/direwolf.conf +++ /dev/null @@ -1 +0,0 @@ -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0 From 44ec5a6bbb06253c62fc9c16b195d69c63d115ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:05:00 -0400 Subject: [PATCH 0842/1744] Delete groundstation/pacsat-d.sh --- groundstation/pacsat-d.sh | 5 ----- 1 file changed, 5 deletions(-) delete mode 100755 groundstation/pacsat-d.sh diff --git a/groundstation/pacsat-d.sh b/groundstation/pacsat-d.sh deleted file mode 100755 index a794108c..00000000 --- a/groundstation/pacsat-d.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -sudo modprobe snd-aloop - -direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-pacsat-loopback.conf -t 0 From 5e5ca19f5b1275d8286c0bb7f962704cd739dc72 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:05:23 -0400 Subject: [PATCH 0843/1744] Delete groundstation/pacsat-df.sh --- groundstation/pacsat-df.sh | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100755 groundstation/pacsat-df.sh diff --git a/groundstation/pacsat-df.sh b/groundstation/pacsat-df.sh deleted file mode 100755 index 99ffc988..00000000 --- a/groundstation/pacsat-df.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -pwm=1 - -sudo modprobe snd-aloop - -#gpio -g mode 20 out - -#gpio -g write 20 1 - -#direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 - -if [ "$pwm" = "1" ] ; then - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf -t 0 - -else - - direwolf -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0 - -fi From bbe6740c148b94682146039c56bc39d749d5fe94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:05:38 -0400 Subject: [PATCH 0844/1744] Delete groundstation/pacsat-dj.sh --- groundstation/pacsat-dj.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100755 groundstation/pacsat-dj.sh diff --git a/groundstation/pacsat-dj.sh b/groundstation/pacsat-dj.sh deleted file mode 100755 index 7a49576e..00000000 --- a/groundstation/pacsat-dj.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -/usr/bin/x-terminal-emulator --geometry=120x40 -e "direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf -t 0" - - - From cefba788f4cccde9ee3b7088719e78b7bd75eee4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:06:10 -0400 Subject: [PATCH 0845/1744] Delete groundstation/pacsatlog.desktop --- groundstation/pacsatlog.desktop | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/pacsatlog.desktop diff --git a/groundstation/pacsatlog.desktop b/groundstation/pacsatlog.desktop deleted file mode 100644 index b3032884..00000000 --- a/groundstation/pacsatlog.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Pacsat Log -GenericName=Pacsat Loopback -Comment=Pacsat -Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/log -p" -Icon=/home/pi/Icons/pacsat.png -Terminal=true -Type=Application -Categories=HamRadio; -Keywords=APRS; From c24b0165388e9bdde586568aa905aaef5627ffda Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:07:48 -0400 Subject: [PATCH 0846/1744] Delete groundstation/reset_pacsat.sh --- groundstation/reset_pacsat.sh | 55 ----------------------------------- 1 file changed, 55 deletions(-) delete mode 100755 groundstation/reset_pacsat.sh diff --git a/groundstation/reset_pacsat.sh b/groundstation/reset_pacsat.sh deleted file mode 100755 index 34e153a3..00000000 --- a/groundstation/reset_pacsat.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/bash - -# script to clear Pacsat Ground Station and Pacsatsim state - -echo "Clearing all Pacsat Ground Station and Pacsatsim state" - -echo - -sudo systemctl stop pacsatsim - -#sudo killall -9 direwolf &>/dev/null - -sudo killall -9 java &>/dev/null - -cd - -cd pi_pacsat - -cd Debug - -sudo rm -r /home/pi/PacSat - -mkdir /home/pi/PacSat -mkdir /home/pi/PacSat/pacsat -mkdir /home/pi/PacSat/pacsat/dir - -#value=`cat /home/pi/CubeSatSim/sim.cfg` -#echo "$value" > /dev/null -#set -- $value - -echo "bit_rate=9600" > pacsat.config -echo "bbs_callsign=AMSAT-12" >> pacsat.config -echo "broadcast_callsign=AMSAT-11" >> pacsat.config -echo "digi_callsign=AMSAT-1" >> pacsat.config -echo "max_frames_in_tx_buffer=5" >> pacsat.config - -sudo rm pacsat_last_command_time.dat -sudo rm pacsat_upload_table.dat -sudo rm pacsat.state - -echo "pb_open=1" > pacsat.state -echo "uplink_open=1" >> pacsat.state -echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state -echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state - -touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat - -sudo rm -r /home/pi/PacSatGround - -mkdir /home/pi/PacSatGround - -echo - -echo "You will need to install the Pacsatsim spacecraft file and set the Delay to 750ms and Port to 8100 and restart the Pacsat Ground Station" - From b756b1e53a1d763dc35fbf8a04a835fa60b3d4dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:08:31 -0400 Subject: [PATCH 0847/1744] Delete groundstation/direwolf/direwolf-pacsat-loopback.conf --- .../direwolf/direwolf-pacsat-loopback.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-pacsat-loopback.conf diff --git a/groundstation/direwolf/direwolf-pacsat-loopback.conf b/groundstation/direwolf/direwolf-pacsat-loopback.conf deleted file mode 100644 index 6cd3d988..00000000 --- a/groundstation/direwolf/direwolf-pacsat-loopback.conf +++ /dev/null @@ -1,19 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=1 -PTT GPIO -20 27 #Transmit LED -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -#FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 - -#DWAIT 0 -DWAIT 20 -SLOTTIME 300 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 150 -#TXTAIL 10 -FULLDUP OFF From 5609b9426d730f6a3916cfefc941c1a49c5904df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:08:42 -0400 Subject: [PATCH 0848/1744] Delete groundstation/direwolf/direwolf-fm-pacsat.conf --- groundstation/direwolf/direwolf-fm-pacsat.conf | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat.conf b/groundstation/direwolf/direwolf-fm-pacsat.conf deleted file mode 100644 index 53524acb..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat.conf +++ /dev/null @@ -1,7 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO 20 -KISSPORT 8100 -FULLDUP OFF -CHANNEL 0 -MODEM 1200 From 4f556ec5358480ae6ac3a2f7913950445c7e06f7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:08:52 -0400 Subject: [PATCH 0849/1744] Delete groundstation/direwolf/direwolf-fm-pacsat-pwm.conf --- .../direwolf/direwolf-fm-pacsat-pwm.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-pwm.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf b/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf deleted file mode 100644 index c1d5f5f9..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-pwm.conf +++ /dev/null @@ -1,19 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Headphones,DEV=0 -PTT GPIO -20 27 #Transmit LED -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -#FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 - -#DWAIT 0 -DWAIT 20 -SLOTTIME 300 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 150 -#TXTAIL 10 -FULLDUP OFF From b24c51e00e7797a29f36c1b4a85d478a31ae5d9a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:04 -0400 Subject: [PATCH 0850/1744] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14.conf --- .../direwolf/direwolf-fm-pacsat-jp14.conf | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf deleted file mode 100644 index 5df8f59e..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14.conf +++ /dev/null @@ -1,19 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO -20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -#FULLDUP OFF -#TXDELAY 30 -#FIX_BITS 1 AX25 - -#DWAIT 0 -DWAIT 20 -SLOTTIME 300 -PERSIST 63 -TXDELAY 1000 -#TXDELAY 150 -#TXTAIL 10 -FULLDUP OFF From 06bcd1022e15ea2b08ba07059f18513453f1f13d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:13 -0400 Subject: [PATCH 0851/1744] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf --- .../direwolf/direwolf-fm-pacsat-jp14-device.conf | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf deleted file mode 100644 index df741a62..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14-device.conf +++ /dev/null @@ -1,10 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -#PTT GPIO 20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 -#FIX_BITS 1 AX25 From 0eae3bb40b6882414804da2e13719fb9d65df89d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:41 -0400 Subject: [PATCH 0852/1744] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf --- .../direwolf/direwolf-fm-pacsat-jp14-loop.conf | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf deleted file mode 100644 index cac3fffe..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14-loop.conf +++ /dev/null @@ -1,10 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Loopback,DEV=0 -#PTT GPIO 20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 -#FIX_BITS 1 AX25 From 882747438466e803c53ad87bfdf5d151326ade10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 00:09:51 -0400 Subject: [PATCH 0853/1744] Delete groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf --- .../direwolf/direwolf-fm-pacsat-jp14-ptt.conf | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf diff --git a/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf b/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf deleted file mode 100644 index 279b7e0e..00000000 --- a/groundstation/direwolf/direwolf-fm-pacsat-jp14-ptt.conf +++ /dev/null @@ -1,10 +0,0 @@ -MYCALL AMSAT -ADEVICE plughw:CARD=Device,DEV=0 plughw:CARD=Device,DEV=0 -PTT GPIO 20 -CHANNEL 0 -MODEM 1200 -KISSPORT 8100 -AGWPORT 8002 -FULLDUP OFF -TXDELAY 30 -#FIX_BITS 1 AX25 From 4cb685a5e54f8bb7377a7d4b4a3298e4f4555d89 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 11:19:09 -0400 Subject: [PATCH 0854/1744] Update install add auto remove at end --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 06805f10..20af2866 100755 --- a/install +++ b/install @@ -821,6 +821,8 @@ sed -i 's/quick_exec=0/quick_exec=1/' ~/.config/libfm/libfm.conf sudo apt install -y raspberrypi-ui-mods +sudo apt autoremove -y + if [ "$noreboot" = "0" ] ; then if [ $FLAG -eq 1 ]; then # Not sure if this is needed From c8c7859e5a1b78497cf4b49bb0781472178bb8bc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 11:50:48 -0400 Subject: [PATCH 0855/1744] Update pacsat.sh check for PacSat Ground mode before running --- groundstation/pacsat.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 8cd8114d..879ae1ec 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -61,6 +61,44 @@ if [ -f "$FILE" ]; then fi +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value + +MODE=$1 + +if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then + + echo "Mode is not PacSat Ground Station" + echo + echo "Would you like to change to PacSat Ground Station mode and reboot? (y/n)?" + + read -r ANS + + if [ "$ANS" = "y" ]; then + + /home/pi/CubeSatSim/config -I + exit + + else + + echo "You can run the PacSat Ground Station after you change mode and reboot." + exit + + fi + +elif [ "$loopback" = "1" ] ; then + + echo "Simulated PacSatSim so mode doesn't matter" + echo + +else + + echo "Mode is PacSat Ground Station" + echo + +fi + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value From 7be11fb8fb538cf70407981f54e0ea85d3932f14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 11:57:04 -0400 Subject: [PATCH 0856/1744] Update pacsat.sh added extra spaces --- groundstation/pacsat.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 879ae1ec..a4cebece 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -69,6 +69,7 @@ MODE=$1 if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then + echo echo "Mode is not PacSat Ground Station" echo echo "Would you like to change to PacSat Ground Station mode and reboot? (y/n)?" @@ -81,19 +82,23 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then exit else - + + echo echo "You can run the PacSat Ground Station after you change mode and reboot." + sleep 10 exit fi elif [ "$loopback" = "1" ] ; then + echo echo "Simulated PacSatSim so mode doesn't matter" echo else + echo echo "Mode is PacSat Ground Station" echo From a75fe7433860fa2eca8c3a3dba94ebb25e000b7e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:00:58 -0400 Subject: [PATCH 0857/1744] Delete spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame --- .../PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame deleted file mode 100644 index 050ff88a..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_Type1_HEALTH.frame +++ /dev/null @@ -1,13 +0,0 @@ -number_of_payloads=6 -payload0.name=rttelemetry -payload0.length=78 -payload1.name=rttelemetry -payload1.length=78 -payload2.name=rttelemetry -payload2.length=78 -payload3.name=rttelemetry -payload3.length=78 -payload4.name=rttelemetry -payload4.length=78 -payload5.name=wodtelemetry -payload5.length=78 From 5faa24c6f3b2ee3a71f64bee840aac02269cdd98 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:01:43 -0400 Subject: [PATCH 0858/1744] Delete spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame --- .../PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame b/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame deleted file mode 100644 index a69be045..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_Type2_MINMAX.frame +++ /dev/null @@ -1,13 +0,0 @@ -number_of_payloads=6 -payload0.name=rttelemetry -payload0.length=78 -payload1.name=rttelemetry -payload1.length=78 -payload2.name=rttelemetry -payload2.length=78 -payload3.name=maxtelemetry -payload3.length=78 -payload4.name=mintelemetry -payload4.length=78 -payload5.name=wodtelemetry -payload5.length=78 From 8bccf46c6cd5043604e1dd1bb6548a1c51f25530 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:02:10 -0400 Subject: [PATCH 0859/1744] Delete spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv --- .../PacSatSim_maxtelemetry.csv | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv deleted file mode 100644 index 7713c778..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_maxtelemetry.csv +++ /dev/null @@ -1,64 +0,0 @@ -62,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,long,timestamp,32,Sec,0,NONE,0,0,0,timestamp,This is the unix time in seconds -1,MAX,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -2,MAX,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -3,MAX,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage -4,MAX,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -5,MAX,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -6,MAX,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -7,MAX,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current -8,MAX,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -9,MAX,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage -10,MAX,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage -11,MAX,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage -12,MAX,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage -13,MAX,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage -14,MAX,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage -15,MAX,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current -16,MAX,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current -17,MAX,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current -18,MAX,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current -19,MAX,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current -20,MAX,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current -21,MAX,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage -22,MAX,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -23,MAX,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -24,MAX,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -25,MAX,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -26,MAX,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication -27,MAX,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -28,MAX,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -29,MAX,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -30,MAX,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -31,MAX,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity -32,MAX,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current -33,MAX,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature -34,MAX,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -35,MAX,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -36,MAX,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -37,MAX,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -38,MAX,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -39,MAX,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -40,MAX,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -41,MAX,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -42,MAX,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator -43,MAX,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received -44,MAX,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status -45,MAX,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status -46,MAX,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status -47,MAX,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -48,MAX,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -49,MAX,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -50,MAX,rf6,12,-,0,NONE,0,0,0,None,None -51,MAX,rf7,12,-,0,NONE,0,0,0,None,None -52,MAX,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -53,MAX,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -54,MAX,pad,4,-,34,NONE,0,0,0,None,Unused -55,MAX,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -56,MAX,pad1,1,-,0,NONE,0,0,0,NONE,Filler -57,MAX,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -58,MAX,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -59,MAX,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -60,MAX,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -61,MAX,pad2,27,-,0,NONE,0,0,0,NONE,Filler - From 830c94501c08c3e25a5f64add54e81e8741c6d6b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:02:33 -0400 Subject: [PATCH 0860/1744] Delete spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv --- .../PacSatSim_mintelemetry.csv | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv deleted file mode 100644 index adf24a04..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_mintelemetry.csv +++ /dev/null @@ -1,62 +0,0 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,MIN,Sensor 2,12,integer,1,NONE,6,8,3,Sensor 2,STEM Payload Extra Sensor 2 -1,MIN,Sensor 3,12,integer,1,NONE,6,9,3,Sensor 3,STEM Payload Extra Sensor 3 -2,MIN,BATT_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Battery Voltage,INA219 Battery Voltage -3,MIN,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,7,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around X Axis -4,MIN,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,8,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Y Axis -5,MIN,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,NONE,9,4,3,Acceleration,STEM Payload Board MPU6050 Acceleration around Z Axis -6,MIN,BATT_I,12,mA,cubesatsim_current,NONE,4,2,3,Battery Current,INA219 Battery Current -7,MIN,Temperature,12,C,cubesatsim_temperature,NONE,6,2,3,BME280 Temp,BME280 STEM Payload sensor temperature -8,MIN,posXv,12,V,cubesatsim_voltage|FLOAT2,NONE,7,1,3,Voltage,INA219 +X solar panel Voltage -9,MIN,posYv,12,V,cubesatsim_voltage|FLOAT2,NONE,8,1,3,Voltage,INA219 +Y solar panel Voltage -10,MIN,posZv,12,V,cubesatsim_voltage|FLOAT2,NONE,9,1,3,Voltage,INA219 +Z solar panel Voltage -11,MIN,negXv,12,V,cubesatsim_voltage|FLOAT2,NONE,10,1,3,Voltage,INA219 -X solar panel Voltage -12,MIN,negYv,12,V,cubesatsim_voltage|FLOAT2,NONE,11,1,3,Voltage,INA219 -Y solar panel Voltage -13,MIN,negZv,12,V,cubesatsim_voltage|FLOAT2,NONE,12,1,3,Voltage,INA219 -Z solar panel Voltage -14,MIN,posXi,12,mA,cubesatsim_current,NONE,7,2,3,Current,INA219 +X solar panel Current -15,MIN,posYi,12,mA,cubesatsim_current,NONE,8,2,3,Current,INA219 +Y solar panel Current -16,MIN,posZi,12,mA,cubesatsim_current,NONE,9,2,3,Current,INA219 +Z solar panel Current -17,MIN,negXi,12,mA,cubesatsim_current,NONE,10,2,3,Current,INA219 -X solar panel Current -18,MIN,negYi,12,mA,cubesatsim_current,NONE,11,2,3,Current,INA219 -Y solar panel Current -19,MIN,negZi,12,mA,cubesatsim_current,NONE,12,2,3,Current,INA219 -Z solar panel Current -20,MIN,BATT2_V,12,V,cubesatsim_voltage|FLOAT2,NONE,5,1,3,Battery 2 Voltage,INA219 Battery 2 Voltage -21,MIN,spin,12,rpm,cubesatsim_rpm,NONE,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,MIN,Pressure,12,hPa,cubesatsim_pressure,NONE,6,3,3,BME280 Pressure,BME280 STEM Payload sensor pressure -23,MIN,Altitude,12,m,cubesatsim_altitude,NONE,6,4,3,BME280 Altitude,BME280 STEM Payload sensor altitude -24,MIN,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,MIN,rssi,12,dBm,cubesatsim_rssi|INT,NONE,1,1,3,RSSI,Received Signal Strength Indication -26,MIN,IHUcpuTemp,12,C,cubesatsim_temperature,NONE,2,1,3,IHU Temp (Pi),Internal temperature of IHU from Pi -27,MIN,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,7,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around X Axis -28,MIN,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,8,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Y Axis -29,MIN,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,NONE,9,3,3,Rotation,STEM Payload Board MPU6050 Angular veolcity around Z Axis -30,MIN,Humidity,12,%,cubesatsim_temperature,NONE,6,5,3,BME280 Humidity,BME280 Humidity -31,MIN,BAT2_I,12,mA,cubesatsim_current,NONE,5,2,3,Battery 2 Current,INA219 Battery 2 Current -32,MIN,DiodeTemp,12,C,cubesatsim_rpm,NONE,6,6,3,Diode Temp,STEM Payload Diode Temperature -33,MIN,Sensor 1,12,integer,1,NONE,6,7,3,Sensor 1,STEM Payload Extra Sensor 1 -34,MIN,STEMPayloadStatus,1,-,17,NONE,6,1,0,STEM Payload Status, STEM Payload STEM Payload board failure Indicator -35,MIN,SafeMode,1,-,STATUS_ON_OFF,NONE,3,2,0,Safe Mode, Safe Mode (Low Battery Voltage) -36,MIN,SimulatedTelemetry,1,-,STATUS_ON_OFF,NONE,3,4,0,Simulated Telemetry,Simulated Telemetry Indicator -37,MIN,PayloadStatus1,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 1 failure indicator -38,MIN,I2CBus0Failure,1,-,17,NONE,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,MIN,I2CBus1Failure,1,-,17,NONE,2,2,0,I2C Bus 1,I2C bus 1 failure indicator -40,MIN,I2CBus3Failure,1,-,17,NONE,2,3,0,I2C Bus 3,I2C bus 3 failure indicator -41,MIN,CameraFailure,1,-,17,NONE,2,4,0,Camera,Camera failure indicator -42,MIN,GroundCommands,4,-,1,NONE,3,3,0,Ground Commands,Number of ground commands received -43,MIN,RxAntenna,1,-,16,NONE,1,3,0,RX Antenna,Receive antenna status -44,MIN,TxAntenna,1,-,16,NONE,1,2,0,TX Antenna,Transmit antenna status -45,MIN,C2CStatus,2,-,COMMAND_STATUS,NONE,3,5,0,Command Control, Command & Control Status -46,MIN,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -47,MIN,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -48,MIN,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -49,MIN,rf6,12,-,0,NONE,0,0,0,None,None -50,MIN,rf7,12,-,0,NONE,0,0,0,None,None -51,MIN,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -52,MIN,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -53,MIN,pad,4,-,34,NONE,0,0,0,None,Unused -54,MIN,IHUdiagData,32,-,18,NONE,3,2,0,Diagnostic Info,Diagnostic Data on IHU Performance -55,MIN,pad1,1,-,0,NONE,0,0,0,NONE,Filler -56,MIN,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -57,MIN,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -58,MIN,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -59,MIN,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -60,MIN,pad2,27,-,0,NONE,0,0,0,NONE,Filler From defe5ac4851953d6ab493f465fc8ac7c96679660 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 12:02:55 -0400 Subject: [PATCH 0861/1744] Delete spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv --- .../PacSatSim_wodtelemetry.csv | 62 ------------------- 1 file changed, 62 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv diff --git a/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv b/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv deleted file mode 100644 index d1b53340..00000000 --- a/spacecraft/PacSatGround_0.46o/PacSatSim_wodtelemetry.csv +++ /dev/null @@ -1,62 +0,0 @@ -61,TYPE,FIELD,BITS,UNIT,CONVERSION,MODULE,MODULE_NUM,MODULE_LINE,LINE_TYPE,SHORT_NAME,DESCRIPTION -0,WOD,BATT_A_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,1,3,Cell A,Battery A voltage (0-2.5V scale) -1,WOD,BATT_B_V,12,V,cubesatsim_voltage|FLOAT2,NONE,4,2,3,Cell A+B,Battery A+B voltage (0-3.3V scale) -2,WOD,BATT_V,12,V,cubesatsim_voltage|FLOAT2,Battery,4,1,3,Cell A+B+C Voltage,Battery A+B+C voltage (0-5.0V scale) -3,WOD,SatelliteXAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+X Panel,7,4,3,Acceleration,Acceleration around X Axis -4,WOD,SatelliteYAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Y Panel,8,4,3,Acceleration,Acceleration around Y Axis -5,WOD,SatelliteZAxisAcceleration,12,g,cubesatsim_acceleration|FLOAT2,+Z Panel,9,4,3,Acceleration,Acceleration around Z Axis -6,WOD,battCurr,12,mA,cubesatsim_current,Battery,4,2,4,Current,Total Battery DC current -7,WOD,Temperature,12,C,cubesatsim_temperature,Experiments,6,2,3,Temperature,STEM Payload Sensor Temperature -8,WOD,posXv,12,V,cubesatsim_voltage|FLOAT2,+X Panel,7,1,3,Voltage,+X solar Panel voltage -9,WOD,posYv,12,V,cubesatsim_voltage|FLOAT2,+Y Panel,8,1,3,Voltage,+Y solar Panel voltage -10,WOD,posZv,12,V,cubesatsim_voltage|FLOAT2,+Z Panel,9,1,3,Voltage,+Z solar Panel voltage -11,WOD,negXv,12,V,cubesatsim_voltage|FLOAT2,-X Panel,10,1,3,Voltage,-X solar Panel voltage -12,WOD,negYv,12,V,cubesatsim_voltage|FLOAT2,-Y Panel,11,1,3,Voltage,-Y solar Panel voltage -13,WOD,negZv,12,V,cubesatsim_voltage|FLOAT2,-Z Panel,12,1,3,Voltage,-Z solar Panel voltage -14,WOD,posXi,12,mA,cubesatsim_current,+X Panel,7,2,4,Current,+X solar Panel current -15,WOD,posYi,12,mA,cubesatsim_current,+Y Panel,8,2,4,Current,+Y solar Panel current -16,WOD,posZi,12,mA,cubesatsim_current,+Z Panel,9,2,4,Current,+Z solar Panel current -17,WOD,negXi,12,mA,cubesatsim_current,-X Panel,10,2,4,Current,-X solar Panel current -18,WOD,negYi,12,mA,cubesatsim_current,-Y Panel,11,2,4,Current,-Y solar Panel current -19,WOD,negZi,12,mA,cubesatsim_current,-Z Panel,12,2,4,Current,-Z solar Panel current -20,WOD,PSUVoltage,12,V,cubesatsim_voltage|FLOAT2,PSU,5,1,3,Voltage,Power Supply Voltage -21,WOD,spin,12,rpm,12,Computer Software,3,1,3,Spacecraft Spin,Calculated spin rate using solar cells -22,WOD,Pressure,12,bar,cubesatsim_pressure,Experiments,6,3,3,Pressure,STEM Payload Sensor Pressure -23,WOD,Altitude,12,m,cubesatsim_altitude,Experiments,6,4,3,Altitude,STEM Payload Sensor Altitude -24,WOD,Resets,12,-,12,NONE,3,2,3,Reset Count, Software Reset Count -25,WOD,rssi,12,dBm,14,Radio,1,1,3,RSSI,Received Signal Strength Indication -26,WOD,IHUcpuTemp,12,C,cubesatsim_temperature,Computer Hardware,2,1,3,Temperature,Internal Temperature of IHU -27,WOD,SatelliteXAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+X Panel,7,3,3,Rotation,Angular Veolcity around X Axis -28,WOD,SatelliteYAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Y Panel,8,3,3,Rotation,Angular Veolcity around Y Axis -29,WOD,SatelliteZAxisAngularVelocity,12,dps,cubesatsim_rotation|INT,+Z Panel,9,3,3,Rotation,Angular Veolcity around Z Axis -30,WOD,Sensor1,12,raw,cubesatsim_sensor1|INT,Experiments,6,5,3,Sensor 1,STEM Payload Extra Sensor 1 -31,WOD,PSUCurrent,12,mA,cubesatsim_current,PSU,5,2,3,Current,Power Supply DC Current -32,WOD,Sensor2,12,signed raw,cubesatsim_sensor2|INT,Experiments,6,6,3,Sensor 2,STEM Payload Extra Sensor 2 -33,WOD,Sensor3,12,signed scaled,cubesatsim_sensor3|FLOAT2,Experiments,6,7,3,Sensor 3,STEM Payload Extra Sensor 3 -34,WOD,STEMPayloadStatus,1,-,17,Experiments,6,1,0,STEM Payload Status, STEM Payload STEM Payload Board Failure Indicator -35,WOD,Nominal Mode,1,-,17,Computer Software,3,2,0,Nominal Mode, Nominal Mode (Not Safe Mode) -36,WOD,PayloadStatus1,1,-,17,NONE,6,7,0,Exp 2,STEM Payload status 1 failure indicator -37,WOD,PayloadStatus2,1,-,17,NONE,6,8,0,Exp 3,STEM Payload status 2 failure indicator -38,WOD,I2CBus0Failure,1,-,17,Computer Hardware,2,2,0,I2C Bus 0,I2C bus 0 failure indicator -39,WOD,I2CBus1Failure,1,-,17,Computer Hardware,2,3,0,I2C Bus 1,I2C bus 1 failure indicator -40,WOD,I2CBus3Failure,1,-,17,Computer Hardware,2,4,0,I2C Bus 3,I2C bus 3 failure indicator -41,WOD,CameraFailure,1,-,17,Computer Hardware,2,5,0,Camera,Camera failure indicator -42,WOD,GroundCommands,4,-,1,Computer Software,3,3,0,Ground Commands,Number of ground commands received -43,WOD,RxAntDeploy,1,-,16,Radio,1,3,0,RX Antenna,Receive antenna status -44,WOD,TxAntDeploy,2,-,16,Radio,1,2,0,TX Antenna,Transmit antenna status -45,WOD,ICR3VProt,12,V,43,NONE,7,2,3,3V Prot,ICR 3V Proteted -46,WOD,ICR2dot5V,12,V,43,NONE,7,3,3,2.5V,ICR 2.5V -47,WOD,ICR2dot5VProt,12,V,43,NONE,7,4,3,2.5V Prot,ICR 2.5V Protected -48,WOD,rf6,12,-,0,NONE,0,0,0,None,None -49,WOD,rf7,12,-,0,NONE,0,0,0,None,None -50,WOD,MuxTest,12,V,43,NONE,7,5,3,Sensor Power,Sensor Power Voltage at the ICR -51,WOD,LtVGACtl,12,V,42,NONE,1,4,3,VGA Control,Control Voltage to the Variable Gain Amplifier (VGA) -52,WOD,pad,4,-,34,NONE,0,0,0,None,Unused -53,WOD,WODTimeStampReset,16,-,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected -54,WOD,pad1,17,-,0,NONE,0,0,0,NONE,Filler -55,WOD,wodSize,8,000s,36,NONE,3,3,0,WOD Stored,Number of WOD data payloads kept for each of Science and Housekeeping. In hundreds -56,WOD,swCmds,32,-,35,NONE,7,6,0,Diagnostic,ICR Diagnostic information -57,WOD,hwCmdCnt,6,-,1,NONE,7,7,0,HW Command Count,Number of hardware commands since last reset -58,WOD,swCmdCnt,6,-,1,NONE,7,8,0,SW Command Count,Number of software commands since last reset -59,WOD,WODTimeStampUpTime,25,s,1,NONE,0,0,0,MAX Timestamp Uptime, Time Whole Orbit Data was collected -60,WOD,pad2,3,-,0,NONE,0,0,0,NONE,Filler From 27fe4062ccbc2d350c775ba82575d49e1ee1cbc9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 15:20:22 -0400 Subject: [PATCH 0862/1744] Update install don't create PacSatGround directory --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 20af2866..3c7475e1 100755 --- a/install +++ b/install @@ -569,14 +569,14 @@ sudo raspi-config nonint do_vnc 0 -if [ ! -d "/home/pi/PacSatGround" ]; then +if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then cd /tmp wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop rm PacsatGround_unix_0_46o.tar.gz cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ - mkdir /home/pi/PacSatGround +# mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi sudo apt-get install default-jdk -y From b558f940f9c7763e46774e83fd74ef4b08d3b6d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 15:24:13 -0400 Subject: [PATCH 0863/1744] Update pacsat.sh cleanup --- groundstation/pacsat.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index a4cebece..5ab273f3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -126,8 +126,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then sudo rm PacSatGround.zip echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" sleep 10 fi @@ -142,7 +141,6 @@ if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then echo echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 fi From c6e4bd7b12f1ccc5a4ac37aeb7a3f6e72939b3d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:15:51 -0400 Subject: [PATCH 0864/1744] update g0kla-common if changed, don't create pacsatsim directories --- install | 77 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 46 insertions(+), 31 deletions(-) diff --git a/install b/install index 3c7475e1..8a7d2c45 100755 --- a/install +++ b/install @@ -482,17 +482,31 @@ if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then FLAG=1 fi -cd - -FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled -if [ ! -f "$FILE" ]; then +if [ ! -d "/home/pi/g0kla_common" ]; then cd git clone https://github.com/alanbjohnston/g0kla_common.git cd g0kla_common/Debug/ make clean make all sudo ./install.sh + +else + cd /home/pi/g0kla_common/Debug/ + + git pull --no-rebase > .updated + grep 'changed' /home/pi/g0kla_common/Debug/.updated + if [[ $(grep 'changed' /home/pi/g0kla_common/Debug/.updated) ]]; then + echo "updating g0kla_common" + make clean + make all + FLAG=1 + fi +fi + +FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled +if [ ! -f "$FILE" ]; then + cd #git clone https://github.com/alanbjohnston/pi_pacsat.git git clone https://github.com/ac2cz/pi_pacsat.git @@ -502,38 +516,39 @@ if [ ! -f "$FILE" ]; then make clean make all - mkdir /home/pi/PacSat - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir +# mkdir /home/pi/PacSat +# mkdir /home/pi/PacSat/pacsat +# mkdir /home/pi/PacSat/pacsat/dir - export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH +# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - #value=`cat /home/pi/CubeSatSim/sim.cfg` - #echo "$value" > /dev/null - #set -- $value +# #value=`cat /home/pi/CubeSatSim/sim.cfg` +# #echo "$value" > /dev/null +# #set -- $value - echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=AMSAT-12" >> pacsat.config - echo "broadcast_callsign=AMSAT-11" >> pacsat.config - echo "digi_callsign=AMSAT-1" >> pacsat.config - echo "max_frames_in_tx_buffer=5" >> pacsat.config +# echo "bit_rate=9600" > pacsat.config +# echo "bbs_callsign=AMSAT-12" >> pacsat.config +# echo "broadcast_callsign=AMSAT-11" >> pacsat.config +# echo "digi_callsign=AMSAT-1" >> pacsat.config +# echo "max_frames_in_tx_buffer=5" >> pacsat.config - echo "pb_open=1" > pacsat.state - echo "uplink_open=1" >> pacsat.state - echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state - echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state -fi +# echo "pb_open=1" > pacsat.state +# echo "uplink_open=1" >> pacsat.state +# echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +# echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state -cd /home/pi/pi_pacsat/Debug/ - -git pull --no-rebase > .updated -grep 'changed' /home/pi/pi_pacsat/Debug/.updated -if [[ $(grep 'changed' /home/pi/pi_pacsat/Debug/.updated) ]]; then - - echo "updating pi_pacsat" - make clean - make all - FLAG=1 +else + cd /home/pi/pi_pacsat/Debug/ + + git pull --no-rebase > .updated + grep 'changed' /home/pi/pi_pacsat/Debug/.updated + if [[ $(grep 'changed' /home/pi/pi_pacsat/Debug/.updated) ]]; then + + echo "updating pi_pacsat" + make clean + make all + FLAG=1 + fi fi FILE=/home/pi/pacsat_telem/Debug/pacsat_telem # code has already been compiled From e4663ab34b4f1a2d005cc9934dde797948aa553e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:23:04 -0400 Subject: [PATCH 0865/1744] Update pacsatsim.sh setup PacSat and pi_pacsat files if not present --- pacsatsim.sh | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 78c952a8..6bda8ece 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -64,28 +64,40 @@ if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" echo - mkdir /home/pi/PacSat - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir + cd + sudo rm PacSat.zip + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/PacSat.zip + unzip PacSat.zip -d PacSat/pacsat + sudo rm PacSat.zip + + cd + sudo rm pi_pacsat.zip + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pi_pacsat.zip + unzip pi_pacsat.zip -d /pi_pacsat/Debug + sudo rm pi_pacsat.zip + +# mkdir /home/pi/PacSat +# mkdir /home/pi/PacSat/pacsat +# mkdir /home/pi/PacSat/pacsat/dir - cd /home/pi/pi_pacsat/Debug +# cd /home/pi/pi_pacsat/Debug - sudo rm pacsat_last_command_time.dat - sudo rm pacsat_upload_table.dat - sudo rm pacsat.state +# sudo rm pacsat_last_command_time.dat +# sudo rm pacsat_upload_table.dat +# sudo rm pacsat.state - echo "bit_rate=9600" > pacsat.config - echo "bbs_callsign=AMSAT-12" >> pacsat.config - echo "broadcast_callsign=AMSAT-11" >> pacsat.config - echo "digi_callsign=AMSAT-1" >> pacsat.config - echo "max_frames_in_tx_buffer=5" >> pacsat.config +# echo "bit_rate=9600" > pacsat.config +# echo "bbs_callsign=AMSAT-12" >> pacsat.config +# echo "broadcast_callsign=AMSAT-11" >> pacsat.config +# echo "digi_callsign=AMSAT-1" >> pacsat.config +# echo "max_frames_in_tx_buffer=5" >> pacsat.config - echo "pb_open=1" > pacsat.state - echo "uplink_open=1" >> pacsat.state - echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state - echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state +# echo "pb_open=1" > pacsat.state +# echo "uplink_open=1" >> pacsat.state +# echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state +# echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state - touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat +# touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat fi From e30024cea876923794b026bc555d2581eabbd8e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:26:35 -0400 Subject: [PATCH 0866/1744] Update pacsatsim.sh remove pi_pacsat config files before unzipping --- pacsatsim.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6bda8ece..46ac1b51 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -71,6 +71,9 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm PacSat.zip cd + sudo rm /home/pi/pi_pacsat/Debug/pacsat.config + sudo rm /home/pi/pi_pacsat/Debug/pacsat.state + sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pi_pacsat.zip unzip pi_pacsat.zip -d /pi_pacsat/Debug From e07b3d5cb044af6af8cf14bbc37e7066356195fd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:33:36 -0400 Subject: [PATCH 0867/1744] Update pacsatsim.sh fix pi_pacsat extraction --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 46ac1b51..85e479b8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -76,7 +76,7 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pi_pacsat.zip - unzip pi_pacsat.zip -d /pi_pacsat/Debug + unzip pi_pacsat.zip -d /home/pi/pi_pacsat/Debug sudo rm pi_pacsat.zip # mkdir /home/pi/PacSat From 6cbb87c3e22d22afbc9d6e31a94ea80d29063fe9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:37:30 -0400 Subject: [PATCH 0868/1744] Update pacsatsim.sh make PacSat directory --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 85e479b8..b3bda875 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -66,6 +66,8 @@ if [ ! -d "/home/pi/PacSat" ]; then cd sudo rm PacSat.zip + mkdir PacSat + mkdir PacSat/pacsat wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/PacSat.zip unzip PacSat.zip -d PacSat/pacsat sudo rm PacSat.zip From d1e80499a4454e9e4f99febfdceaf58ac6b713b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 16:54:30 -0400 Subject: [PATCH 0869/1744] Update pacsat-config.sh just delete directory for ground station reset --- groundstation/pacsat-config.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 776ea84b..275128bc 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -30,6 +30,7 @@ sudo killall -9 direwolf &>/dev/null echo " 4. Reset PacSat Satellite" echo echo "Which do you choose? Enter 1 - 4" + echo read -r ANS @@ -56,6 +57,7 @@ sudo killall -9 direwolf &>/dev/null echo " 2. Set Remote PacSat Satellite Callsign in Ground Station configuration" echo echo " 3. Reset PacSat Ground Station Configuration" + echo read -r CH @@ -82,6 +84,7 @@ sudo killall -9 direwolf &>/dev/null echo $oldcallsign echo "Enter new callsign in all capitals: " + echo read callsign if [ -z $callsign ] ; then @@ -122,6 +125,7 @@ sudo killall -9 direwolf &>/dev/null echo echo "Enter new callsign in all capitals: " + echo read callsign if [ -z $callsign ] ; then @@ -147,27 +151,28 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to reset the PacSat Ground Station Configuration" echo - echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" - echo +# echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" +# echo if [ "$ANS" = "1" ] ; then sudo rm -r /home/pi/PacSatGround - cd - sudo rm PacSatGround.zip - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGround - sudo rm PacSatGround.zip + # cd + # sudo rm PacSatGround.zip + # wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + # unzip PacSatGround.zip -d PacSatGround + # sudo rm PacSatGround.zip else sudo rm -r /home/pi/PacSatGroundLoop - cd - sudo rm PacSatGround.zip - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGroundLoop - sudo rm PacSatGround.zip + # cd + # sudo rm PacSatGround.zip + # wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + # unzip PacSatGround.zip -d PacSatGroundLoop + # sudo rm PacSatGround.zip fi else echo "Please choose an option 1-3" + echo fi From 42b68f8a934a3efc6226e8249ee3a6f409cc26b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 19 Mar 2026 17:16:33 -0400 Subject: [PATCH 0870/1744] Update pacsatsim.sh unzip pacsat-dir --- pacsatsim.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index b3bda875..04d861b6 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -65,12 +65,13 @@ if [ ! -d "/home/pi/PacSat" ]; then echo cd - sudo rm PacSat.zip + sudo rm pacsat-dir.zip mkdir PacSat mkdir PacSat/pacsat - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/PacSat.zip - unzip PacSat.zip -d PacSat/pacsat - sudo rm PacSat.zip + mkdir PacSat/pacsat/dir + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pacsat-dir.zip + unzip pacsat-dir.zip -d PacSat/pacsat/dir + sudo rm pacsat-dir.zip cd sudo rm /home/pi/pi_pacsat/Debug/pacsat.config From a6d576a079519b16e669e02fff380e8fc2d8ec8c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 17:32:19 -0400 Subject: [PATCH 0871/1744] Update pacsat.sh loopback put in PacSat mode no reboot --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5ab273f3..e8aae9ee 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -120,7 +120,7 @@ echo if [ ! -d "/home/pi/PacSatGround" ] ; then cd - sudo rm PacSatGround.zip + sudo rm PacSatGround.zip &>/dev/null wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip @@ -134,7 +134,7 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then cd - sudo rm PacSatGround.zip + sudo rm PacSatGround.zip &>/dev/null wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip @@ -193,6 +193,8 @@ sudo usermod -a -G gpio pi if [ "$loopback" = "1" ] ; then + /home/pi/CubeSatSim/config -G n + echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="PTT GPIOD gpiochip0 17" From c03f45756521777e01b044e328fde2b8d1b8b73f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 16:14:16 -0600 Subject: [PATCH 0872/1744] Add files via upload --- .../PacSatGround_0.46o/PacSatGroundLoop.zip | Bin 0 -> 8350 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip b/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip new file mode 100644 index 0000000000000000000000000000000000000000..dd82ecdbfeaec7a462c55f71e97d119d6934d786 GIT binary patch literal 8350 zcmeHM3pkYN9{&cpWJofaNunYpGsaZPrkFNmTq24|#Ee^`aU0Wax*9|`D#^VB`PglNauUU4&P{|*4cB;p3bxXo-s4e_sswDdw=i$egD5~EhVK? zAYfXD+0OhAzyBEzX+pL%cY7M!p5d#%c8vlgv-@f(V|_&_1H5nEA`hXYdQlL>|Gh2W zk1QlBT8tT;yP3c#8M5S?4zg-rZYIP_YXUYuA44*iikd$&FC!T71=t#CBHHjLV;24t_ zUuApR-_4E2^z};gpm}YKW2&bl#8G1zzO+ZJJ`6Wn>LwqWTlyw?vsY$k2eXB{$*qIl z&15j2dok%e2(q=5k=2b|kr@e>0?HXG6kue(BR~i+B_Y7pSXnP$HUt~NrHBt1lU6jk z$Pw6(-awowNZ5u!g8}3_=7T5j`?Y}wSQ3O_n-ms;CJBK@SZ?oX&-Q0|^6OOlopRuP z6iK=g@_jB7l_EX{sT0|E5?1FOT4)<4BEh+pG+} zH9r24*V)Y=xpLc{%?@zAXk}pN;*(CX4N1Ag}Qj*ePI zd5c9`&)}~9&4d2f3XK(2iw-X6ljDVy+b@ySl?i~H8Zpq+L z)&`>)&n1>03vi&XOW(ktctuZhHZyyy-H>=~QafoLaVzPpinl|CgG$H&f;Z|ghL3e( z&3P|xI9ZUe=u*Juoh}Y*u~m%;?!UYNj)!;frwtG%w17hm5dLdxKwx-m8SYr1Yl&Dx z&}U(v!!`o$=+3Am8r-3H{Qf8+;{OA_lSSa`XtVs^i|&liqbn-j*M+SL%w1V17IFSS zQV=wP?MjyaW6=WB#z7Y6i(GNv{?3K+nyJos42n-P6dv)D|gqD>|~<9(_|Nr8ggwph6vzK#-d zN;PJeA9CWHCwZ90)$00~mWR#4Op>-OOS!v!WexLqNzBE-knrregn=WSE7Y5d+wN^R z6>sF2Z5FyC@PI@?d&TYZHu4c9%P7yrm@T1?WsJ+7me0QQ3VjWyXlEQ9V7#=&Ao_9{ z+l0JNSNnne-~@AQ+AZj4G;fXxW6qR}6d(F#nd{lb-%)LzarSL;&+2X^Di?L0GV;y( zW^o9^FgQ5<>9ZHC!IFU`A*xbSrA;>GY;B+^MV97iUzes*cI#gEn=Ey0Cd<&0*LFPA z!(XC`eCsf);pM`?t80kU(Rtbw)%#j29aL*obNzQ|Nb@Rte9N3_Duc?jTe6O8>Cbtf z6})1a-vdmZ;X?&{)C6ffk3>MPI}?X%lq@K4o5FmtwS4_rqYH)c3taFWTMH{cxTJY} zDAj+sr2hzB{bTdGO8keW$GaH>T*Is>sb@Yg$R?&qt$Q^(n%a4DvM&6v>$_rH>baMO zmpUtAE+*GU)^@pGq|GJpw12^EA!K{6*GX<4s2lg|yC3G?j=uAc9{R1uX_a{$C4*Yg z&7>cqqpT#2lUo=86J_XEX;%~@8Z6XTTHNbkrREhHR#7VzcQ9Y9xb^Gm4&3{B1boLn zO!H9%%bQOc=o@=9KpULa#iLkDz?~509eZ}!)pt1Tl_Rf%dX?qJv+R18+0C_ZejW4Lp7i=IuL>K+ z35O)ZRF+w%-4{J2{S7*;fK_iCKkqI3+*!p`%j&)i>bM% z-?{DfBpsaFwU35Ijz86h@p=z)2aYu@aV24oDdJr2mN^WMB(X6}FCUshbY^U|@+N8i z6(g6uZQ?-`1c5~!T7GaS8Y6B?;JZBBr-K4$?w;-}niqR$(2#v7w6WxtCwj6HBJqAlh`R^+MgsY}lEGP9E+^j}|4 zeoiz_cCY&J)r0cE{COnqC39DEr(&WZCyH6~X3?Eh>Ss}Xp@*_+a?Q(Ath$53ym@jh zhUy^)^~}!UcSfl2f+Y;1nv$XeO<7N|5I*(>@y(7IEe~<6Wpg#A#w1){^m3J}jlcio z>~?&?M(1F^^#$9Sr@m$Op$&JtrAtm*6%=<;Tc!T->hf6^(pl0r9ksY8`^^TTFpY*B z?u;N$m#|J5(A^yS{Yp(>dV>`i>263?qT#2yNLG$;5-A{vTeh)L6|X7XgA2y)k%*o? zovfrvy@t~4BisKZg_-Q;cF5w^&vll1v#(R?Zcy|HbMULIDHJ`*T1DB2>{958AsU@7 zyLorUUbDTy+KItg=$>nRUZEGHh_XuSiuH}#I_RikglE)ifxVlwVJJd44=YQK)X~Q!$(CuIAE=Z<+p(;s0l`A;r$8F5RKE{oc^2B zBK5JajMIjQqYWlIBm?jLAkRR82aU}?gWft9F~Cd2u{ICv4H?<#5AXjb3I7uOdStI4 z{eqKD8TN}%B1MH5TkrU*b;zMH99bq@ln;c9>V_58Ap(A0ClDcWA$JrAf*ewXi%OM86!kCb5`uUDEaYqe zzJt+MU|r-B3eeaF;StgS$H=V&Mqz<cov!B~(xSP&2bIq`rQRA5}rT}7eX zhns`A(MH5XIyx9~Yyd-)z_^^9N{D*?^hh;2uJ|G|C;k_Uw43ywDiYj?koQb*OBEQG zvlYHgh`LaIp+5kpNCtu{s=#1+z)q126mcgO(+>nq4tb3Oeub01fPs@1ag+N~Nh_)f bCoRIi$fU=?JsyIv@V_H+5Y!8MfuMf^Q4+f+ literal 0 HcmV?d00001 From 524b38e19cf2534f2a7161af5ad3371328efa939 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 18:16:26 -0400 Subject: [PATCH 0873/1744] Update pacsat.sh use separate ZIP file for Loopback --- groundstation/pacsat.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e8aae9ee..940cd020 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -121,7 +121,7 @@ if [ ! -d "/home/pi/PacSatGround" ] ; then cd sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip @@ -134,10 +134,10 @@ fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then cd - sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p-s/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGroundLoop - sudo rm PacSatGround.zip + sudo rm PacSatGroundLoop.zip &>/dev/null + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip + unzip PacSatGroundLoop.zip -d PacSatGroundLoop + sudo rm PacSatGroundLoop.zip echo echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" From 6280e60cfdd144c3ed19398a1115b9fcce616c43 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 18:50:13 -0400 Subject: [PATCH 0874/1744] Update pacsat.sh only check for directory for that mode --- groundstation/pacsat.sh | 68 +++++++++++++++++++++-------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 940cd020..a98f9145 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -92,9 +92,27 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then elif [ "$loopback" = "1" ] ; then - echo - echo "Simulated PacSatSim so mode doesn't matter" - echo + if [ ! "$MODE" = "p" ] + echo + echo "Switching to PacSat mode for the Simulated PacSat Satellite" + echo + /home/pi/CubeSatSim/config -G n + fi + +# if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then + if [ ! "$loopback" = "1" ] ; then # don't do this for now. + + cd + sudo rm PacSatGroundLoop.zip &>/dev/null + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip + unzip PacSatGroundLoop.zip -d PacSatGroundLoop + sudo rm PacSatGroundLoop.zip + + echo + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" + sleep 10 + + fi else @@ -102,6 +120,20 @@ else echo "Mode is PacSat Ground Station" echo + if [ ! -d "/home/pi/PacSatGround" ] ; then + + cd + sudo rm PacSatGround.zip &>/dev/null + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip + unzip PacSatGround.zip -d PacSatGround + sudo rm PacSatGround.zip + + echo + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" + sleep 10 + + fi + fi value=`cat /home/pi/CubeSatSim/sim.cfg` @@ -117,34 +149,6 @@ echo -n "Transmit Frequency is " echo $frequency echo -if [ ! -d "/home/pi/PacSatGround" ] ; then - - cd - sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGround - sudo rm PacSatGround.zip - - echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 - -fi - -if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then - - cd - sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip - unzip PacSatGroundLoop.zip -d PacSatGroundLoop - sudo rm PacSatGroundLoop.zip - - echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 - -fi - sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties @@ -193,8 +197,6 @@ sudo usermod -a -G gpio pi if [ "$loopback" = "1" ] ; then - /home/pi/CubeSatSim/config -G n - echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="PTT GPIOD gpiochip0 17" From 17628e401269bb3fbca5451552793701e4127c11 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 19:05:37 -0400 Subject: [PATCH 0875/1744] Update pacsat.sh missing then --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index a98f9145..ed80ba01 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -92,7 +92,7 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then elif [ "$loopback" = "1" ] ; then - if [ ! "$MODE" = "p" ] + if [ ! "$MODE" = "p" ] ; then echo echo "Switching to PacSat mode for the Simulated PacSat Satellite" echo From f0e8620c5648db24cdb3363e8fd02fbe2750ef83 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 19:13:56 -0400 Subject: [PATCH 0876/1744] Delete spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip --- .../PacSatGround_0.46o/PacSatGroundLoop.zip | Bin 8350 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip b/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip deleted file mode 100644 index dd82ecdbfeaec7a462c55f71e97d119d6934d786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8350 zcmeHM3pkYN9{&cpWJofaNunYpGsaZPrkFNmTq24|#Ee^`aU0Wax*9|`D#^VB`PglNauUU4&P{|*4cB;p3bxXo-s4e_sswDdw=i$egD5~EhVK? zAYfXD+0OhAzyBEzX+pL%cY7M!p5d#%c8vlgv-@f(V|_&_1H5nEA`hXYdQlL>|Gh2W zk1QlBT8tT;yP3c#8M5S?4zg-rZYIP_YXUYuA44*iikd$&FC!T71=t#CBHHjLV;24t_ zUuApR-_4E2^z};gpm}YKW2&bl#8G1zzO+ZJJ`6Wn>LwqWTlyw?vsY$k2eXB{$*qIl z&15j2dok%e2(q=5k=2b|kr@e>0?HXG6kue(BR~i+B_Y7pSXnP$HUt~NrHBt1lU6jk z$Pw6(-awowNZ5u!g8}3_=7T5j`?Y}wSQ3O_n-ms;CJBK@SZ?oX&-Q0|^6OOlopRuP z6iK=g@_jB7l_EX{sT0|E5?1FOT4)<4BEh+pG+} zH9r24*V)Y=xpLc{%?@zAXk}pN;*(CX4N1Ag}Qj*ePI zd5c9`&)}~9&4d2f3XK(2iw-X6ljDVy+b@ySl?i~H8Zpq+L z)&`>)&n1>03vi&XOW(ktctuZhHZyyy-H>=~QafoLaVzPpinl|CgG$H&f;Z|ghL3e( z&3P|xI9ZUe=u*Juoh}Y*u~m%;?!UYNj)!;frwtG%w17hm5dLdxKwx-m8SYr1Yl&Dx z&}U(v!!`o$=+3Am8r-3H{Qf8+;{OA_lSSa`XtVs^i|&liqbn-j*M+SL%w1V17IFSS zQV=wP?MjyaW6=WB#z7Y6i(GNv{?3K+nyJos42n-P6dv)D|gqD>|~<9(_|Nr8ggwph6vzK#-d zN;PJeA9CWHCwZ90)$00~mWR#4Op>-OOS!v!WexLqNzBE-knrregn=WSE7Y5d+wN^R z6>sF2Z5FyC@PI@?d&TYZHu4c9%P7yrm@T1?WsJ+7me0QQ3VjWyXlEQ9V7#=&Ao_9{ z+l0JNSNnne-~@AQ+AZj4G;fXxW6qR}6d(F#nd{lb-%)LzarSL;&+2X^Di?L0GV;y( zW^o9^FgQ5<>9ZHC!IFU`A*xbSrA;>GY;B+^MV97iUzes*cI#gEn=Ey0Cd<&0*LFPA z!(XC`eCsf);pM`?t80kU(Rtbw)%#j29aL*obNzQ|Nb@Rte9N3_Duc?jTe6O8>Cbtf z6})1a-vdmZ;X?&{)C6ffk3>MPI}?X%lq@K4o5FmtwS4_rqYH)c3taFWTMH{cxTJY} zDAj+sr2hzB{bTdGO8keW$GaH>T*Is>sb@Yg$R?&qt$Q^(n%a4DvM&6v>$_rH>baMO zmpUtAE+*GU)^@pGq|GJpw12^EA!K{6*GX<4s2lg|yC3G?j=uAc9{R1uX_a{$C4*Yg z&7>cqqpT#2lUo=86J_XEX;%~@8Z6XTTHNbkrREhHR#7VzcQ9Y9xb^Gm4&3{B1boLn zO!H9%%bQOc=o@=9KpULa#iLkDz?~509eZ}!)pt1Tl_Rf%dX?qJv+R18+0C_ZejW4Lp7i=IuL>K+ z35O)ZRF+w%-4{J2{S7*;fK_iCKkqI3+*!p`%j&)i>bM% z-?{DfBpsaFwU35Ijz86h@p=z)2aYu@aV24oDdJr2mN^WMB(X6}FCUshbY^U|@+N8i z6(g6uZQ?-`1c5~!T7GaS8Y6B?;JZBBr-K4$?w;-}niqR$(2#v7w6WxtCwj6HBJqAlh`R^+MgsY}lEGP9E+^j}|4 zeoiz_cCY&J)r0cE{COnqC39DEr(&WZCyH6~X3?Eh>Ss}Xp@*_+a?Q(Ath$53ym@jh zhUy^)^~}!UcSfl2f+Y;1nv$XeO<7N|5I*(>@y(7IEe~<6Wpg#A#w1){^m3J}jlcio z>~?&?M(1F^^#$9Sr@m$Op$&JtrAtm*6%=<;Tc!T->hf6^(pl0r9ksY8`^^TTFpY*B z?u;N$m#|J5(A^yS{Yp(>dV>`i>263?qT#2yNLG$;5-A{vTeh)L6|X7XgA2y)k%*o? zovfrvy@t~4BisKZg_-Q;cF5w^&vll1v#(R?Zcy|HbMULIDHJ`*T1DB2>{958AsU@7 zyLorUUbDTy+KItg=$>nRUZEGHh_XuSiuH}#I_RikglE)ifxVlwVJJd44=YQK)X~Q!$(CuIAE=Z<+p(;s0l`A;r$8F5RKE{oc^2B zBK5JajMIjQqYWlIBm?jLAkRR82aU}?gWft9F~Cd2u{ICv4H?<#5AXjb3I7uOdStI4 z{eqKD8TN}%B1MH5TkrU*b;zMH99bq@ln;c9>V_58Ap(A0ClDcWA$JrAf*ewXi%OM86!kCb5`uUDEaYqe zzJt+MU|r-B3eeaF;StgS$H=V&Mqz<cov!B~(xSP&2bIq`rQRA5}rT}7eX zhns`A(MH5XIyx9~Yyd-)z_^^9N{D*?^hh;2uJ|G|C;k_Uw43ywDiYj?koQb*OBEQG zvlYHgh`LaIp+5kpNCtu{s=#1+z)q126mcgO(+>nq4tb3Oeub01fPs@1ag+N~Nh_)f bCoRIi$fU=?JsyIv@V_H+5Y!8MfuMf^Q4+f+ From b297da5ea467fcb9b3636291a7b04cecd22cc2bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 17:14:43 -0600 Subject: [PATCH 0877/1744] Add files via upload --- .../PacSatGround_0.46o/PacSatGroundLoop.zip | Bin 0 -> 2665 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip diff --git a/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip b/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip new file mode 100644 index 0000000000000000000000000000000000000000..7efc92a7260ad971f464ccc8a8c604e5704661a8 GIT binary patch literal 2665 zcmWIWW@h1H00GOwk{B=pO0YA?Fcg;*=%pls(HxqU^1iCa^Fthy$GvkeD2tSmIuk zUz(SqS5TB+kXlrdnOY2X(i@<2?qfPBHRyESVgr%8zqNHrZ8cSv=%3^k@>o7=&y))@ zOHwTh7`6L)b1pCY{53gg)w1ADR=XM1a^GXtM(#@$v(LJEiYZ@rbByPnYpWP@EhS1! zFU#o9IChw!{i3skP0z6(>2p%}B;=5aS>waA`odAd!vfu-Z+o@eVF zxYuzSDR5_rnl6ZUoIHt>StHsnbK7E1tN!>CZ!H|0LRH28O@AFF`*7F8>v1ctTZXT4 zY^p8bVJdlW?84vOtj;r+9y7}IG&y+DR<3{7@y`A<3$MZn4?YUGKQ@+osPU%novKH` z$|b+2{$~~93(RitI{skF{H;&62Kkw8+{Ky_8fv*l`K!apts6tOZ`#iC?$^!bx*^%s z2A=BY`%NPMMxL8LZGY8;riSGC?71Q8);x2jWb?)hiV z1>ZSKpZq%(`!Q>Cto@}QX&0Du9v_Xwm z+!yrKR6`)CJvcKLJ*k5X24S?^7dz3{o7qsH?fp+t?s>nrCQWtX z3%ae;)p50Xx#Db}-3NU)o%6Z!uX=H`W7XX6CqGY`x!FB=yW1+>r82QwMV0N2zM2@+ zuOb&YckRjW?3`7Vrn{rAhY z%_uv1eu9#PzrwPM)|UM=Ifqj zv0m--x!vD*E!gd5**5zs&Un$#zFX#L1}E#i4-4cc^{lvaK-j9Z5LOa83Mc+ndF#p)pQc@XkXF@V#4b^R!F^v=4N!mP-{Ji zVW9lIq|p&%7_1J&XBZ+#Q7b@X!sC6LI%%$LZn{ts*=z)c3`EueW=(in1lVdha}^PE|c z&4cAwps84MD Date: Fri, 20 Mar 2026 19:17:20 -0400 Subject: [PATCH 0878/1744] Update pacsat.sh add back download loopback zip file --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index ed80ba01..b3db66ad 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -99,12 +99,12 @@ elif [ "$loopback" = "1" ] ; then /home/pi/CubeSatSim/config -G n fi -# if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then - if [ ! "$loopback" = "1" ] ; then # don't do this for now. + if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then +# if [ ! "$loopback" = "1" ] ; then # don't do this for now. cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGroundLoop.zip -d PacSatGroundLoop sudo rm PacSatGroundLoop.zip From 87c5cef72cef074cc74b303b088f4d58f8bc4a06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 20 Mar 2026 19:20:28 -0400 Subject: [PATCH 0879/1744] Update pacsat.sh fix loop zip file --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b3db66ad..c7e04794 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -104,7 +104,7 @@ elif [ "$loopback" = "1" ] ; then cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip unzip PacSatGroundLoop.zip -d PacSatGroundLoop sudo rm PacSatGroundLoop.zip From a8bf6372b9ee995e78c2008c7ead89739b2f6077 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 21 Mar 2026 00:18:51 -0400 Subject: [PATCH 0880/1744] Update pacsat.sh always restart pacsat for loopback --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index c7e04794..e0445e34 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -92,12 +92,12 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then elif [ "$loopback" = "1" ] ; then - if [ ! "$MODE" = "p" ] ; then +# if [ ! "$MODE" = "p" ] ; then echo echo "Switching to PacSat mode for the Simulated PacSat Satellite" echo /home/pi/CubeSatSim/config -G n - fi +# fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then # if [ ! "$loopback" = "1" ] ; then # don't do this for now. From a895127d82e0eea7e93244f1e15098e55cb975c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 11:29:49 -0400 Subject: [PATCH 0881/1744] Update transmit.py print txc for debug --- transmit.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index cfaa2730..32521d29 100644 --- a/transmit.py +++ b/transmit.py @@ -254,11 +254,11 @@ output(ptt, 1) txc = False if input(txc_pin) == False: print("TXC is present") - txc = True; + txc = True else: print("TXC not present") -# txc = False # forcing it off +# False # forcing it off output(txLed, 1) sleep(1) output(txLed, 0) @@ -561,9 +561,11 @@ if __name__ == "__main__": rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" if not txc: + print("txc is:") + print(txc) system(stop_rpitx) system(rpitx) - print("Safe Mode!") + print("Safe Mode!!") while (True): if (txc): sleep(0.1) From b09c852a0703eb37dee1c34e085ae20f8f8a8cae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 11:33:48 -0400 Subject: [PATCH 0882/1744] Update transmit.py remove C2C squelch check since it won't work in PacSat mode --- transmit.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/transmit.py b/transmit.py index 32521d29..75f59de0 100644 --- a/transmit.py +++ b/transmit.py @@ -436,18 +436,19 @@ if __name__ == "__main__": no_command = True try: f = open("/home/pi/CubeSatSim/command_control", "r") + no_command = False f.close() - setup(squelch, "up") ## pull up in case pin is not connected - if input(squelch) == False: - print("squelch not set correctly, no command input!") - else: - if (mode != 'n') and (mode != 'x'): - print("command and control is activated") - no_command = False - system("sudo systemctl start command") - else: - print("Command and control not activated since Transmit Commands mode") - txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated +# setup(squelch, "up") ## pull up in case pin is not connected +# if input(squelch) == False: +# print("squelch not set correctly, no command input!") +# else: +# if (mode != 'n') and (mode != 'x'): +# print("command and control is activated") +# no_command = False +# system("sudo systemctl start command") +# else: +# print("Command and control not activated since Transmit Commands mode") +# txc = True # Transmit commands only works with FM transceiver, so bypass Battery Saver if activated except: print("command and control not activated") From b5f9494e12739ce6b935ba02df3d701cd8fbfe74 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:02:50 -0400 Subject: [PATCH 0883/1744] Update config print squelch is off in PacSat or Ground modes --- config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config b/config index 9c01db76..25540102 100755 --- a/config +++ b/config @@ -279,8 +279,12 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo - echo -n "Squelch level is: " - echo $6 + if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + echo "Squelch is off since PacSat or PacSat Ground Station mode" + else + echo -n "Squelch level is: " + echo $6 + fi # echo FILE=/home/pi/CubeSatSim/command_control From 303ea59836d7a2d3f2c2592c821678cdfd858582 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:04:43 -0400 Subject: [PATCH 0884/1744] Update config print $1 --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 25540102..4adf0d35 100755 --- a/config +++ b/config @@ -279,6 +279,7 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo + echo $1 if [ "$1" = "p" ] || [ "$1" = "P" ] ; then echo "Squelch is off since PacSat or PacSat Ground Station mode" else From 02dd72841a2b586a66b515c4a70917ca61c8fc1d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:06:36 -0400 Subject: [PATCH 0885/1744] Update config set MODE variable --- config | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config b/config index 4adf0d35..392536db 100755 --- a/config +++ b/config @@ -144,6 +144,7 @@ if [ "$1" = "" ]; then value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value + MODE=$1 if [ "$1" = "a" ]; then echo "Mode is APRS" @@ -279,8 +280,8 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo - echo $1 - if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + echo $MODE + if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then echo "Squelch is off since PacSat or PacSat Ground Station mode" else echo -n "Squelch level is: " From ca798d39960cecaf17ae610b1e017966dc47412b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:08:02 -0400 Subject: [PATCH 0886/1744] Update config remove MODE print --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 392536db..a5314504 100755 --- a/config +++ b/config @@ -280,7 +280,7 @@ if [ "$1" = "" ]; then # cat /home/pi/CubeSatSim/command_tx # echo - echo $MODE +# echo $MODE if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then echo "Squelch is off since PacSat or PacSat Ground Station mode" else From 8f5399786155120309597b35dc5588b54ba8f240 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:15:23 -0400 Subject: [PATCH 0887/1744] Update command don't start carrier C2C if PacSat or Ground mode --- command | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/command b/command index 2356a1ff..e1a31d63 100755 --- a/command +++ b/command @@ -6,6 +6,12 @@ sudo modprobe snd-aloop sudo modprobe snd-aloop +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value + +MODE=$1 + FILE=/home/pi/CubeSatSim/command_control if [ -f "$FILE" ]; then echo "Radio command and control is ON" @@ -126,17 +132,32 @@ else fi - if [ "$1" = "d" ]; then - - echo "debug mode" - - /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py d + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + MODE=$1 + + if [ ! "$MODE" = "P" ] && [ ! "$MODE" = "P" ] ; then + + if [ "$1" = "d" ]; then + + echo "debug mode" + + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py d + + else + + /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py + + fi + else - - /home/pi/venv/bin/python3 /home/pi/CubeSatSim/squelch_cc.py - - fi + + echo "Not running Carrier (squelch) Command and Control since PacSat or PacSat Ground Station mode!") + sleep 60 + + fi fi sudo killall -9 direwolf &>/dev/null From 17cdbb43ded102e2065abed23a22f74e4e306214 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:17:25 -0400 Subject: [PATCH 0888/1744] Update command remove typo ) --- command | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command b/command index e1a31d63..73839a05 100755 --- a/command +++ b/command @@ -154,7 +154,7 @@ else else - echo "Not running Carrier (squelch) Command and Control since PacSat or PacSat Ground Station mode!") + echo "Not running Carrier (squelch) Command and Control since PacSat or PacSat Ground Station mode!" sleep 60 fi From 5b8f35a9f284f03b5e73c5e1eb69168ce4b1466b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 12:22:42 -0400 Subject: [PATCH 0889/1744] Update config indicate carrier C2C is off if PacSat or PacSat Ground mode --- config | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/config b/config index a5314504..d2106a8f 100755 --- a/config +++ b/config @@ -297,10 +297,18 @@ if [ "$1" = "" ]; then if [ -f "$FILE" ]; then echo "Radio DTMF/APRS command and control is ON" else - echo "Radio carrier command and control is ON" + if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then + echo "Radio carrier command and control is off since PacSat or PacSat Ground Station mode" + else + echo "Radio carrier command and control is ON" + fi fi else - echo "Radio carrier command and control is ON" + if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then + echo "Radio carrier command and control is off since PacSat or PacSat Ground Station mode" + else + echo "Radio carrier command and control is ON" + fi fi else echo "Radio command and control is OFF" From b0937a109d7be2e1bf8b1485ee7b004c3c47ac49 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 13:49:16 -0400 Subject: [PATCH 0890/1744] Update pacsat-run.sh popup bigger --- groundstation/pacsat-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 37704d0f..c4cbc2d8 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -16,7 +16,7 @@ sudo killall -9 direwolf &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=170 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") + profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=200 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") echo $profile From 5eea4237f7e00d2d8401438bbd98729e138f80ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 13:51:40 -0400 Subject: [PATCH 0891/1744] Update pacsat.sh add rx frequency print --- groundstation/pacsat.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e0445e34..53e3b3b0 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -141,12 +141,15 @@ echo "$value" > /dev/null set -- $value callsign="$1" -frequency="$7e3" +txfrequency="$7e3" +rxfrequency="$8e3" echo -n "Callsign is " echo $callsign echo -n "Transmit Frequency is " -echo $frequency +echo $txfrequency +echo -n "Receive Frequency is " +echo $rxfrequency echo sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties From bc0692f56275d367f94af4efbadca299c8262623 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 14:03:53 -0400 Subject: [PATCH 0892/1744] Update pacsat-run.sh larger popup window --- groundstation/pacsat-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index c4cbc2d8..c090bd2b 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -16,7 +16,7 @@ sudo killall -9 direwolf &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=200 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") + profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=220 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") echo $profile From 172d35e02d88f646004a343cc91c81d963014ba6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 14:06:13 -0400 Subject: [PATCH 0893/1744] Update pacsatsim.sh print callsign and frequencies in log --- pacsatsim.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 04d861b6..c5ebcf43 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -59,6 +59,24 @@ else rtl=1 fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" +txfrequency="$7e3" +rxfrequency="$8e3" + +echo -n "PacSat allsign is " +echo $callsign +echo -n "Transmit Frequency is " +echo $txfrequency +echo -n "Receive Frequency is " +echo $rxfrequency +echo + +sleep 2 + if [ ! -d "/home/pi/PacSat" ]; then echo "Setting up PacSatSim default configuration" From 153b6fa5ae82a5b00ec2077f952d8050621e5540 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 14:10:43 -0400 Subject: [PATCH 0894/1744] Update pacsat.sh add sleep 2 after print of frequency --- groundstation/pacsat.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 53e3b3b0..23f115e1 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -151,6 +151,7 @@ echo $txfrequency echo -n "Receive Frequency is " echo $rxfrequency echo +sleep 2 sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties From 42935da64a6b06eac648d8078d4269734470ef40 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 20:35:22 -0400 Subject: [PATCH 0895/1744] Update pacsat-config.sh switch to non Desktop properties file --- groundstation/pacsat-config.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 275128bc..fa64ddc5 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -114,11 +114,14 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" echo + + PROPERTIES=/home/pi/PacSatGround/spacecraft/PacSatSim.properties + PROPERTIES_L=/home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties if [ "$ANS" = "1" ] ; then - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' $PROPERTIES ) else - oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties ) + oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' $PROPERTIES_L ) fi echo "Current value of remote PacSat callsign is" echo $oldcallsign @@ -135,9 +138,9 @@ sudo killall -9 direwolf &>/dev/null else if [ "$ANS" = "1" ] ; then - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" $PROPERTIES else - sudo sed -i "s/$oldcallsign/$callsign/g" /home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties + sudo sed -i "s/$oldcallsign/$callsign/g" $PROPERTIES_L fi echo echo "Changing callsign to " From ef1493a7d446cac3b556e6f658f23f1680512fba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 20:37:40 -0400 Subject: [PATCH 0896/1744] Update pacsat-config.sh print you can close window --- groundstation/pacsat-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index fa64ddc5..24604fad 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -147,7 +147,7 @@ sudo killall -9 direwolf &>/dev/null echo $callsign echo echo "You will see the change next time you run the PacSat Ground Station" - echo + echo "You can close this window" fi elif [ "$CH" = "3" ] ; then From 029ca465c4a62ed85414aa1c145422494d2f966a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 20:42:38 -0400 Subject: [PATCH 0897/1744] Update pacsat-config.sh print you can close the window --- groundstation/pacsat-config.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 24604fad..f5b64ff3 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -172,6 +172,7 @@ sudo killall -9 direwolf &>/dev/null # unzip PacSatGround.zip -d PacSatGroundLoop # sudo rm PacSatGround.zip fi + echo "You can close this window now" else echo "Please choose an option 1-3" From 30ea3a40f981772fbe7b7a7bb6f7487fff8f3e61 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 21:03:43 -0400 Subject: [PATCH 0898/1744] Update pacsatsim.sh if loopback, change to PacSat mode --- pacsatsim.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index c5ebcf43..b796d07c 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -226,7 +226,19 @@ if [ "$loopback" = "1" ] ; then echo "Using audio loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + MODE=$1 + if [ ! "$MODE" = "p" ] ; then + + /home/pi/CubeSatSim/config -G n + + fi + # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & From cf1491ecef060537a372c03a16135245dd8eb428 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 22 Mar 2026 21:32:38 -0400 Subject: [PATCH 0899/1744] Update pacsatsim.sh 15 second delay at end --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index b796d07c..cad550a3 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -319,4 +319,4 @@ cd /home/pi/pi_pacsat/Debug ./pi_pacsat -c pacsat.config -d /home/pi/PacSat -sleep 5 +sleep 15 From e0cbdfcc3abeb3570f3580eb9fceb7e2f251209b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 11:42:20 -0400 Subject: [PATCH 0900/1744] Update pacsat-run.sh --- groundstation/pacsat-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index c090bd2b..7c8d709a 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -60,7 +60,7 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "3" ] || [ "$profile" = "Simulate" ] ; then - echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" + echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" sleep 1 @@ -68,7 +68,7 @@ sudo killall -9 direwolf &>/dev/null sleep 1 - /home/pi/CubeSatSim/groundstation/pacsat.sh l + /home/pi/CubeSatSim/groundstation/pacsat.sh l else From 30fd1b350667565fdc3fc55d8312b5fdb58d968a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 11:43:53 -0400 Subject: [PATCH 0901/1744] Update pacsatsim.sh 60 seconds delay at end --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index cad550a3..804fc4c4 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -319,4 +319,4 @@ cd /home/pi/pi_pacsat/Debug ./pi_pacsat -c pacsat.config -d /home/pi/PacSat -sleep 15 +sleep 60 From bf323b449d96d1c68298712ca6960c34593af9b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 12:15:59 -0400 Subject: [PATCH 0902/1744] Update pacsat-run.sh stop transmit if loopback --- groundstation/pacsat-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 7c8d709a..d19b9dba 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -60,6 +60,8 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "3" ] || [ "$profile" = "Simulate" ] ; then + sudo systemctl stop transmit + echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" sleep 1 From 4a67af2d0174a9fdf02335fdc546663c8119f658 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:06:06 -0400 Subject: [PATCH 0903/1744] Update install --- install | 1 - 1 file changed, 1 deletion(-) diff --git a/install b/install index 8a7d2c45..3ee85b0f 100755 --- a/install +++ b/install @@ -696,7 +696,6 @@ if [ -f "$FILE" ]; then else echo "creating pacsatsim.service." sudo cp /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service - sudo systemctl enable command FLAG=1 fi From e299ab6ef8d2c8c1cbff366ca3ac12939fe25a45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:14:34 -0400 Subject: [PATCH 0904/1744] Update pacsatsim.sh add stop pacsatsim.service --- pacsatsim.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 804fc4c4..968d2f9d 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -238,7 +238,9 @@ if [ "$loopback" = "1" ] ; then /home/pi/CubeSatSim/config -G n fi - + + sudo systemctl stop pacsatsim + # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & From 9c868bd059395504127e08dc801a24b334ee545b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:26:30 -0400 Subject: [PATCH 0905/1744] Update main.c add or pacsatground --- main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.c b/main.c index 2f1954a6..3152e021 100644 --- a/main.c +++ b/main.c @@ -520,7 +520,7 @@ int main(int argc, char * argv[]) { printf("\n FSK Mode, %d bits per frame, %d bits per second, %d ms per frame, %d ms sample period\n", bufLen / (samples * frameCnt), bitRate, frameTime, samplePeriod); - } else if ((mode == BPSK) || (mode == PACSAT)) { + } else if ((mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) { //// } else { bitRate = 1200; @@ -601,7 +601,7 @@ int main(int argc, char * argv[]) { memset(sensor, 0, sizeof(sensor)); memset(other, 0, sizeof(other)); - if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) // && !sim_mode) + if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) // && !sim_mode) get_tlm_fox(); // fill transmit buffer with reset count 0 packets that will be ignored else if (mode == FC) // && !sim_mode) get_tlm_fc(); // fill transmit buffer with reset count 0 packets that will be ignored @@ -1292,7 +1292,7 @@ int main(int argc, char * argv[]) { sleep(rand_sleep); // fprintf(stderr, "INFO: Sleeping for extra %d sec\n", rand_sleep); - } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT)) {// FSK or BPSK + } else if ((mode == FSK) || (mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) {// FSK or BPSK get_tlm_fox(); } else if ((mode == FC)) { get_tlm_fc(); @@ -2019,7 +2019,7 @@ void get_tlm_fox() { encodeB(b, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); encodeA(b, 53 + head_offset, groundCommandCount); - if ((mode == BPSK) || (mode == PACSAT)) { + if ((mode == BPSK) || (mode == PACSAT) || (mode == PACSATGND)) { encodeA(b_max, 51 + head_offset, status); encodeA(b_min, 51 + head_offset, status); encodeB(b_max, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); @@ -2044,7 +2044,7 @@ void get_tlm_fox() { encodeB(b, 74 + head_offset, 0xfff); } - if (mode == PACSAT) + if ((mode == PACSAT) || (mode == PACSATGND)) { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { @@ -2719,7 +2719,7 @@ if (setting == ON) { pclose(command); fprintf(stderr,"Turning Safe Mode ON\n"); fprintf(stderr,"Turning Battery saver mode ON\n"); - if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT) || (mode == PACSATGND)) { command = popen("echo 'reboot due to turning ON Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); @@ -2736,7 +2736,7 @@ if (setting == ON) { pclose(command); fprintf(stderr,"Turning Battery saver mode OFF\n"); battery_saver_mode = OFF; - if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) { + if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT) || (mode == PACSATGND)) { command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r"); pclose(command); command = popen("sudo reboot now", "r"); From c0a679009da5469d183ac53fb75eb1c4cecac995 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 23 Mar 2026 18:28:05 -0400 Subject: [PATCH 0906/1744] Update pacsatsim.sh use PacSat Ground mode for loopback --- pacsatsim.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 968d2f9d..9a4f787a 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -233,14 +233,12 @@ if [ "$loopback" = "1" ] ; then MODE=$1 - if [ ! "$MODE" = "p" ] ; then + if [ ! "$MODE" = "P" ] ; then - /home/pi/CubeSatSim/config -G n + /home/pi/CubeSatSim/config -I n fi - sudo systemctl stop pacsatsim - # sudo /home/pi/CubeSatSim/pacsatsim-d.sh & # direwolf -P+ -D1 -qd -dp -r 48000 -c /home/pi/CubeSatSim/direwolf/direwolf-pacsatsim-loopback.conf -t 0 & From 6798b001e1581f5cf1a2a67dfff529cc6c0bf128 Mon Sep 17 00:00:00 2001 From: William Stone Date: Tue, 7 Apr 2026 11:56:46 -0500 Subject: [PATCH 0907/1744] patch command injection vulnerability --- main.c | 13 ++++++++++++- main.h | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 42aaa7e8..01a30b70 100644 --- a/main.c +++ b/main.c @@ -1510,7 +1510,7 @@ void get_tlm(void) { printf("\n\nTelemetry string is %s \n\n", str); - if (transmit) { + if (transmit && is_safe_input(str)) { FILE * file2 = popen(str, "r"); pclose(file2); @@ -1530,6 +1530,17 @@ void get_tlm(void) { return; } +int is_safe_input(const char *s) { + for (; *s; s++) { + if (!isdigit((unsigned char)*s) + && !isupper((unsigned char)*s) + && *s != '.' && *s != '-' && *s != '+' + && *s != ' ' && *s != '\n' && *s != '_') + return 0; + } + return 1; +} + // generates telemetry which is decoded by AMSAT's FoxTelem: https://www.amsat.org/foxtelem-software-for-windows-mac-linux/ // for more info about how we use FoxTelem see https://www.g0kla.com/foxtelem/amsat_telemetry_designers_handbook.pdf diff --git a/main.h b/main.h index 7c8f2386..80bc8a1f 100644 --- a/main.h +++ b/main.h @@ -98,6 +98,7 @@ extern const unsigned char ALPHA_TO[]; // const unsigned char *CCodecAO40::encode(unsigned char *source_bytes, int byte_count); void program_radio(); void socket_send(int length); +int is_safe_input(const char *s); int socket_open = 0; int sock = 0; From 028ca47cd2c609095043179e998c76175f12a15b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 6 May 2026 11:57:00 -0400 Subject: [PATCH 0908/1744] Update install add maxcpus=1 if not present --- install | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/install b/install index 3ee85b0f..59799d1e 100755 --- a/install +++ b/install @@ -65,10 +65,10 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt -# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 - sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt -# sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt @@ -163,11 +163,10 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt -# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 - sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/firmware/cmdline.txt - + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/firmware/cmdline.txt -# sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt From 566708f9301a9f4019d947347f277d75a8edfb61 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 22 May 2026 09:38:18 -0400 Subject: [PATCH 0909/1744] Update install 0.46q pacsat ground station install --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index 59799d1e..55103dea 100755 --- a/install +++ b/install @@ -586,10 +586,10 @@ sudo raspi-config nonint do_vnc 0 if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then cd /tmp - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46o.tar.gz - tar -xzf PacsatGround_unix_0_46o.tar.gz -C /home/pi/Desktop - rm PacsatGround_unix_0_46o.tar.gz - cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46q.tar.gz + tar -xzf PacsatGround_unix_0_46q.tar.gz -C /home/pi/Desktop + rm PacsatGround_unix_0_46q.tar.gz +# cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ # mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi sudo apt-get install default-jdk -y From ea8e0780e7671695e1594282c1e853ea20822bf8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 23 May 2026 12:17:21 -0400 Subject: [PATCH 0910/1744] Update pacsatsim.sh typo in callsign print --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 9a4f787a..33ac8217 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -67,7 +67,7 @@ callsign="$1" txfrequency="$7e3" rxfrequency="$8e3" -echo -n "PacSat allsign is " +echo -n "PacSat callsign is " echo $callsign echo -n "Transmit Frequency is " echo $txfrequency From fe509794895b19b7acf8ebaf18336d76ea2723aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 24 May 2026 23:03:04 -0400 Subject: [PATCH 0911/1744] Update pacsatsim.sh change pacsatsim files to v0.2 --- pacsatsim.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 33ac8217..b5dfd5d2 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -84,11 +84,11 @@ if [ ! -d "/home/pi/PacSat" ]; then cd sudo rm pacsat-dir.zip - mkdir PacSat - mkdir PacSat/pacsat - mkdir PacSat/pacsat/dir - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pacsat-dir.zip - unzip pacsat-dir.zip -d PacSat/pacsat/dir + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip + unzip pacsat-dir.zip -d /home/pi/PacSat/pacsat/dir sudo rm pacsat-dir.zip cd @@ -96,7 +96,7 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm /home/pi/pi_pacsat/Debug/pacsat.state sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.1/pi_pacsat.zip + wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip unzip pi_pacsat.zip -d /home/pi/pi_pacsat/Debug sudo rm pi_pacsat.zip From 90d2442addf4433d5694ce96b48e5ef93834a4c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 24 May 2026 23:14:40 -0400 Subject: [PATCH 0912/1744] Update pacsatsim.sh remove full path --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index b5dfd5d2..e733f769 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -88,7 +88,7 @@ if [ ! -d "/home/pi/PacSat" ]; then mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip - unzip pacsat-dir.zip -d /home/pi/PacSat/pacsat/dir + unzip pacsat-dir.zip -d /home/pi sudo rm pacsat-dir.zip cd @@ -97,7 +97,7 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip - unzip pi_pacsat.zip -d /home/pi/pi_pacsat/Debug + unzip pi_pacsat.zip -d /home/pi sudo rm pi_pacsat.zip # mkdir /home/pi/PacSat From 26d8ce051f06b87ecf03aad20eca8d3f825ef432 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 24 May 2026 23:17:16 -0400 Subject: [PATCH 0913/1744] Update pacsatsim.sh remove -d from unzip --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index e733f769..756167b2 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -88,7 +88,7 @@ if [ ! -d "/home/pi/PacSat" ]; then mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip - unzip pacsat-dir.zip -d /home/pi + unzip pacsat-dir.zip sudo rm pacsat-dir.zip cd @@ -97,7 +97,7 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip - unzip pi_pacsat.zip -d /home/pi + unzip pi_pacsat.zip sudo rm pi_pacsat.zip # mkdir /home/pi/PacSat From a8aff5fa87567d6fa577ead4df7fc3d02d908100 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 09:25:47 -0400 Subject: [PATCH 0914/1744] Update pacsatsim.sh fix pi_pacsat unzip --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 756167b2..24350f6b 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -97,7 +97,7 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip - unzip pi_pacsat.zip + unzip pi_pacsat.zip -d / sudo rm pi_pacsat.zip # mkdir /home/pi/PacSat From 0eecf68b4782cc81003516d925dc4ae348cd8bcc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 10:16:23 -0400 Subject: [PATCH 0915/1744] Add files via upload --- .../PacSatGround_0.46o/PacSatGround.zip | Bin 2662 -> 1703 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/spacecraft/PacSatGround_0.46o/PacSatGround.zip b/spacecraft/PacSatGround_0.46o/PacSatGround.zip index 900415dcd54bc85e08ddeafaeec93d4cc324e294..6694f79a05a5127a8d9bc789abbddbdbe5b1f563 100644 GIT binary patch delta 1188 zcmaDRvYb~tz?+#xgn@y9gJEjm&X^s%XP+lBF)+ljFfgbv$S?#XCI=^$xEJM@=B4OQ zTqsk2GeRV54G@=Ba5FHnykKTv028G_vHp(@1ZvK&-*BY5(22`d#eRve!;2T~w+h1N z=}gWM>b|n>4eylSU!Pxjn9=HY%6U)R`E%#a9Q6{BZhUg@h2PYaW~QZKDXCxNc)T_o zJbGvD^GD4t$wHTI8|>ffiv z1oj*KbtAjgw|qUkrp z1eUJSwXd(Qv0c`x18?%Ktjr!(CG2Ww!XqyS_6S`ay3C{x$#7^Uk@kHM!)_ zWpVZ7Uu*v!aJsG)B{PMyMN{hMGuyfokddspDnTZuOYmOgjJuF*)m*2P9OZ$7sKSnXP z#^71n<_8UJ)s|&!DXZC2@j|3%YuyU{hTV2X$AZc&4E#2~ylm?~eZP1=fA@T6!G*1N zH%Q)pJul7U@dokDELR&eDpzxFyBkzx!BX)c$n=wIU6RdRi?`E!0a%EC~(aWMIA>E|LYpXld2}l=KnCfsBO#Oyf!l zz{c?)n>X2zRZ>wD=#uc?d3)`F&R_=S936C*OpfMIXy zY$pMB2FP1W8bM67Oeo3D%D@cDhm#A~MO_gdKn)LML-qsRg<=Ribbuy-LI%wwu>DX% zgaKj_h`Xeb518RmO@anY2*M<3eatXHc1;Yr8Nd)yVF3lrWJfM>J{ATRh6zB=GqQrL F1OOa)yEXs- literal 2662 zcmWIWW@h1H00Fbwf*3FZO0YA?Fcg;*=%plOvBbS7 zzcepJub?QuAhoC@Gqo7(BvskEuVf)K}zm6UZ6%PG$Fu%e4^Ru%@yQWLO`_O!G?y3*R3e~q9(q8;M zVGcvL-m`u4iklZ}%lN*V^dnE`p^bKd&m-+EkDY2cLSOQKQ`EYCX@&dFl0&7U0ZltJ zqd)Sk5o%N7UX|o$%>7K3XYI}{4P8fjM5CuY^?%8|cb?5 zdVE^{Pr2z{%hoqvFE^&%F?_wF&}8PLCu07`{)!9Fx${`%xXR(l66%wc=RHt)<^A8; zC?xyo{H}V3#S*1rGd}UeeGPQKne|pQINi#@&%F0|)g^{2ha!&qEN?435O06(h1T7j zjAuT*{LFlMTD`b`fA@Xn7Y>K=J~X{8)wfpiyiy(2nAI5W^J-Gw_7)kw6VYpy1myFG z)K3lIE#mW85w@pGf7vAOOxML3R`-{%7OhHIcc=ZExuBx^Zu6r>N0;>z0y@F;8CbCY<-mJMeYg_v))#r{89Y-28OT+G($q z?o5p`z5ko*?q~a-hd%Sq3q7>)z3sf2&w?kef6Vymo4xJ}_7j(sc$x3E*i@+Y2AnwrtDrhb;SjB|BvxUbF}ou(Dt@gti71N-JN^sxecXr-o93Nw&ZQ& zzb^mR{;xRC9e#E5MbCrZ)i%oMg$w-Nxz(iaT>Uk1iEr~c_FqxitJenCTtEJ;>d9GI z*T#kR!lxQnR&qMt+;HWO=6rtNf6R!~ZG)CQxIx*YATc>LxhOHML?4_UnSp8XKlUsF zN#Gzu!hh%OwFl-8W?&+hM>PbJ)`K&1(GxnzU=T)2=&=)hy_pRK+TQ;Z<+i=8ztKyv zebHJDtw&Yzn@(<#-sO31X6M%b_pYo}*n95xlgg84UYxyg%j2turhE9+q$A5C_6EM1 zctm;i#kQKQ2bV>KY~KC!Pnui*R;i%v|dsbBT8-E2zF=C-Gk=C5pDULIk)?rYAfS#A2CcM82Ru$i5F zYSYKN`~Ph;Hd=DPBiz`iHTV{<* zl!{Yhn_sgdA{SKfK#M&v#RV^TfRO=-TToe}jTr@~h1bl>+tbp4CiDWa7>XGwnMJ9| zCHX~_dMQcpvI}G;T9ihAp4PZ^M~9=DuCco54wd~Hq52m4SE!h(D(D{GxI$y&CH2ia zS{RumW=cqCbxEjPoOywLdb$zUQbLMg3=SIc` zRYn^`(!-X9i8S=+r87Rh9vWwBO80m&fq8L62i{VJw4VUq( RKy3^RTtJu&OaxECJOI-LSm*!% From 2c8ca5aca8f3981670cf12a86fda94502f8a3ff5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 10:51:56 -0400 Subject: [PATCH 0916/1744] Update pacsat.sh copy existing PacSatSim file if present --- groundstation/pacsat.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 23f115e1..f9285165 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -127,10 +127,17 @@ else wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip - - echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 + + FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties + if [ -f "$FILE" ]; then + FILE2=/home/pi/PacSatGround/spacecraft/PacSatSim.properties + sudo rm $FILE2 + cp $FILE $FILE2 + else + echo + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" + sleep 10 + fi fi From 4a9e3aa2d88227eb034a2ced99777cb5b131f37a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 10:58:05 -0400 Subject: [PATCH 0917/1744] Update pacsat.sh PacSatGroundLoop same zip file as non loop --- groundstation/pacsat.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f9285165..1b103ccc 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -104,14 +104,20 @@ elif [ "$loopback" = "1" ] ; then cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGroundLoop.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGroundLoop.zip -d PacSatGroundLoop sudo rm PacSatGroundLoop.zip - - echo - echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" - sleep 10 - + + FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties + if [ -f "$FILE" ]; then + FILE2=/home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties + sudo rm $FILE2 + cp $FILE $FILE2 + else + echo + echo "The first time you run the Ground Station, you will need to select Yes to override files, then put in your callsign" + sleep 10 + fi fi else From 2eb80cce5af5ff6ae241a1bb6fc508cdd86dd3f2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 11:00:59 -0400 Subject: [PATCH 0918/1744] Update pacsat.sh fix zip changes --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 1b103ccc..38ee4350 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -105,8 +105,8 @@ elif [ "$loopback" = "1" ] ; then cd sudo rm PacSatGroundLoop.zip &>/dev/null wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGroundLoop.zip -d PacSatGroundLoop - sudo rm PacSatGroundLoop.zip + unzip PacSatGround.zip -d PacSatGroundLoop + sudo rm PacSatGround.zip FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties if [ -f "$FILE" ]; then From 4d823c696487ecd5531c8ea54310c3916c2cde60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 11:19:16 -0400 Subject: [PATCH 0919/1744] Update pacsat.sh change properties to point to Loop --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 38ee4350..271dd9d4 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -108,6 +108,8 @@ elif [ "$loopback" = "1" ] ; then unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip + sudo sed -i 's/logfile_dir=/home/pi/PacSatGround/logfile_dir=/home/pi/PacSatGroundLoop/g' /home/pi/PacSatGroundLoop/PacSatGround.properties + FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties if [ -f "$FILE" ]; then FILE2=/home/pi/PacSatGroundLoop/spacecraft/PacSatSim.properties From 5ef6f3c9940ffd7fc3258824580d033bb49b31d8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 11:23:51 -0400 Subject: [PATCH 0920/1744] Update pacsat.sh fix sed escaping --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 271dd9d4..98db1434 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -108,7 +108,7 @@ elif [ "$loopback" = "1" ] ; then unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip - sudo sed -i 's/logfile_dir=/home/pi/PacSatGround/logfile_dir=/home/pi/PacSatGroundLoop/g' /home/pi/PacSatGroundLoop/PacSatGround.properties + sudo sed -i 's/logfile_dir=\/home\/pi\/PacSatGround/logfile_dir=\/home\/pi\/PacSatGroundLoop/g' /home/pi/PacSatGroundLoop/PacSatGround.properties FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties if [ -f "$FILE" ]; then From 37ffbaf4e60f47ef4e32d4401b1d70229e852717 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 13:25:35 -0400 Subject: [PATCH 0921/1744] Update config offer to change frequency when change to PacSat Ground mode --- config | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/config b/config index d2106a8f..36379864 100755 --- a/config +++ b/config @@ -1835,6 +1835,25 @@ elif [ "$1" = "-I" ]; then reboot=1 sudo echo "P" > /home/pi/CubeSatSim/.mode + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + if [ "${7}" = "434.9" ] && [ "${8}" = "435" ]; then + echo "The default transmit frequency of 434.9 MHz is set" + echo + echo "Do you want to change it (for example to 435 MHz)?" + + read input + echo + + if [ "$input" = "y" ] || [ "$input" = "yes" ] ; then + /home/pi/CubeSatSim/config -F n + fi + fi + + # if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then # FILE=/home/pi/CubeSatSim/battery_saver # if [ -f "$FILE" ]; then From d844961dd0d8af184e504946dd05bc7bbb561d7c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 14:14:14 -0400 Subject: [PATCH 0922/1744] Update install change to cpus=2 --- install | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install b/install index 55103dea..964e13ed 100755 --- a/install +++ b/install @@ -65,10 +65,10 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=2 r/g' /boot/cmdline.txt # single core if Pi Zero 2 # sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/maxcpus=1/maxcpus=2/g' /boot/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt @@ -163,10 +163,10 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=1 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=2 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 # sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/firmware/cmdline.txt - sudo sed -i 's/maxcpus=2/maxcpus=1/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 + sudo sed -i 's/maxcpus=1/maxcpus=2/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt From 0c5b0abd6fed3fa59fc7cd480f55a638c39240b0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 25 May 2026 14:19:25 -0400 Subject: [PATCH 0923/1744] Update pacsat.sh change filename to master-b --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 98db1434..58c803c7 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -104,7 +104,7 @@ elif [ "$loopback" = "1" ] ; then cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip @@ -132,7 +132,7 @@ else cd sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b-p/spacecraft/PacSatGround_0.46o/PacSatGround.zip + wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip unzip PacSatGround.zip -d PacSatGround sudo rm PacSatGround.zip From 122aa7d912ac881b6e0e1fd450bee3de3acbf20a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 26 May 2026 07:38:44 -0400 Subject: [PATCH 0924/1744] Update install wiringpi v3 not v2 --- install | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/install b/install index 964e13ed..5b7813c9 100755 --- a/install +++ b/install @@ -404,12 +404,20 @@ fi sudo systemctl disable gpsd sudo systemctl disable gpsd.socket -if [ ! -d "/home/pi/WiringPi" ]; then - cd - git clone https://github.com/alanbjohnston/WiringPi - cd WiringPi +#if [ ! -d "/home/pi/WiringPi" ]; then +# cd +# git clone https://github.com/alanbjohnston/WiringPi +# cd WiringPi +# ./build debian +# sudo dpkg -i debian-template/wiringpi-2.61-1.deb +#fi + +if [ ! -d "/home/pi/WiringPi3" ]; then + git clone https://github.com/WiringPi/WiringPi.git WiringPi3 + cd WiringPi3 ./build debian - sudo dpkg -i debian-template/wiringpi-2.61-1.deb + mv debian-template/wiringpi*.deb . + sudo apt install ./wiringpi*.deb fi cd From 92ca8ce4134a20bda5c8f11a1604141e0042b9c0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 26 May 2026 07:47:27 -0400 Subject: [PATCH 0925/1744] Update install add cd to wiringpi 3 --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 5b7813c9..6bdc4212 100755 --- a/install +++ b/install @@ -413,6 +413,7 @@ fi #fi if [ ! -d "/home/pi/WiringPi3" ]; then + cd git clone https://github.com/WiringPi/WiringPi.git WiringPi3 cd WiringPi3 ./build debian From c4b2fd95c6ba21dafead1bb800f7b895a533a875 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 May 2026 15:46:40 -0400 Subject: [PATCH 0926/1744] Update pacsat.sh fix unzip on PacSatGround, Loop not fixed yet --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 58c803c7..bf154188 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -133,7 +133,7 @@ else cd sudo rm PacSatGround.zip &>/dev/null wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip - unzip PacSatGround.zip -d PacSatGround + unzip PacSatGround.zip sudo rm PacSatGround.zip FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties From 08b31d5407da6c4f96a51e647afcf1bb808540cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 May 2026 16:39:00 -0400 Subject: [PATCH 0927/1744] Update pacsat.sh only do rtl_test if no TXC --- groundstation/pacsat.sh | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index bf154188..1318e738 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -43,16 +43,19 @@ if [[ $(gpio -g read 7 | grep 0) ]] ; then else echo "TXC not present" txc=0 -fi -timeout 1 rtl_test &> out.txt -if [[ $(grep "No supported" out.txt) ]] ; then - echo "No RTL-SDR detected" - rtl=0 -else - echo "RTL-SDR detected." - rtl=1 -fi + timeout 1 rtl_test &> out.txt + if [[ $(grep "No supported" out.txt) ]] ; then + echo "No RTL-SDR detected" + rtl=0 + else + echo "RTL-SDR detected." + rtl=1 + fi + + sudo killall -9 rtl_test &>/dev/null + +fi FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then From 404695d347a26aa0f9519d55da024ef1d6f0c762 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 May 2026 16:42:48 -0400 Subject: [PATCH 0928/1744] Update pacsat.sh make sure rtl_test is killed at end --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 1318e738..e5c6cd87 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -310,6 +310,8 @@ else fi +sudo killall -9 rtl_test &>/dev/null + sleep 10 #echo "Stopping Pacsatsim" From a5a3f5c137ddba6d1236ece7f92ac2c5b6611748 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 May 2026 22:56:30 -0400 Subject: [PATCH 0929/1744] Update install add libraspberrypi-dev for rpitx --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 6bdc4212..1992de40 100755 --- a/install +++ b/install @@ -620,6 +620,7 @@ fi if [ ! -d "/home/pi/rpitx" ]; then + sudo apt install -y libraspberrypi-dev cd git clone https://github.com/alanbjohnston/rpitx.git cd rpitx From 17270c255aeb61fd02e6e868147a791576428c2b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 28 May 2026 23:08:01 -0400 Subject: [PATCH 0930/1744] Update config don't check for rtl_sdr --- config | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config b/config index 36379864..324a5512 100755 --- a/config +++ b/config @@ -355,14 +355,14 @@ if [ "$1" = "" ]; then txc=0 fi - timeout 1 rtl_test &> out.txt - if [[ $(grep "No supported" out.txt) ]] ; then +# timeout 1 rtl_test &> out.txt +# if [[ $(grep "No supported" out.txt) ]] ; then # echo "No RTL-SDR detected" - rtl=0 - else - echo "RTL-SDR detected" - rtl=1 - fi +# rtl=0 +# else +# echo "RTL-SDR detected" +# rtl=1 +# fi echo echo -e "Current sim.cfg configuration file:" From 6a9da94b094c69f368eaf95c6f1d3fb68f476bf8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 May 2026 09:16:55 -0400 Subject: [PATCH 0931/1744] Update pacsat.sh fix Loop unzip --- groundstation/pacsat.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e5c6cd87..68f390c4 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -111,6 +111,12 @@ elif [ "$loopback" = "1" ] ; then unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip + mkdir PacSatGroundLoop/spacecraft + mv PacSatGroundLoop/PacSatGround/spacecraft/PacSatSim.properties PacSatGroundLoop/spacecraft/PacSatSim.properties + mv PacSatGroundLoop/PacSatGround/stp.dat PacSatGroundLoop/stp.dat + mv PacSatGroundLoop/PacSatGround/seq.dat PacSatGroundLoop/seq.dat + mv PacSatGroundLoop/PacSatGround/PacSatGround.properties PacSatGroundLoop/PacSatGround.properties + sudo sed -i 's/logfile_dir=\/home\/pi\/PacSatGround/logfile_dir=\/home\/pi\/PacSatGroundLoop/g' /home/pi/PacSatGroundLoop/PacSatGround.properties FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.properties From e48df7ce5edd1ff818ee4a43e80fba5ae353717a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 May 2026 09:52:39 -0400 Subject: [PATCH 0932/1744] Update pacsatsim.sh don't do rtl_test --- pacsatsim.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 24350f6b..49213e18 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -50,14 +50,14 @@ else txc=0 fi -timeout 1 rtl_test &> out.txt -if [[ $(grep "No supported" out.txt) ]] ; then - echo "No RTL-SDR detected" - rtl=0 -else - echo "RTL-SDR detected." - rtl=1 -fi +#timeout 1 rtl_test &> out.txt +#if [[ $(grep "No supported" out.txt) ]] ; then +# echo "No RTL-SDR detected" +# rtl=0 +#else +# echo "RTL-SDR detected." +# rtl=1 +#fi value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null From 2b9c828d47f43444f8a4abee9559767fff11f7fd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 May 2026 15:38:51 -0400 Subject: [PATCH 0933/1744] Update sdr.sh add --password-store=basic to avoid keychain prompt in Chromium --- groundstation/sdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 54ddb7a3..11298cd9 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -59,7 +59,7 @@ sudo systemctl restart openwebrx sleep 10 -setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 &>/dev/null & +setsid chromium-browser --password-store=basic --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 &>/dev/null & sleep 10 From 7a48f51be49ce6bfb1705e17052462b77b299834 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 29 May 2026 16:19:24 -0400 Subject: [PATCH 0934/1744] Update pacsat-run.sh don't kill dire wolf on exit --- groundstation/pacsat-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index d19b9dba..89e0252c 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -78,7 +78,7 @@ sudo killall -9 direwolf &>/dev/null fi -sudo killall -9 direwolf &>/dev/null +# sudo killall -9 direwolf &>/dev/null sleep 10 From d0ff780a4df58699ba44bd9af4c3b2e80352a43c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 17:26:12 -0400 Subject: [PATCH 0935/1744] Update config try no reboot for PacSat modes --- config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/config b/config index 324a5512..c9236f48 100755 --- a/config +++ b/config @@ -95,9 +95,10 @@ function check_restart { echo "$value" > /dev/null set -- $value - if [ "$1" = "p" ] || [ "$1" = "P" ] ; then - reboot=1 - elif [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then +# if [ "$1" = "p" ] || [ "$1" = "P" ] ; then +# reboot=1 +#el + if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 From e66b54ffdd26aefe11e9127835360483da6182c4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 22:40:02 -0400 Subject: [PATCH 0936/1744] Update config add check restart for PacSat Ground --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index c9236f48..423a5c7e 100755 --- a/config +++ b/config @@ -1834,7 +1834,8 @@ elif [ "$1" = "-I" ]; then # echo "changing CubeSatSim to Pacsat mode" - reboot=1 +# reboot=1 + check_restart sudo echo "P" > /home/pi/CubeSatSim/.mode value=`cat /home/pi/CubeSatSim/sim.cfg` From ce273a1624c3fe2fed865e812401daac6fa4abac Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 22:46:12 -0400 Subject: [PATCH 0937/1744] Update pacsat.sh don't quit if change mode --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 68f390c4..499db97c 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -75,19 +75,19 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then echo echo "Mode is not PacSat Ground Station" echo - echo "Would you like to change to PacSat Ground Station mode and reboot? (y/n)?" + echo "Would you like to change to PacSat Ground Station mode? (y/n)?" read -r ANS if [ "$ANS" = "y" ]; then /home/pi/CubeSatSim/config -I - exit +# exit else echo - echo "You can run the PacSat Ground Station after you change mode and reboot." + echo "You can run the PacSat Ground Station after you change mode." sleep 10 exit From 34a8fb8fb62ff38014a61dfeee7c74ade4931f4d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 22:59:49 -0400 Subject: [PATCH 0938/1744] Update pacsat.sh cp don't wget --- groundstation/pacsat.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 499db97c..fafffdf2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -107,7 +107,8 @@ elif [ "$loopback" = "1" ] ; then cd sudo rm PacSatGroundLoop.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip +# wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatGround.zip . unzip PacSatGround.zip -d PacSatGroundLoop sudo rm PacSatGround.zip @@ -141,7 +142,8 @@ else cd sudo rm PacSatGround.zip &>/dev/null - wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip +# wget https://github.com/alanbjohnston/CubeSatSim/raw/refs/heads/master-b/spacecraft/PacSatGround_0.46o/PacSatGround.zip + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatGround.zip . unzip PacSatGround.zip sudo rm PacSatGround.zip From 2c91f11ec57f68c5ae0cb9d567cc4890b6c800c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:02:34 -0400 Subject: [PATCH 0939/1744] Update pacsat.sh dire wolf white background --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index fafffdf2..11138565 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -304,7 +304,7 @@ echo cat $DIREWOLF_CONF echo -direwolf -r 48000 -c $DIREWOLF_CONF -t 0 & +direwolf -r 48000 -c $DIREWOLF_CONF & cd /home/pi/Desktop/PacsatGround/ From bacd17b8da4841d4602ac2e5cc8303ad121cd0a4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:03:31 -0400 Subject: [PATCH 0940/1744] Update pacsat.sh dire wolf don't decode APRS --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 11138565..fcdf9e81 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -304,7 +304,7 @@ echo cat $DIREWOLF_CONF echo -direwolf -r 48000 -c $DIREWOLF_CONF & +direwolf -qd -r 48000 -c $DIREWOLF_CONF & cd /home/pi/Desktop/PacsatGround/ From bebab685b8cf33889cdf779039f1904f69ac9278 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:18:02 -0400 Subject: [PATCH 0941/1744] Update pacsatsim.sh copy don't wget zip files --- pacsatsim.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 49213e18..cbe6d632 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -87,7 +87,8 @@ if [ ! -d "/home/pi/PacSat" ]; then mkdir /home/pi/PacSat mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip +# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip + cp /home/pi/pi_pacsat/zip/pacsat-dir.zip . unzip pacsat-dir.zip sudo rm pacsat-dir.zip @@ -96,7 +97,8 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm /home/pi/pi_pacsat/Debug/pacsat.state sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat sudo rm pi_pacsat.zip - wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip +# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip + cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . unzip pi_pacsat.zip -d / sudo rm pi_pacsat.zip From 1b63681505c84aef97d3082a727a73f45e7559a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:20:15 -0400 Subject: [PATCH 0942/1744] Update config -k restart not reboot --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index 423a5c7e..b5917680 100755 --- a/config +++ b/config @@ -1874,7 +1874,8 @@ elif [ "$1" = "-k" ]; then echo sudo systemctl stop pacsatsim &>/dev/null sudo rm -r /home/pi/PacSat - reboot=1 +# reboot=1 + sudo systemctl restart pacsatsim elif [ "$1" = "-h" ]; then From e0001319e2f62aadcdcb48b78757489b0d42e537 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:24:51 -0400 Subject: [PATCH 0943/1744] Update pacsatsim.sh simple dire wolf output --- pacsatsim.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index cbe6d632..93a6b1b0 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -298,7 +298,8 @@ echo cat $DIREWOLF_CONF echo -direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 & +#direwolf -P+ -D1 -qd -dp -r 48000 -c $DIREWOLF_CONF -t 0 & +direwolf -qd -r 48000 -c $DIREWOLF_CONF & # arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 14000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & ## arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f 434900 & From 9b73b2851231f6d29e9dd855522dd0eba3626553 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 31 May 2026 23:31:48 -0400 Subject: [PATCH 0944/1744] Update pacsat.sh don't prompt to change mode y/n --- groundstation/pacsat.sh | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index fcdf9e81..85db5762 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -71,29 +71,15 @@ set -- $value MODE=$1 if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then + echo + echo "Changing to PacSat Ground Station Mode." + echo "You might reboot" + echo + sleep 5 + /home/pi/CubeSatSim/config -I +fi - echo - echo "Mode is not PacSat Ground Station" - echo - echo "Would you like to change to PacSat Ground Station mode? (y/n)?" - - read -r ANS - - if [ "$ANS" = "y" ]; then - - /home/pi/CubeSatSim/config -I -# exit - - else - - echo - echo "You can run the PacSat Ground Station after you change mode." - sleep 10 - exit - - fi - -elif [ "$loopback" = "1" ] ; then +if [ "$loopback" = "1" ] ; then # if [ ! "$MODE" = "p" ] ; then echo From 5d7eb919fc7a50433a3b61c18e14af1dc92e888b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 10:49:52 -0400 Subject: [PATCH 0945/1744] Update fox-startup.sh don't start FoxTelem if PacSat GS mode --- groundstation/fox-startup.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/groundstation/fox-startup.sh b/groundstation/fox-startup.sh index cf6a6282..5fc934e5 100755 --- a/groundstation/fox-startup.sh +++ b/groundstation/fox-startup.sh @@ -5,6 +5,12 @@ echo "Startup script to run FoxTelem for FIAB v4" echo +value=`cat /home/pi/CubeSatSim/.mode` +echo "$value" > /dev/null +set -- $value +echo $1 +if [ "$1" != "P" ] ; then + sudo killall -9 FoxTelem &>/dev/null FILE=/home/pi/FoxTelemetryData/.foxprofile @@ -36,4 +42,10 @@ sleep 10 fi +else + echo "Don't run FoxTelem since PacSat Ground Station mode is set" +# /home/pi/CubeSatSim/groundstation/pacsat-run.sh + +fi + #$SHELL From 55dfe8c842acb8fbfe205042d4c2522d94bb6549 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:23:17 -0400 Subject: [PATCH 0946/1744] Create command.sh --- groundstation/command.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 groundstation/command.sh diff --git a/groundstation/command.sh b/groundstation/command.sh new file mode 100644 index 00000000..fba837e6 --- /dev/null +++ b/groundstation/command.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# script to send APRS or DTMR commands to a CubeSatSim + +sudo killall -9 zenity &>/dev/null + +echo + +autotune=0 + +mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=400 --title="Transmit Command" --text="Choose the command to transmit" --column="Command" --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") + +echo $mode + +if [ -z "$mode" ]; then + +echo "No choice made." + +fi + +if [ "mode" = "a" ]; then + + echo "CHange to APRS mode" + +fi + From 3796521563d9522f89e778fb4a9473cc8481a209 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:24:39 -0400 Subject: [PATCH 0947/1744] made executable --- groundstation/command.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 groundstation/command.sh diff --git a/groundstation/command.sh b/groundstation/command.sh old mode 100644 new mode 100755 From 964d18045aac57d4d7a5b68a9469187f7467a410 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:33:45 -0400 Subject: [PATCH 0948/1744] Update command.sh check for mode --- groundstation/command.sh | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index fba837e6..4e99b0bd 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -2,6 +2,18 @@ # 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 "Do you want to change to Transmit Commands mode?" + + exit + +fi + sudo killall -9 zenity &>/dev/null echo @@ -18,9 +30,12 @@ echo "No choice made." fi -if [ "mode" = "a" ]; then +if [ "$mode" = "a" ]; then - echo "CHange to APRS mode" + echo "Change to APRS mode" + + /home/pi/CubeSatSim/config -a fi + From 1d842ab5e7e41cc99b3e398108880d978ba634c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:37:51 -0400 Subject: [PATCH 0949/1744] Update command.sh do all modes --- groundstation/command.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index 4e99b0bd..4d2985de 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -8,8 +8,8 @@ set -- $value if [ "$1" != "n" ]; then - echo "Do you want to change to Transmit Commands mode?" - + echo "You are not in Transmit Commands mode" + sleep 10 exit fi @@ -26,16 +26,16 @@ echo $mode if [ -z "$mode" ]; then -echo "No choice made." + echo "No choice made." + sleep 10 + + exit fi -if [ "$mode" = "a" ]; then +/home/pi/CubeSatSim/config -$mode +sleep 10 - echo "Change to APRS mode" - /home/pi/CubeSatSim/config -a - -fi From 562c853b4f4bd77821739bb39125e5b3b6afcec4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:42:59 -0400 Subject: [PATCH 0950/1744] Update command.sh don't print mode --- groundstation/command.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index 4d2985de..8859e958 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -20,9 +20,9 @@ echo autotune=0 -mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=400 --title="Transmit Command" --text="Choose the command to transmit" --column="Command" --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") +mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=390 --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") -echo $mode +# echo $mode if [ -z "$mode" ]; then From 7c07d57fa04152437ac39147a8a3a23956995f63 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 11:43:59 -0400 Subject: [PATCH 0951/1744] Update command.sh change size --- groundstation/command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index 8859e958..e471e3cb 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -20,7 +20,7 @@ echo autotune=0 -mode=$(zenity --timeout=10 --list 2>/dev/null --width=410 --height=390 --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") +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") # echo $mode From 92bd0f06cecb1b4da06b2474be44f5976ec3c9e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 1 Jun 2026 12:45:55 -0400 Subject: [PATCH 0952/1744] Update install change pi_pacsat to mine --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 1992de40..c5e5451a 100755 --- a/install +++ b/install @@ -516,8 +516,8 @@ FILE=/home/pi/pi_pacsat/Debug/pi_pacsat # code has already been compiled if [ ! -f "$FILE" ]; then cd - #git clone https://github.com/alanbjohnston/pi_pacsat.git - git clone https://github.com/ac2cz/pi_pacsat.git + git clone https://github.com/alanbjohnston/pi_pacsat.git + #git clone https://github.com/ac2cz/pi_pacsat.git cd pi_pacsat #git checkout master-debug cd Debug From 01334ee163818ba3557e4c4e64d37ccf9e929b90 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:14:07 -0400 Subject: [PATCH 0953/1744] Update chromium.desktop.autostart x-www-browser --- groundstation/chromium.desktop.autostart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/chromium.desktop.autostart b/groundstation/chromium.desktop.autostart index da2a350e..76d785f9 100644 --- a/groundstation/chromium.desktop.autostart +++ b/groundstation/chromium.desktop.autostart @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Chromium with WebSDR -Exec=chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://127.0.0.1:8073 +Exec=x-www-browser http://127.0.0.1:8073 From 04bcd4499a8f6b1b1454407bd3961d8be6b5427c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:15:58 -0400 Subject: [PATCH 0954/1744] Update fox.sh pkill firefox --- groundstation/fox.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/fox.sh b/groundstation/fox.sh index 27050f9a..0065548e 100755 --- a/groundstation/fox.sh +++ b/groundstation/fox.sh @@ -11,6 +11,8 @@ sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 sdrpp &>/dev/null sudo killall -9 rtl_tcp &>/dev/null From 2034ee330e93951b6744276d29064e9229210a28 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:17:26 -0400 Subject: [PATCH 0955/1744] Update sdr.sh x-www-browser --- groundstation/sdr.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 11298cd9..b4c5504c 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -5,7 +5,7 @@ echo "Script to run Web SDR for ARISS Radio Pi" echo -echo "The Chromium browser will load in a few seconds with OpenWebRX." +echo "The browser will load in a few seconds with OpenWebRX." echo "You can also use another web browser if you are on the same network as your Pi." @@ -32,6 +32,8 @@ sudo killall -9 rtl_fm &>/dev/null pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 CubicSDR &>/dev/null @@ -59,7 +61,8 @@ sudo systemctl restart openwebrx sleep 10 -setsid chromium-browser --password-store=basic --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 &>/dev/null & +#setsid chromium-browser --password-store=basic --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 &>/dev/null & +setsid x-www-browser http://localhost:8073/ sleep 10 From bb051ccfa3d0c7cc0db80ddf740e25ae592f8caa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:18:13 -0400 Subject: [PATCH 0956/1744] Update cubicsdr.sh pkill firefox --- groundstation/cubicsdr.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/cubicsdr.sh b/groundstation/cubicsdr.sh index 3b125dc6..0db3a88e 100755 --- a/groundstation/cubicsdr.sh +++ b/groundstation/cubicsdr.sh @@ -17,6 +17,8 @@ sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 sdrpp &>/dev/null sudo killall -9 rtl_fm &>/dev/null From e043590076735a8abbe871aa0d6042a1271e9630 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:18:52 -0400 Subject: [PATCH 0957/1744] Update sstv_decode_prompt.sh pkill firefox --- groundstation/sstv_decode_prompt.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/sstv_decode_prompt.sh b/groundstation/sstv_decode_prompt.sh index 5a398622..79c794c2 100755 --- a/groundstation/sstv_decode_prompt.sh +++ b/groundstation/sstv_decode_prompt.sh @@ -22,6 +22,8 @@ sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 java &>/dev/null From 086a5341cfdefa9915ed57efd4c7c664da5e0edb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:19:29 -0400 Subject: [PATCH 0958/1744] Update rtl-tcp.sh pkill firefox --- groundstation/rtl-tcp.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/rtl-tcp.sh b/groundstation/rtl-tcp.sh index 3d49d11d..3260b865 100755 --- a/groundstation/rtl-tcp.sh +++ b/groundstation/rtl-tcp.sh @@ -29,6 +29,8 @@ sleep 2 pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo systemctl stop rtl_tcp &>/dev/null sudo killall -9 sdrpp &>/dev/null From 747c8bd204bfa397309a812cb45d3327bca43304 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:20:58 -0400 Subject: [PATCH 0959/1744] Update fctelem.sh x-www-browser --- groundstation/fctelem.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/groundstation/fctelem.sh b/groundstation/fctelem.sh index 0b4c92a3..b61b9a4e 100755 --- a/groundstation/fctelem.sh +++ b/groundstation/fctelem.sh @@ -5,7 +5,7 @@ echo "Script to run FUNcube CubeSatSim Telemetry" echo -echo "The Chromium browser will load in a few seconds with fctelem." +echo "The browser will load in a few seconds with fctelem." echo "You can also use another web browser if you are on the same network as your Pi." @@ -34,6 +34,8 @@ sudo killall -9 python3 &>/dev/null #pkill -o chromium &>/dev/null +#pkill -o firefox &>/dev/null + #sudo killall -9 rtl_tcp &>/dev/null #sudo killall -9 CubicSDR &>/dev/null @@ -174,7 +176,8 @@ cp /home/pi/CubeSatSim/sstv/sstv_image_1_320_x_256.jpg ./image_file.jpeg python3 -m http.server 8002 & -setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://127.0.0.1:8002 &>/dev/null & +#setsid chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars http://127.0.0.1:8002 &>/dev/null & +setsid x-www-browser http://127.0.0.1:8002/ cd /home/pi/fctelem From 9f672e4d3cf9e13f84f0236c7204eb5f50104058 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:21:35 -0400 Subject: [PATCH 0960/1744] Update sstv_decode_iss.sh pkill firefox --- groundstation/sstv_decode_iss.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/sstv_decode_iss.sh b/groundstation/sstv_decode_iss.sh index c72ee286..46e64498 100755 --- a/groundstation/sstv_decode_iss.sh +++ b/groundstation/sstv_decode_iss.sh @@ -21,6 +21,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 qsstv &>/dev/null sudo killall -9 rtl_tcp &>/dev/null From 36d38536f30d6a70bd63b30b9ec36a70ac9d587b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:22:07 -0400 Subject: [PATCH 0961/1744] Update cubicsdr-packet.sh pkill firefox --- groundstation/cubicsdr-packet.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/cubicsdr-packet.sh b/groundstation/cubicsdr-packet.sh index c5f0a1e8..a14fa706 100755 --- a/groundstation/cubicsdr-packet.sh +++ b/groundstation/cubicsdr-packet.sh @@ -8,6 +8,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null From e62dc683908fbefcc69cbb814b6cf545c3f738cf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:22:41 -0400 Subject: [PATCH 0962/1744] Update sstv_decode_sim.sh pkill firefox --- groundstation/sstv_decode_sim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/sstv_decode_sim.sh b/groundstation/sstv_decode_sim.sh index 3b72c7a4..f4451d30 100755 --- a/groundstation/sstv_decode_sim.sh +++ b/groundstation/sstv_decode_sim.sh @@ -21,6 +21,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 qsstv &>/dev/null sudo killall -9 rtl_tcp &>/dev/null From f27b1a65f9f1d5549369d9c9a630b16279d78855 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:23:16 -0400 Subject: [PATCH 0963/1744] Update aprs.sh pkill firefox --- groundstation/aprs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/aprs.sh b/groundstation/aprs.sh index 427c36cb..358d8bf6 100755 --- a/groundstation/aprs.sh +++ b/groundstation/aprs.sh @@ -9,6 +9,8 @@ sudo systemctl stop rtl_tcp &>/dev/null pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 sdrpp &>/dev/null sudo killall -9 rtl_fm &>/dev/null From 11d25702f1a1a0ebb33627f3366b25b55930f3cb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:23:45 -0400 Subject: [PATCH 0964/1744] Update packet.sh pkill firefox --- groundstation/packet.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/packet.sh b/groundstation/packet.sh index c8fdef00..627d04da 100755 --- a/groundstation/packet.sh +++ b/groundstation/packet.sh @@ -12,6 +12,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 sdrpp &>/dev/null From 7b7eb5c7a384968ebd4c930fa1e19016ce47f129 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:24:17 -0400 Subject: [PATCH 0965/1744] Update sstv_decode.sh pkill firefox --- groundstation/sstv_decode.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/sstv_decode.sh b/groundstation/sstv_decode.sh index b539d2b0..7c3f64aa 100755 --- a/groundstation/sstv_decode.sh +++ b/groundstation/sstv_decode.sh @@ -15,6 +15,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_tcp &>/dev/null sudo killall -9 java &>/dev/null From 50cee71fb188742e89c5c85a00028ed8e0893591 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:24:54 -0400 Subject: [PATCH 0966/1744] Update aprs-cubesatsim.sh pkill firefox --- groundstation/aprs-cubesatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/aprs-cubesatsim.sh b/groundstation/aprs-cubesatsim.sh index f71a70e3..dfc30e03 100755 --- a/groundstation/aprs-cubesatsim.sh +++ b/groundstation/aprs-cubesatsim.sh @@ -9,6 +9,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null From 7c2dc051627a3b7c1e4f01c29c9ab4bd983bc35f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:25:38 -0400 Subject: [PATCH 0967/1744] Update rtl-tcp-d.sh pkill firefox --- groundstation/rtl-tcp-d.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/rtl-tcp-d.sh b/groundstation/rtl-tcp-d.sh index b19539b7..2bda312a 100755 --- a/groundstation/rtl-tcp-d.sh +++ b/groundstation/rtl-tcp-d.sh @@ -23,6 +23,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 java &>/dev/null sudo killall -9 rtl_fm &>/dev/null From 94ab6b4b40d192a19ccbb6a8bf9dfd7b5321dab0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:26:33 -0400 Subject: [PATCH 0968/1744] Update chromium.desktop x-www-browser --- groundstation/autostart/chromium.desktop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/autostart/chromium.desktop b/groundstation/autostart/chromium.desktop index 5fd6bef0..f6e74ffd 100644 --- a/groundstation/autostart/chromium.desktop +++ b/groundstation/autostart/chromium.desktop @@ -1,5 +1,5 @@ [Desktop Entry] Type=Application -Name=Chromium with WebSDR -Exec=chromium-browser --check-for-update-interval=1 --simulate-critical-update --noerrdialogs --disable-infobars --app=http://localhost:8073 +Name=Browser with WebSDR +Exec=x-www-browser http://localhost:8073/ From bb2e0e414adfd161fcc9cd3b82af33ae0104bd12 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:38:31 -0400 Subject: [PATCH 0969/1744] Update sdrpp.sh pkill firefox --- groundstation/sdrpp.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/sdrpp.sh b/groundstation/sdrpp.sh index 2dd97fd1..e8f83e3e 100755 --- a/groundstation/sdrpp.sh +++ b/groundstation/sdrpp.sh @@ -15,6 +15,8 @@ sudo systemctl stop rtl_tcp pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_fm &>/dev/null sudo killall -9 direwolf &>/dev/null From 7aa52a6dfafbce472eaea71d3697594582f8ea30 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 11:44:34 -0400 Subject: [PATCH 0970/1744] Update pacsat.sh add pkill firefox --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 85db5762..6d28d815 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -186,6 +186,8 @@ sudo systemctl stop rtl_tcp >/dev/null 2>&1 pkill -o chromium &>/dev/null +pkill -o firefox &>/dev/null + sudo killall -9 rtl_fm &>/dev/null #sudo killall -9 direwolf &>/dev/null From 5a3f90710d98780ee849a4ef5d81413c94e53f69 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 13:14:14 -0400 Subject: [PATCH 0971/1744] Update pacsat.sh add rtl loopback --- groundstation/pacsat.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 6d28d815..97f1c478 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -36,6 +36,15 @@ else soundcard=0 fi +gpio -g mode 12 up + if [[ $(gpio -g read 12 | grep 0) ]] ; then + echo "LPF is present" + lpf=1 +else + echo "LPF not present" + lpf=0 +fi + gpio -g mode 7 up if [[ $(gpio -g read 7 | grep 0) ]] ; then echo "TXC is present" @@ -213,6 +222,20 @@ sudo killall -9 zenity &>/dev/null sudo usermod -a -G gpio pi +if [ "$lpf" = "0" ] && [ "$txc" = "0" ] ; then + loopback=1 + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 + rtl_fm -M fm -f $rxfrequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 + + rtl_fm -M fm -f $rxfrequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + +fi + if [ "$loopback" = "1" ] ; then echo "Using Audio Loopback" From dfde8d18b4f188a79d1343908e3befbcece5e56e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 13:18:07 -0400 Subject: [PATCH 0972/1744] Update pacsat.sh add extra timeout 1 --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 97f1c478..9baaaed3 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -53,7 +53,7 @@ else echo "TXC not present" txc=0 - timeout 1 rtl_test &> out.txt + timeout 1 timeout 1 rtl_test &> out.txt if [[ $(grep "No supported" out.txt) ]] ; then echo "No RTL-SDR detected" rtl=0 From 421566cec53462beacf629bb75537ffc32b50660 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 13:30:40 -0400 Subject: [PATCH 0973/1744] Update pacsat.sh frequency in Hz --- groundstation/pacsat.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9baaaed3..e61d3fc1 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -164,6 +164,7 @@ set -- $value callsign="$1" txfrequency="$7e3" rxfrequency="$8e3" +frequency="$8e6" echo -n "Callsign is " echo $callsign @@ -230,9 +231,9 @@ if [ "$lpf" = "0" ] && [ "$txc" = "0" ] ; then set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $rxfrequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 + rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $rxfrequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & fi From 71746d8beb3072747b72894e79b17176edde37c0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 16:50:36 -0400 Subject: [PATCH 0974/1744] Update config make -g reset everything and not always shutdown --- config | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/config b/config index b5917680..e8720aff 100755 --- a/config +++ b/config @@ -1442,6 +1442,8 @@ elif [ "$1" = "-g" ]; then sudo rm /home/pi/CubeSatSim/failure_mode.txt > /dev/null 2>&1 + sudo rm /home/pi/CubeSatSim/transmit_dtmf + sudo systemctl stop cubesatsim sudo systemctl stop transmit sudo systemctl stop command @@ -1455,7 +1457,13 @@ elif [ "$1" = "-g" ]; then cat /dev/null > ~/.bash_history && history -c - sudo shutdown now + if [ "$noreboot" = "0" ] ; then + sudo shutdown now + else + echo + echo "Shutdown or reboot to complete the operation." + echo + fi # reboot=1 else @@ -1812,16 +1820,19 @@ elif [ "$1" = "-G" ]; then reboot=1 sudo echo "p" > /home/pi/CubeSatSim/.mode -# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then -# FILE=/home/pi/CubeSatSim/battery_saver -# if [ -f "$FILE" ]; then -# restart=1 -# else -# reboot=1 -# fi -# else -# restart=1 -# fi + + if [ "${7}" != "434.9" ]; then + echo "The default transmit frequency of 434.9 MHz is NOT set." + echo + echo "Do you want to change the transmit frequency (for example to 434.9 MHz)?" + + read input + echo + + if [ "$input" = "y" ] || [ "$input" = "yes" ] ; then + /home/pi/CubeSatSim/config -F n + fi + fi elif [ "$1" = "-I" ]; then From 592dc6929692befef3dfae3e946e1bd6c79120b5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 16:58:26 -0400 Subject: [PATCH 0975/1744] Update config for -g reset pacsat and ground station settings --- config | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config b/config index e8720aff..3fd7ee70 100755 --- a/config +++ b/config @@ -1424,7 +1424,7 @@ elif [ "$1" = "-g" ]; then if [ "$rset" = "y" ] || [ "$rset" = "yes" ] ; then - echo "Resetting and shutting down." + echo "Resetting" echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0" > /home/pi/CubeSatSim/sim.cfg @@ -1457,7 +1457,15 @@ elif [ "$1" = "-g" ]; then cat /dev/null > ~/.bash_history && history -c + sudo systemctl stop pacsatsim &>/dev/null + sudo rm -r /home/pi/PacSat + + sudo rm -r /home/pi/PacSatGround + + sudo rm -r /home/pi/PacSatGroundLoop + if [ "$noreboot" = "0" ] ; then + echo "Shutting down." sudo shutdown now else echo From 4fc65dfa4e59185e6092fb8aae2335b05275c540 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 17:10:57 -0400 Subject: [PATCH 0976/1744] Update config fix tx check in -G --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 3fd7ee70..50901a62 100755 --- a/config +++ b/config @@ -1829,7 +1829,7 @@ elif [ "$1" = "-G" ]; then reboot=1 sudo echo "p" > /home/pi/CubeSatSim/.mode - if [ "${7}" != "434.9" ]; then + if [ "${7}" != "434.9" ] && [ "${7}" != "434.900" ] ; then echo "The default transmit frequency of 434.9 MHz is NOT set." echo echo "Do you want to change the transmit frequency (for example to 434.9 MHz)?" From 445fd85fdab65aa4322a58a9d7ebe5489fe7d4fc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 17:14:23 -0400 Subject: [PATCH 0977/1744] Update config fix -G freq check --- config | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/config b/config index 50901a62..26605140 100755 --- a/config +++ b/config @@ -1829,6 +1829,10 @@ elif [ "$1" = "-G" ]; then reboot=1 sudo echo "p" > /home/pi/CubeSatSim/.mode + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + if [ "${7}" != "434.9" ] && [ "${7}" != "434.900" ] ; then echo "The default transmit frequency of 434.9 MHz is NOT set." echo @@ -1874,18 +1878,6 @@ elif [ "$1" = "-I" ]; then fi fi - -# if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] ; then -# FILE=/home/pi/CubeSatSim/battery_saver -# if [ -f "$FILE" ]; then -# restart=1 -# else -# reboot=1 -# fi -# else -# restart=1 -# fi - elif [ "$1" = "-k" ]; then echo From a2d872f9be9f62a41361ecaa735f0d106aee0c31 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 2 Jun 2026 17:23:35 -0400 Subject: [PATCH 0978/1744] Update config add > /dev/null 2>&1 to rm in -g --- config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config b/config index 26605140..5c3ca9eb 100755 --- a/config +++ b/config @@ -1442,7 +1442,7 @@ elif [ "$1" = "-g" ]; then sudo rm /home/pi/CubeSatSim/failure_mode.txt > /dev/null 2>&1 - sudo rm /home/pi/CubeSatSim/transmit_dtmf + sudo rm /home/pi/CubeSatSim/transmit_dtmf > /dev/null 2>&1 sudo systemctl stop cubesatsim sudo systemctl stop transmit @@ -1453,16 +1453,16 @@ elif [ "$1" = "-g" ]; then sudo journalctl --rotate sudo journalctl --vacuum-time=1s - rm -rf ~/.config/chromium/Singleton* + rm -rf ~/.config/chromium/Singleton* > /dev/null 2>&1 cat /dev/null > ~/.bash_history && history -c sudo systemctl stop pacsatsim &>/dev/null - sudo rm -r /home/pi/PacSat + sudo rm -r /home/pi/PacSat > /dev/null 2>&1 - sudo rm -r /home/pi/PacSatGround + sudo rm -r /home/pi/PacSatGround > /dev/null 2>&1 - sudo rm -r /home/pi/PacSatGroundLoop + sudo rm -r /home/pi/PacSatGroundLoop > /dev/null 2>&1 if [ "$noreboot" = "0" ] ; then echo "Shutting down." From c43f91312a099ccad1772d65479e72306698f2e9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 09:39:45 -0400 Subject: [PATCH 0979/1744] Update config don't prompt in -G or -I comands --- config | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/config b/config index 5c3ca9eb..c9c4b11b 100755 --- a/config +++ b/config @@ -1836,14 +1836,15 @@ elif [ "$1" = "-G" ]; then if [ "${7}" != "434.9" ] && [ "${7}" != "434.900" ] ; then echo "The default transmit frequency of 434.9 MHz is NOT set." echo - echo "Do you want to change the transmit frequency (for example to 434.9 MHz)?" + echo "To change the transmit frequency (for example to 434.9 MHz) use the CubeSatSim/config -F command." + sleep 5 - read input - echo - - if [ "$input" = "y" ] || [ "$input" = "yes" ] ; then - /home/pi/CubeSatSim/config -F n - fi +# read input +# echo +# +# if [ "$input" = "y" ] || [ "$input" = "yes" ] ; then +# /home/pi/CubeSatSim/config -F n +# fi fi elif [ "$1" = "-I" ]; then @@ -1868,14 +1869,14 @@ elif [ "$1" = "-I" ]; then if [ "${7}" = "434.9" ] && [ "${8}" = "435" ]; then echo "The default transmit frequency of 434.9 MHz is set" echo - echo "Do you want to change it (for example to 435 MHz)?" + echo "To change it (for example to 435 MHz) use the CubeSatSim/config -F command." - read input - echo - - if [ "$input" = "y" ] || [ "$input" = "yes" ] ; then - /home/pi/CubeSatSim/config -F n - fi +# read input +# echo +# +# if [ "$input" = "y" ] || [ "$input" = "yes" ] ; then +# /home/pi/CubeSatSim/config -F n +# fi fi elif [ "$1" = "-k" ]; then From 3c828362b48e232d4a0b041cfe9428f83b205b2f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 11:03:16 -0400 Subject: [PATCH 0980/1744] Update config fix RTL-SDR detection --- config | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/config b/config index c9c4b11b..763c2392 100755 --- a/config +++ b/config @@ -356,14 +356,13 @@ if [ "$1" = "" ]; then txc=0 fi -# timeout 1 rtl_test &> out.txt -# if [[ $(grep "No supported" out.txt) ]] ; then -# echo "No RTL-SDR detected" -# rtl=0 -# else -# echo "RTL-SDR detected" -# rtl=1 -# fi + if [[ $(lsusb | grep "RTL") ]] ; then + echo "RTL-SDR detected" + rtl=1 + else + echo "No RTL-SDR detected" + rtl=0 + fi echo echo -e "Current sim.cfg configuration file:" From d51257dc4b08c85aaf2e3fca61da6fe75b080cd6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 11:05:18 -0400 Subject: [PATCH 0981/1744] Update pacsat.sh fix RTL-SDR test --- groundstation/pacsat.sh | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index e61d3fc1..8a2c6696 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -11,21 +11,13 @@ card=0 pwm=0 if [ "$1" = "l" ] ; then - loopback=1 - elif [ "$1" = "v" ] ; then - vox=1 - elif [ "$1" = "c" ] ; then - card=1 - else - pwm=1 - fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then @@ -53,24 +45,19 @@ else echo "TXC not present" txc=0 - timeout 1 timeout 1 rtl_test &> out.txt - if [[ $(grep "No supported" out.txt) ]] ; then - echo "No RTL-SDR detected" - rtl=0 - else - echo "RTL-SDR detected." - rtl=1 - fi - - sudo killall -9 rtl_test &>/dev/null +if [[ $(lsusb | grep "RTL") ]] ; then + echo "RTL-SDR detected" + rtl=1 +else + echo "No RTL-SDR detected" + rtl=0 +fi fi FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then - safe=1 - fi value=`cat /home/pi/CubeSatSim/.mode` @@ -330,8 +317,6 @@ else fi -sudo killall -9 rtl_test &>/dev/null - sleep 10 #echo "Stopping Pacsatsim" From 56fdd00c82f02bb01dfb509c6d7ff4c6ad291f4d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 11:16:00 -0400 Subject: [PATCH 0982/1744] Update pacsat.sh fix RTL-SDR Loopback --- groundstation/pacsat.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 8a2c6696..fed60904 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -210,8 +210,7 @@ sudo killall -9 zenity &>/dev/null sudo usermod -a -G gpio pi -if [ "$lpf" = "0" ] && [ "$txc" = "0" ] ; then - loopback=1 +if [ "$txc" = "0" ] ; then value=`aplay -l | grep "Loopback"` echo "$value" > /dev/null @@ -224,7 +223,7 @@ if [ "$lpf" = "0" ] && [ "$txc" = "0" ] ; then fi -if [ "$loopback" = "1" ] ; then +if [ "$loopback" = "1" ] || [ "$txc" = "0" ] ; then echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" From 1b0b2daac4e43b26fcb35bfb7a99de46f47f6130 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 11:46:35 -0400 Subject: [PATCH 0983/1744] Update pacsat.sh fixing rtl, not sure of other modes --- groundstation/pacsat.sh | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index fed60904..aefa59f1 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -16,9 +16,18 @@ elif [ "$1" = "v" ] ; then vox=1 elif [ "$1" = "c" ] ; then card=1 +#else +# pwm=1 +#fi + +elif [[ $(lsusb | grep "RTL") ]] ; then + echo "RTL-SDR detected" + rtl=1 else - pwm=1 -fi + echo "No RTL-SDR detected" + rtl=0 + pwm=1 +fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" @@ -44,14 +53,6 @@ if [[ $(gpio -g read 7 | grep 0) ]] ; then else echo "TXC not present" txc=0 - -if [[ $(lsusb | grep "RTL") ]] ; then - echo "RTL-SDR detected" - rtl=1 -else - echo "No RTL-SDR detected" - rtl=0 -fi fi @@ -223,7 +224,7 @@ if [ "$txc" = "0" ] ; then fi -if [ "$loopback" = "1" ] || [ "$txc" = "0" ] ; then +if [ "$loopback" = "1" ] ; then echo "Using Audio Loopback" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" @@ -256,7 +257,7 @@ elif [ "$vox" = "1" ] ; then sleep 5 fi -elif [ "$pwm" = "1" ] ; then +elif [ "$pwm" = "1" ] && [ "$soundcard" = "1" ] ; then ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" PTT="PTT GPIOD gpiochip0 -20" @@ -270,7 +271,13 @@ elif [ "$pwm" = "1" ] ; then else echo "FM TXC using Soundcard input (JP13), PWM output" fi - + +elif [ "$txc" = "0" ] ; then + + echo "Using RTL-SDR Audio Loopback" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="#PTT GPIOD gpiochip0 1" + else echo "FM TXC using Soundcard input (JP13) and output (JP14)" From f2052b11cdba36d89d7656e5093f258d9c339358 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 13:27:20 -0400 Subject: [PATCH 0984/1744] Update pacsat.sh add -P+ -D1 and -g 48 to direwolf --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index aefa59f1..7da23968 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -220,7 +220,7 @@ if [ "$txc" = "0" ] ; then #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -g 48 -P+ -D1 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & fi From f364c6fe1e9251800c28079d5274083f37e94c98 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 16:12:59 -0400 Subject: [PATCH 0985/1744] Update pacsat.sh major rewrite of tx and rx devices --- groundstation/pacsat.sh | 217 ++++++++++++++++++++-------------------- 1 file changed, 106 insertions(+), 111 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 7da23968..bc73eb26 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -1,32 +1,45 @@ #!/bin/bash +function start-rtl { + + value=`aplay -l | grep "Loopback"` + echo "$value" > /dev/null + set -- $value + + #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 + rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 + + rtl_fm -g 48 -P+ -D1 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + +} + # script to auto decode packets using Direwolf and FM TXC and run Pacsat Ground Station sudo pkill -f "/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" loopback=0 vox=0 -safe=0 -card=0 -pwm=0 +#safe=0 +#card=0 +#pwm=0 if [ "$1" = "l" ] ; then loopback=1 elif [ "$1" = "v" ] ; then vox=1 -elif [ "$1" = "c" ] ; then - card=1 +#elif [ "$1" = "c" ] ; then +# card=1 #else # pwm=1 -#fi +fi -elif [[ $(lsusb | grep "RTL") ]] ; then +if [[ $(lsusb | grep "RTL") ]] ; then echo "RTL-SDR detected" rtl=1 else echo "No RTL-SDR detected" rtl=0 - pwm=1 +# pwm=1 fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then @@ -59,8 +72,19 @@ fi FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then safe=1 +else + safe=0 fi + +if [ "$soundcard" = "0" ] && [ "$rtl" = "0" ]; then + + echo "Won't work since can't receive with Sound Card or RTL-SDR" + sleep 10 + exit + +fi + value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value @@ -76,6 +100,18 @@ if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then /home/pi/CubeSatSim/config -I fi +value=`cat /home/pi/CubeSatSim/sim.cfg` +echo "$value" > /dev/null +set -- $value + +callsign="$1" +txfrequency="$7e3" +rxfrequency="$8e3" +frequency="$8e6" + +echo -n "Callsign is " +echo $callsign + if [ "$loopback" = "1" ] ; then # if [ ! "$MODE" = "p" ] ; then @@ -114,9 +150,16 @@ if [ "$loopback" = "1" ] ; then sleep 10 fi fi + sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties else + echo -n "Transmit Frequency is " + echo $txfrequency + echo -n "Receive Frequency is " + echo $rxfrequency + sleep 2 + echo echo "Mode is PacSat Ground Station" echo @@ -142,40 +185,13 @@ else fi fi - + sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties fi -value=`cat /home/pi/CubeSatSim/sim.cfg` -echo "$value" > /dev/null -set -- $value - -callsign="$1" -txfrequency="$7e3" -rxfrequency="$8e3" -frequency="$8e6" - -echo -n "Callsign is " -echo $callsign -echo -n "Transmit Frequency is " -echo $txfrequency -echo -n "Receive Frequency is " -echo $rxfrequency -echo -sleep 2 - -sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGround/PacSatGround.properties -sudo sed -i "s/TNC_TX_DELAY=.*$/TNC_TX_DELAY=750/g" /home/pi/PacSatGroundLoop/PacSatGround.properties - sudo modprobe snd-aloop -#sudo systemctl stop cubesatsim >/dev/null 2>&1 - -#sudo systemctl stop transmit >/dev/null 2>&1 - sudo systemctl stop command >/dev/null 2>&1 -#/home/pi/CubeSatSim/config -I - sudo systemctl stop command >/dev/null 2>&1 sudo systemctl stop openwebrx >/dev/null 2>&1 @@ -188,12 +204,8 @@ pkill -o firefox &>/dev/null sudo killall -9 rtl_fm &>/dev/null -#sudo killall -9 direwolf &>/dev/null - sudo killall -9 sdrpp &>/dev/null -#sudo killall -9 aplay &>/dev/null - sudo killall -9 qsstv &>/dev/null sudo killall -9 rtl_tcp &>/dev/null @@ -204,96 +216,79 @@ sudo killall -9 CubicSDR &>/dev/null sudo killall -9 zenity &>/dev/null -#sudo systemctl restart pacsatsim - -#sudo /etc/init.d/alsa-utils stop -#sudo /etc/init.d/alsa-utils start - sudo usermod -a -G gpio pi -if [ "$txc" = "0" ] ; then - - value=`aplay -l | grep "Loopback"` - echo "$value" > /dev/null - set -- $value - - #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 - - rtl_fm -g 48 -P+ -D1 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & - -fi if [ "$loopback" = "1" ] ; then - echo "Using Audio Loopback" + echo "1: Using Audio Loopback, No Transmit or Receive" ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="PTT GPIOD gpiochip0 17" -elif [ "$safe" = "1" ] ; then +else - ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" - PTT="PTT GPIOD gpiochip0 17" + if [ "$lpf" = "1" ] ; then - if [ ! "$txc" = "1" ] ; then - echo "Safe mode - battery saver won't work since no TXC present" - sleep 5 - elif [ ! "$soundcard" = "1" ] ; then - echo "Safe mode - battery saver won't work since no sound card present" - sleep 5 - else - echo "Safe mode - battery saver" - fi + if [ "$txc" = "1" ] ; then + + if [ "$safe" = "1" ]; then -elif [ "$vox" = "1" ] ; then + echo "2: Using FM for Receive and rpitx for Transmit" + ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + PTT="PTT GPIOD gpiochip0 17" + + else - ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" - PTT="PTT GPIOD gpiochip0 17" - - if [ "$soundcard" = "1" ] ; then - echo "Using Soundcard Audio TX and RX (VOX, no PTT)" - else - echo "Soundcard Audio TX and RX (VOX, no PTT) will not work since no sound card present" - sleep 5 - fi - -elif [ "$pwm" = "1" ] && [ "$soundcard" = "1" ] ; then - - ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" - PTT="PTT GPIOD gpiochip0 -20" + echo "3: Using FM for Receive and Transmit" + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="#PTT GPIOD gpiochip0 -20" - if [ ! "$txc" = "1" ] ; then - echo "FM TXC using Soundcard input (JP13), PWM output won't work since no TXC present" - sleep 5 - elif [ ! "$soundcard" = "1" ] ; then - echo "FM TXC using Soundcard input (JP13), PWM output won't work since no sound card present" - sleep 5 - else - echo "FM TXC using Soundcard input (JP13), PWM output" - fi + fi -elif [ "$txc" = "0" ] ; then + else - echo "Using RTL-SDR Audio Loopback" - ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" - PTT="#PTT GPIOD gpiochip0 1" + if [ "$rtl" = "1" ]; then + + echo "4: Using RTL-SDR for Receive and rpitx for Transmit" + start-rtl + ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + PTT="#PTT GPIOD gpiochip0 17" + + else + + echo "5: Using Sound Card for Receive and rpitx for Transmit" + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="PTT GPIOD gpiochip0 17" -else - - echo "FM TXC using Soundcard input (JP13) and output (JP14)" - ADEVICE="ADEVICE shared_mic plughw:CARD=Device,DEV=0" - PTT="PTT GPIOD gpiochip0 -20" + fi + fi - if [ ! "$txc" = "1" ] ; then - echo "FM TXC using Soundcard input (JP13) and output (JP14) won't work since no TXC present" - sleep 5 - elif [ ! "$soundcard" = "1" ] ; then - echo "FM TXC using Soundcard input (JP13), output (JP14) won't work since no sound card present" - sleep 5 else - echo "FM TXC using Soundcard input (JP13), output JP14" - fi + + if [ "$txc" = "1" ] ; then + + echo "6: Using FM for Receive Only" + ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + PTT="#PTT GPIOD gpiochip0 -20" + + else + if [ "$rtl" = "1" ] ; then + + start-rtl + echo "7: Using RTL-SDR for Receive Only" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="#PTT GPIOD gpiochip0 17" + + else + + echo "8: Using Sound Card for Receive and Transmit" + ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" + PTT="PTT GPIOD gpiochip0 17" + + fi + fi + fi fi DIREWOLF_CONF="/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" From 55f31ff6bcc738f1d50e67f4c70c36874a42a16a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 16:16:07 -0400 Subject: [PATCH 0986/1744] Update pacsat.sh fix rtl_fm and direwolf configs --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index bc73eb26..59d15e11 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -9,7 +9,7 @@ function start-rtl { #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -g 48 -P+ -D1 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -g 48 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & } @@ -304,7 +304,7 @@ echo cat $DIREWOLF_CONF echo -direwolf -qd -r 48000 -c $DIREWOLF_CONF & +direwolf -P+ -D1 -qd -r 48000 -c $DIREWOLF_CONF & cd /home/pi/Desktop/PacsatGround/ From a771e9ba2c6f7f63f98998b5fb58e27b81ccfa39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 17:04:03 -0400 Subject: [PATCH 0987/1744] Update pacsat.sh fix PTT --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 59d15e11..31512803 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -241,7 +241,7 @@ else echo "3: Using FM for Receive and Transmit" ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" - PTT="#PTT GPIOD gpiochip0 -20" + PTT="PTT GPIOD gpiochip0 -20" fi @@ -252,7 +252,7 @@ else echo "4: Using RTL-SDR for Receive and rpitx for Transmit" start-rtl ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" - PTT="#PTT GPIOD gpiochip0 17" + PTT="PTT GPIOD gpiochip0 17" else From f1e340b06f7cfe2801a9b4d76c7ef3fe9d94c1f3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 17:20:09 -0400 Subject: [PATCH 0988/1744] Update pacsat.sh change safe to rpitx and add v1 case --- groundstation/pacsat.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 31512803..f66bc709 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -19,7 +19,7 @@ sudo pkill -f "/home/pi/CubeSatSim/groundstation/direwolf-pacsat-tmp.conf" loopback=0 vox=0 -#safe=0 +#rpitx=0 #card=0 #pwm=0 @@ -71,9 +71,11 @@ fi FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then - safe=1 -else - safe=0 + rpitx=1 +elif [ "$txc" = "0" ] && [ "$lpf" = "1" ]; then + rpitx=1 +else + rpitx=0 fi @@ -231,7 +233,7 @@ else if [ "$txc" = "1" ] ; then - if [ "$safe" = "1" ]; then + if [ "$rpitx" = "1" ]; then echo "2: Using FM for Receive and rpitx for Transmit" ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" From 9d8e6635fa1b6ef0947ecf7f3a9b56c0320f58a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 17:34:56 -0400 Subject: [PATCH 0989/1744] Update pacsat.sh added 2a and 3a for no sound card --- groundstation/pacsat.sh | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index f66bc709..fe9c5bf4 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -231,9 +231,9 @@ else if [ "$lpf" = "1" ] ; then - if [ "$txc" = "1" ] ; then + if [ "$txc" = "1" ] && [ "$soundcard" = "1"] ; then - if [ "$rpitx" = "1" ]; then + if [ "$rpitx" = "1" ] ; then echo "2: Using FM for Receive and rpitx for Transmit" ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" @@ -247,13 +247,41 @@ else fi + elif [ "$txc" = "1" ] && [ "$soundcard" = "0"] ; then + + if [ "$rtl" = "1" ]; then + + if [ "$rpitx" = "1" ]; then + + echo "2b: Using RTL-SDR for Receive and rpitx for Transmit" + start-rtl + # ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="PTT GPIOD gpiochip0 17" + + else + + echo "3b: RTL-SDR for Receive Only" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + PTT="#PTT GPIOD gpiochip0 17" + + fi + + else + + echo "Won't work since can't receive with Sound Card or RTL-SDR" + sleep 10 + exit + + fi else if [ "$rtl" = "1" ]; then echo "4: Using RTL-SDR for Receive and rpitx for Transmit" start-rtl - ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" +# ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="PTT GPIOD gpiochip0 17" else From 26cf1cd58e79bc0503cbcf1bd81919d7863db338 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 17:36:21 -0400 Subject: [PATCH 0990/1744] Update pacsat.sh typo ] --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index fe9c5bf4..11204855 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -231,7 +231,7 @@ else if [ "$lpf" = "1" ] ; then - if [ "$txc" = "1" ] && [ "$soundcard" = "1"] ; then + if [ "$txc" = "1" ] && [ "$soundcard" = "1" ] ; then if [ "$rpitx" = "1" ] ; then @@ -247,7 +247,7 @@ else fi - elif [ "$txc" = "1" ] && [ "$soundcard" = "0"] ; then + elif [ "$txc" = "1" ] && [ "$soundcard" = "0" ] ; then if [ "$rtl" = "1" ]; then From 624add1aa8085b4695f62b8c9a7124d8666d55ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 3 Jun 2026 17:45:31 -0400 Subject: [PATCH 0991/1744] Update pacsat.sh fix rpitx --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 11204855..fd1f9bd1 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -256,7 +256,7 @@ else echo "2b: Using RTL-SDR for Receive and rpitx for Transmit" start-rtl # ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" - ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" else @@ -281,13 +281,13 @@ else echo "4: Using RTL-SDR for Receive and rpitx for Transmit" start-rtl # ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" - ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" + ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1 plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" else echo "5: Using Sound Card for Receive and rpitx for Transmit" - ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + ADEVICE="ADEVICE shared_mic plughw:CARD=Loopback,DEV=0" PTT="PTT GPIOD gpiochip0 17" fi From 966a53545e3517dd6ff4ff4418d1de9fbfee40ae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 5 Jun 2026 07:27:25 -0400 Subject: [PATCH 0992/1744] Update pacsatsim.sh fix unzip --- pacsatsim.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 93a6b1b0..e816b77f 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -99,7 +99,7 @@ if [ ! -d "/home/pi/PacSat" ]; then sudo rm pi_pacsat.zip # wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . - unzip pi_pacsat.zip -d / + unzip pi_pacsat.zip sudo rm pi_pacsat.zip # mkdir /home/pi/PacSat From 48334e40a12f0839c5b982a05a7b758553596e97 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 5 Jun 2026 07:51:10 -0400 Subject: [PATCH 0993/1744] Update pacsatsim.sh add r parameter to reset to empty config --- pacsatsim.sh | 87 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index e816b77f..80f93d42 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -7,6 +7,7 @@ vox=0 safe=0 card=0 pwm=0 +reset=0 if [ "$1" = "l" ] ; then @@ -20,6 +21,10 @@ elif [ "$1" = "c" ] ; then card=1 +elif [ "$1" = "r" ] ; then + + reset=1 + else pwm=1 @@ -77,53 +82,61 @@ echo sleep 2 -if [ ! -d "/home/pi/PacSat" ]; then +if [ "$reset" = "0" ] ; then - echo "Setting up PacSatSim default configuration" - echo + if [ ! -d "/home/pi/PacSat" ]; then + + echo "Setting up PacSatSim default configuration" + echo + + cd + sudo rm pacsat-dir.zip + mkdir /home/pi/PacSat + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir + # wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip + cp /home/pi/pi_pacsat/zip/pacsat-dir.zip . + unzip pacsat-dir.zip + sudo rm pacsat-dir.zip + + cd + sudo rm /home/pi/pi_pacsat/Debug/pacsat.config + sudo rm /home/pi/pi_pacsat/Debug/pacsat.state + sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + sudo rm pi_pacsat.zip + # wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip + cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . + unzip pi_pacsat.zip + sudo rm pi_pacsat.zip + + fi - cd - sudo rm pacsat-dir.zip +else + + echo "Resetting pi_pacsat to empty configuration" + echo mkdir /home/pi/PacSat mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir -# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip - cp /home/pi/pi_pacsat/zip/pacsat-dir.zip . - unzip pacsat-dir.zip - sudo rm pacsat-dir.zip - - cd - sudo rm /home/pi/pi_pacsat/Debug/pacsat.config - sudo rm /home/pi/pi_pacsat/Debug/pacsat.state - sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat - sudo rm pi_pacsat.zip -# wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip - cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . - unzip pi_pacsat.zip - sudo rm pi_pacsat.zip - -# mkdir /home/pi/PacSat -# mkdir /home/pi/PacSat/pacsat -# mkdir /home/pi/PacSat/pacsat/dir -# cd /home/pi/pi_pacsat/Debug + cd /home/pi/pi_pacsat/Debug -# sudo rm pacsat_last_command_time.dat -# sudo rm pacsat_upload_table.dat -# sudo rm pacsat.state + sudo rm pacsat_last_command_time.dat + sudo rm pacsat_upload_table.dat + sudo rm pacsat.state -# echo "bit_rate=9600" > pacsat.config -# echo "bbs_callsign=AMSAT-12" >> pacsat.config -# echo "broadcast_callsign=AMSAT-11" >> pacsat.config -# echo "digi_callsign=AMSAT-1" >> pacsat.config -# echo "max_frames_in_tx_buffer=5" >> pacsat.config + echo "bit_rate=9600" > pacsat.config + echo "bbs_callsign=AMSAT-12" >> pacsat.config + echo "broadcast_callsign=AMSAT-11" >> pacsat.config + echo "digi_callsign=AMSAT-1" >> pacsat.config + echo "max_frames_in_tx_buffer=5" >> pacsat.config -# echo "pb_open=1" > pacsat.state -# echo "uplink_open=1" >> pacsat.state -# echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state -# echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state + echo "pb_open=1" > pacsat.state + echo "uplink_open=1" >> pacsat.state + echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state + echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state -# touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat fi From a4351c3d420fb0ffe1926920536f95579a379d75 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 5 Jun 2026 07:52:02 -0400 Subject: [PATCH 0994/1744] Update pacsatsim.sh add exit after reset --- pacsatsim.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 80f93d42..21ea307b 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -138,6 +138,7 @@ else touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + exit fi value=`cat /home/pi/CubeSatSim/sim.cfg` From 1a4e1e76adf82cb1418c672c9d3e9f84480b6541 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 5 Jun 2026 07:53:53 -0400 Subject: [PATCH 0995/1744] Update pacsatsim.sh delete PacSat when resetting --- pacsatsim.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 21ea307b..6494afbe 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -115,6 +115,7 @@ else echo "Resetting pi_pacsat to empty configuration" echo + sudo rm -r /home/pi/PacSat mkdir /home/pi/PacSat mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir From 7c3770c051e3b2ef5f3e8e29f9383b60b359e9a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 6 Jun 2026 07:38:27 -0400 Subject: [PATCH 0996/1744] Update dtmf_aprs_cc.py Update dtmf_aprs_cc.py fix FUNcube and Repeater mode --- dtmf_aprs_cc.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 9ac5909f..5e8d302e 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -61,6 +61,7 @@ if __name__ == "__main__": system("echo '\nBPSK Mode!!\n'") mode = 'b' change_mode = True + elif ((line.find("MODE=s")) > 0): system("echo '\nSSTV Mode!!\n'") mode = 's' @@ -85,8 +86,18 @@ if __name__ == "__main__": system("echo '\nRepeater Mode!!\n'") mode = 'e' change_mode = True - + elif ((line.find(":t6#")) > 0): + system("echo '\nRepeater Mode!!\n'") + mode = 'e' + change_mode = True + + elif ((line.find("MODE=j")) > 0): + system("echo '\nFUNcube Mode!!\n'") + mode = 'j' + change_mode = True + + elif ((line.find(":t7#")) > 0): system("echo '\nFUNcube Mode!!\n'") mode = 'j' change_mode = True From 6c09133fcbb09adfce94e8fb812d003f1ef2f358 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 6 Jun 2026 07:46:46 -0400 Subject: [PATCH 0997/1744] Update install update pi-power-button to master-b branch --- install | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install b/install index c5e5451a..ce5c7bb7 100755 --- a/install +++ b/install @@ -480,8 +480,17 @@ fi cd /home/pi/pi-power-button +if [ ! $(git branch --show-current | grep master-b) ]; then + + echo "updating branch of pi-power-button to master-b." + git pull + git checkout master-b + script/install + FLAG=1 +fi + git pull --no-rebase > .updated_p -git checkout master +#git checkout master grep 'changed' /home/pi/pi-power-button/.updated_p if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then From 529d8eac5dbf928317980cf1e58077f0ad58116a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 6 Jun 2026 07:50:42 -0400 Subject: [PATCH 0998/1744] Update command.sh add PacSatSim mode p --- groundstation/command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index e471e3cb..e550b832 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -20,7 +20,7 @@ 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") +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" p "PacSatSim Mode" o "Beacon On/Off") # echo $mode From 1ca0b5cc0876ec4c3812210c4cc6f577fe1aa783 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 6 Jun 2026 08:35:30 -0400 Subject: [PATCH 0999/1744] Update dtmf_aprs_cc.py fix PacSat --- dtmf_aprs_cc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dtmf_aprs_cc.py b/dtmf_aprs_cc.py index 5e8d302e..34ae0a7b 100644 --- a/dtmf_aprs_cc.py +++ b/dtmf_aprs_cc.py @@ -104,12 +104,12 @@ if __name__ == "__main__": elif ((line.find("MODE=G")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'p' + mode = 'G' change_mode = True elif ((line.find(":t8#")) > 0): system("echo '\nPacSatSim Mode!!\n'") - mode = 'p' + mode = 'G' change_mode = True elif ((line.find("MODE=n")) > 0): From 0fc311601bb2e3cd0859c15480042433b1ebf148 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 6 Jun 2026 08:48:49 -0400 Subject: [PATCH 1000/1744] Update command.sh increase zenity window size --- groundstation/command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index e550b832..e83f5881 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -20,7 +20,7 @@ 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" p "PacSatSim Mode" o "Beacon On/Off") +mode=$(zenity --timeout=20 --list 2>/dev/null --width=300 --height=380 --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" p "PacSatSim Mode" o "Beacon On/Off") # echo $mode From 0e6513d1571e9288b6bb867418465165f4da9c86 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 6 Jun 2026 08:49:41 -0400 Subject: [PATCH 1001/1744] Update command.sh fix PacSatSim --- groundstation/command.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/command.sh b/groundstation/command.sh index e83f5881..6069f9b2 100755 --- a/groundstation/command.sh +++ b/groundstation/command.sh @@ -20,7 +20,7 @@ echo autotune=0 -mode=$(zenity --timeout=20 --list 2>/dev/null --width=300 --height=380 --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" p "PacSatSim Mode" o "Beacon On/Off") +mode=$(zenity --timeout=20 --list 2>/dev/null --width=300 --height=380 --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" G "PacSatSim Mode" o "Beacon On/Off") # echo $mode From 1b04cf42edadd8e4ed9139295722aa013b432465 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 6 Jun 2026 13:07:25 -0400 Subject: [PATCH 1002/1744] Update pacsat.sh added missing start-rtl --- groundstation/pacsat.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index fd1f9bd1..9ee8a574 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -262,6 +262,7 @@ else else echo "3b: RTL-SDR for Receive Only" + start-rtl ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="#PTT GPIOD gpiochip0 17" @@ -305,8 +306,8 @@ else if [ "$rtl" = "1" ] ; then - start-rtl echo "7: Using RTL-SDR for Receive Only" + start-rtl ADEVICE="ADEVICE plughw:CARD=Loopback,DEV=1" PTT="#PTT GPIOD gpiochip0 17" From dfec5885b105e3ec74960a5cc25d32785c395623 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 7 Jun 2026 10:15:04 -0400 Subject: [PATCH 1003/1744] Update pacsat.sh remove gain from rtl --- groundstation/pacsat.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9ee8a574..0b2d10ce 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -7,9 +7,10 @@ function start-rtl { set -- $value #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 + #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -g 48 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & +# rtl_fm -g 48 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & } From 41533643d88be44e2da88b1e61a816510d5e606a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 7 Jun 2026 10:34:44 -0400 Subject: [PATCH 1004/1744] Update pacsat-run.sh add killall aplay to avoid RTL failure --- groundstation/pacsat-run.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 89e0252c..aec526b0 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -13,6 +13,8 @@ sudo killall -9 zenity &>/dev/null sudo killall -9 direwolf &>/dev/null +sudo killall -9 aplay &>/dev/null + #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then From e6376dcd2415adb8267179ccc67e5b4080ae6973 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 7 Jun 2026 13:02:53 -0400 Subject: [PATCH 1005/1744] Update pacsat.sh try gain of 12 --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 0b2d10ce..314a104a 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -9,8 +9,8 @@ function start-rtl { #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 -# rtl_fm -g 48 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & - rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -g 12 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & +# rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & } From 179e502ab004d93aa31c1b2e37a8e92a0a442c2a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 7 Jun 2026 14:20:34 -0400 Subject: [PATCH 1006/1744] Update pacsat.sh rtl_fm auto gain --- groundstation/pacsat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 314a104a..1c95c680 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -9,8 +9,8 @@ function start-rtl { #rtl_fm -M fm -f 144.39M -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 #rtl_fm -M fm -f $frequency -s 48k | tee >(aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1) | aplay -r 48000 -t raw -f S16_LE -c 1 - rtl_fm -g 12 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & -# rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & +# rtl_fm -g 12 -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & + rtl_fm -M fm -f $frequency -s 48k | aplay -D hw:${2:0:1},0,0 -r 48000 -t raw -f S16_LE -c 1 & } From 8972ebf21b5f6cc58e4fa564ddb9be6cbb34f0bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 07:53:42 -0400 Subject: [PATCH 1007/1744] Update pacsat-run.sh 10s timeout on popup --- groundstation/pacsat-run.sh | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index aec526b0..37139874 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -18,29 +18,15 @@ sudo killall -9 aplay &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=220 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") + profile=$(zenity --timeout=10 --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=220 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") echo $profile if [ -z "$profile" ]; then - echo "No choice made. Exiting." + echo "No choice made. Default to PacSat Ground Station." - sleep 3 - - exit - - #echo "You need to choose your default FoxTelem profile." - #echo - #echo "The choices are:" - #echo - #echo "1. Fox-in-a-Box. Use this profile if you want to receive and decode telemetry from the AMSAT Fox satellites. If you enter a callsign and a grid square, you can upload to the AMSAT telemetry server." - #echo - #echo "2. CubeSatSim Ground Station. Use this profile if you want to receive and decode telemetry from an AMSAT CubeSatSim or CubeSatSim Lite." - #echo - #echo "Which profile do you choose? Enter 1 or 2" - - #read -r ANS + profile="PacSat" fi From 9c86e2d59c08c5f0583e077c574f8113b105d06e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 10:53:46 -0400 Subject: [PATCH 1008/1744] Update install add default browser set --- install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install b/install index ce5c7bb7..bff5a4cc 100755 --- a/install +++ b/install @@ -855,6 +855,14 @@ sudo apt install -y raspberrypi-ui-mods sudo apt autoremove -y +if [ $(gpio -v | grep "Pi 4") ]; then + sudo raspi-config nonint do_browser chromium +fi + +if [ $(gpio -v | grep "Pi 5") ]; then + sudo raspi-config nonint do_browser firefox +fi + if [ "$noreboot" = "0" ] ; then if [ $FLAG -eq 1 ]; then # Not sure if this is needed From 38d287624f61d8920d604a94ec5b90aa5e5c5900 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 10:54:33 -0400 Subject: [PATCH 1009/1744] Update sdr.sh add browser set --- groundstation/sdr.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index b4c5504c..9b3049d5 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -24,6 +24,14 @@ echo "Note: you need to be on the Wifi network: $ssid" echo +if [ $(gpio -v | grep "Pi 4") ]; then + sudo raspi-config nonint do_browser chromium +fi + +if [ $(gpio -v | grep "Pi 5") ]; then + sudo raspi-config nonint do_browser firefox +fi + sudo killall -9 sdrpp &>/dev/null sudo killall -9 java &>/dev/null From 990a9037421623e22a76ca389e16eb6b72b4e64d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 10:55:00 -0400 Subject: [PATCH 1010/1744] Update fctelem.sh add browser set --- groundstation/fctelem.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/groundstation/fctelem.sh b/groundstation/fctelem.sh index b61b9a4e..7ff3dbcf 100755 --- a/groundstation/fctelem.sh +++ b/groundstation/fctelem.sh @@ -24,6 +24,14 @@ echo "Note: you need to be on the Wifi network: $ssid" echo +if [ $(gpio -v | grep "Pi 4") ]; then + sudo raspi-config nonint do_browser chromium +fi + +if [ $(gpio -v | grep "Pi 5") ]; then + sudo raspi-config nonint do_browser firefox +fi + sudo killall -9 fctelem &>/dev/null sudo killall -9 python3 &>/dev/null From 6456f4eb9e03bd03d3e04d99d639764e6ebcf7a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 11:08:13 -0400 Subject: [PATCH 1011/1744] Update install fix change browser --- install | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install b/install index bff5a4cc..4197fbd1 100755 --- a/install +++ b/install @@ -855,11 +855,13 @@ sudo apt install -y raspberrypi-ui-mods sudo apt autoremove -y -if [ $(gpio -v | grep "Pi 4") ]; then +if [[ $(gpio -v | grep "Pi 4") ]] && [[ ! $(sudo raspi-config nonint get_browser | grep "chromium") ]] ; then + echo "Since Pi 4, changing default browser to Chromium" sudo raspi-config nonint do_browser chromium fi -if [ $(gpio -v | grep "Pi 5") ]; then +if [[ $(gpio -v | grep "Pi 5") ]]&& [[ ! $(sudo raspi-config nonint get_browser | grep "firefox") ]] ; then + echo "Since Pi 5, changing default browser to Firefox" sudo raspi-config nonint do_browser firefox fi From 97a58880a640f1680d092c721c352bdd86c323a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 11:08:41 -0400 Subject: [PATCH 1012/1744] Update fctelem.sh fix change browser --- groundstation/fctelem.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/fctelem.sh b/groundstation/fctelem.sh index 7ff3dbcf..eee1ee09 100755 --- a/groundstation/fctelem.sh +++ b/groundstation/fctelem.sh @@ -24,11 +24,13 @@ echo "Note: you need to be on the Wifi network: $ssid" echo -if [ $(gpio -v | grep "Pi 4") ]; then +if [[ $(gpio -v | grep "Pi 4") ]] && [[ ! $(sudo raspi-config nonint get_browser | grep "chromium") ]] ; then + echo "Since Pi 4, changing default browser to Chromium" sudo raspi-config nonint do_browser chromium fi -if [ $(gpio -v | grep "Pi 5") ]; then +if [[ $(gpio -v | grep "Pi 5") ]] && [[ ! $(sudo raspi-config nonint get_browser | grep "firefox") ]] ; then + echo "Since Pi 5, changing default browser to Firefox" sudo raspi-config nonint do_browser firefox fi From 6f0b1fb9437b891913f8a0b8dabe5584ea285ad5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 11:08:58 -0400 Subject: [PATCH 1013/1744] Update install add missing space --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 4197fbd1..44196645 100755 --- a/install +++ b/install @@ -860,7 +860,7 @@ if [[ $(gpio -v | grep "Pi 4") ]] && [[ ! $(sudo raspi-config nonint get_browser sudo raspi-config nonint do_browser chromium fi -if [[ $(gpio -v | grep "Pi 5") ]]&& [[ ! $(sudo raspi-config nonint get_browser | grep "firefox") ]] ; then +if [[ $(gpio -v | grep "Pi 5") ]] && [[ ! $(sudo raspi-config nonint get_browser | grep "firefox") ]] ; then echo "Since Pi 5, changing default browser to Firefox" sudo raspi-config nonint do_browser firefox fi From 20aedb1b5a67a8f7e931e93191e8668d1b0421fb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 11:09:52 -0400 Subject: [PATCH 1014/1744] Update sdr.sh fix browser check and change --- groundstation/sdr.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/groundstation/sdr.sh b/groundstation/sdr.sh index 9b3049d5..5ef4de55 100755 --- a/groundstation/sdr.sh +++ b/groundstation/sdr.sh @@ -24,11 +24,13 @@ echo "Note: you need to be on the Wifi network: $ssid" echo -if [ $(gpio -v | grep "Pi 4") ]; then +if [[ $(gpio -v | grep "Pi 4") ]] && [[ ! $(sudo raspi-config nonint get_browser | grep "chromium") ]] ; then + echo "Since Pi 4, changing default browser to Chromium" sudo raspi-config nonint do_browser chromium fi -if [ $(gpio -v | grep "Pi 5") ]; then +if [[ $(gpio -v | grep "Pi 5") ]]&& [[ ! $(sudo raspi-config nonint get_browser | grep "firefox") ]] ; then + echo "Since Pi 5, changing default browser to Firefox" sudo raspi-config nonint do_browser firefox fi From a0d006091a30f2bc4322bc922f9509399b7f518b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 14:01:55 -0400 Subject: [PATCH 1015/1744] Update pacsat.sh set txc=lpf if Pi 5 since read doesn't work --- groundstation/pacsat.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 1c95c680..8ade5d3b 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -67,9 +67,13 @@ if [[ $(gpio -g read 7 | grep 0) ]] ; then else echo "TXC not present" txc=0 - fi +if [[ $(gpio -v | grep "Pi 5") ]] ; then + echo "Since Pi 5, setting TXC to LPF setting" + txc=$lpf +fi + FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then rpitx=1 From a1f8a7d0264bb291bdd9d2822db537b3e3b0f6a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 14:19:00 -0400 Subject: [PATCH 1016/1744] Update pacsat.sh change Headphones to USB for Pi 5 --- groundstation/pacsat.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 8ade5d3b..dda7f002 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -69,9 +69,11 @@ else txc=0 fi +card="Headphones" if [[ $(gpio -v | grep "Pi 5") ]] ; then - echo "Since Pi 5, setting TXC to LPF setting" + echo "Since Pi 5, setting TXC to LPF setting and using USB headphones" txc=$lpf + card="Device" fi FILE=/home/pi/CubeSatSim/battery_saver @@ -247,7 +249,7 @@ else else echo "3: Using FM for Receive and Transmit" - ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + ADEVICE="ADEVICE shared_mic plughw:CARD=$card,DEV=0" PTT="PTT GPIOD gpiochip0 -20" fi @@ -304,7 +306,7 @@ else if [ "$txc" = "1" ] ; then echo "6: Using FM for Receive Only" - ADEVICE="ADEVICE shared_mic plughw:CARD=Headphones,DEV=0" + ADEVICE="ADEVICE shared_mic plughw:CARD=$card,DEV=0" PTT="#PTT GPIOD gpiochip0 -20" else From bb159007b71865f1f8c35630cab1368ca80f4a8d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 14:25:08 -0400 Subject: [PATCH 1017/1744] Update pacsat.sh don't use TXC for Pi 5 --- groundstation/pacsat.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index dda7f002..dd38ddf2 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -1,4 +1,4 @@ -#!/bin/bash +P#!/bin/bash function start-rtl { @@ -71,8 +71,9 @@ fi card="Headphones" if [[ $(gpio -v | grep "Pi 5") ]] ; then - echo "Since Pi 5, setting TXC to LPF setting and using USB headphones" - txc=$lpf +# echo "Since Pi 5, setting TXC to LPF setting and using USB headphones" +# txc=$lpf + txc=0 # don't use TXC for Pi 5 for now card="Device" fi From 88cfe1dd41c07abd9a5b0c9e6a69c81053278a62 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 14:27:42 -0400 Subject: [PATCH 1018/1744] Update pacsat.sh don't use TXC or rpitx for Pi 5 --- groundstation/pacsat.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index dd38ddf2..9ab5ec2d 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -73,7 +73,9 @@ card="Headphones" if [[ $(gpio -v | grep "Pi 5") ]] ; then # echo "Since Pi 5, setting TXC to LPF setting and using USB headphones" # txc=$lpf - txc=0 # don't use TXC for Pi 5 for now + echo "Don't use TXC for Pi 5 for now" + txc=0 + lpf=0 card="Device" fi From 0d9e98adb5140026b0cd9cbbc7d774e6680fcfb5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 14:37:50 -0400 Subject: [PATCH 1019/1744] Update pacsat.sh stray P removed --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9ab5ec2d..b9b2b398 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -1,4 +1,4 @@ -P#!/bin/bash +#!/bin/bash function start-rtl { From e007115cf40cc3585df8b47a03952472e2d1b235 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 16:02:02 -0400 Subject: [PATCH 1020/1744] Update config reset pacsatsim and reboot --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 763c2392..634d4d57 100755 --- a/config +++ b/config @@ -1885,8 +1885,8 @@ elif [ "$1" = "-k" ]; then echo sudo systemctl stop pacsatsim &>/dev/null sudo rm -r /home/pi/PacSat -# reboot=1 - sudo systemctl restart pacsatsim + reboot=1 +# sudo systemctl restart pacsatsim elif [ "$1" = "-h" ]; then From bfb839094d6eab1d609e22a6aefb68881946b0d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 8 Jun 2026 16:11:47 -0400 Subject: [PATCH 1021/1744] Update pacsat-config.sh reboot after pacsatsim reset --- groundstation/pacsat-config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index f5b64ff3..17216dfd 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -185,14 +185,14 @@ sudo killall -9 direwolf &>/dev/null echo "You have chosen to set the Frequency of the PacSat Ground Station" echo - /home/pi/CubeSatSim/config -F n + /home/pi/CubeSatSim/config -F elif [ "$ANS" = "4" ] ; then echo "You have chosen to reset the PacSat Satellite" echo - /home/pi/CubeSatSim/config -k n + /home/pi/CubeSatSim/config -k else From bb87179f5f975ffa2913598500a3aa6ea4ea0ddc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 16 Jun 2026 17:40:25 -0400 Subject: [PATCH 1022/1744] Update pacsat.sh add Sound Card PTT RTS configuration --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index b9b2b398..08fe543e 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -325,7 +325,7 @@ else echo "8: Using Sound Card for Receive and Transmit" ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" - PTT="PTT GPIOD gpiochip0 17" + PTT="PTT /dev/ttyUSB0 RTS" fi fi From b0b5fd167cf3756587b60c558befcfa83fa2070d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 16 Jun 2026 17:42:24 -0400 Subject: [PATCH 1023/1744] Update pacsat.sh print RTS PTT in log --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 08fe543e..891a5e2b 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -323,7 +323,7 @@ else else - echo "8: Using Sound Card for Receive and Transmit" + echo "8: Using USB Sound Card for Receive and Transmit with RTS PTT" ADEVICE="ADEVICE plughw:CARD=Device,DEV=0" PTT="PTT /dev/ttyUSB0 RTS" From 61f97d2d4f3ea4d4165b638f445ef898d6ab2f74 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:06:07 -0400 Subject: [PATCH 1024/1744] Update transmit.py add doppler time shift --- transmit.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 75f59de0..22244ac0 100644 --- a/transmit.py +++ b/transmit.py @@ -949,11 +949,18 @@ if __name__ == "__main__": print("Beacon mode off so no repeater transmission") print("Ready to detect carrier") + start_time = time.perf_counter() + doppler_start_tz = txr * 1e6 + doppler_freq_hz = txr * 1e6 while True: if (input(squelch) == False) and (command_tx == True): + doppler_freq_hz = doppler_start_hz + (time.perf_counter() - start_time) * 60 + print(doppler_freq_hz) + tx = "{:.3f}".format(doppler_freq/1000) + print(tx) print("Carrier detected, starting repeater") output(txLed, 1) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &") + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + " > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") while (input(squelch) == False): From f566645b71a3a8d136249278e323559144eba8e6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:08:17 -0400 Subject: [PATCH 1025/1744] Update transmit.py print start freq --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 22244ac0..e922da92 100644 --- a/transmit.py +++ b/transmit.py @@ -950,8 +950,9 @@ if __name__ == "__main__": print("Ready to detect carrier") start_time = time.perf_counter() - doppler_start_tz = txr * 1e6 + doppler_start_hz = txr * 1e6 doppler_freq_hz = txr * 1e6 + print(doppler_start_hz) while True: if (input(squelch) == False) and (command_tx == True): doppler_freq_hz = doppler_start_hz + (time.perf_counter() - start_time) * 60 From ea71c0537de83d027558ae0a3011aa0564094da7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:09:28 -0400 Subject: [PATCH 1026/1744] Update transmit.py fix variable --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index e922da92..82c9a20a 100644 --- a/transmit.py +++ b/transmit.py @@ -957,7 +957,7 @@ if __name__ == "__main__": if (input(squelch) == False) and (command_tx == True): doppler_freq_hz = doppler_start_hz + (time.perf_counter() - start_time) * 60 print(doppler_freq_hz) - tx = "{:.3f}".format(doppler_freq/1000) + tx = "{:.3f}".format(doppler_freq_hz/1000) print(tx) print("Carrier detected, starting repeater") output(txLed, 1) From c0d12522cdfb768c977a7c5b7de40fffaa397ec0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:28:28 -0400 Subject: [PATCH 1027/1744] Update transmit.py move program_fm to function --- transmit.py | 79 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 33 deletions(-) diff --git a/transmit.py b/transmit.py index 82c9a20a..eceef102 100644 --- a/transmit.py +++ b/transmit.py @@ -216,7 +216,37 @@ def camera_photo(): return True else: return False - + +def program_fm(rx, tx, rxpl_value, sq, txpl_value): + + global gpsd_status + global pd + global ptt + if (gpsd_status == "active"): + print("Stopping gpsd.socket") + system("sudo systemctl stop gpsd.socket") + print("Programming FM module!\n"); + output(pd, 1) + output (ptt, 1) + try: + ser = serial.Serial("/dev/ttyAMA0", 9600) + print(ser.portstr) + # uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" + uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" + print(uhf_string) + for i in range(6): + # ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") + ser.write(uhf_string.encode()) + sleep(0.1) + ser.close() + ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data + except: + print("Error in serial write") + output(pd, 0) + if (gpsd_status == "active"): + print("Restarting gpsd.socket") + system("sudo systemctl restart gpsd.socket") + print("CubeSatSim v2.2 transmit.py starting...") pd = 21 @@ -389,12 +419,12 @@ if __name__ == "__main__": print(f'squelch: {sq}') if len(config) > 6: txf = float(config[6]) + tx = "{:.4f}".format(txf) if (mode == 'e'): txr = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band - tx = "{:.4f}".format(txr) + print("Transmit frequency: ",txr) else: - tx = "{:.4f}".format(txf) - print("Transmit frequency: ",tx) + print("Transmit frequency: ",tx) if len(config) > 7: rxf = float(config[7]) # print(rxf) @@ -488,33 +518,9 @@ if __name__ == "__main__": print(f"Output of the command (stdout): {e.stdout}") # print(f"Error output of the command (stderr): {e.stderr}") - if (mode != 'e'): +# if (mode != 'e'): + program_fm(rx,tx,rxpl_value,sq,txpl_value) - if (gpsd_status == "active"): - print("Stopping gpsd.socket") - system("sudo systemctl stop gpsd.socket") - print("Programming FM module!\n"); - output(pd, 1) - output (ptt, 1) - try: - ser = serial.Serial("/dev/ttyAMA0", 9600) - print(ser.portstr) - # uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" - uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" - print(uhf_string) - for i in range(6): - # ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") - ser.write(uhf_string.encode()) - sleep(0.1) - ser.close() - ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data - except: - print("Error in serial write") - output(pd, 0) - if (gpsd_status == "active"): - print("Restarting gpsd.socket") - system("sudo systemctl restart gpsd.socket") - sim_failure_check() if (hab_mode == True) and (mode == 'a'): print("Don't transmit CW ID since APRS HAB mode is active") @@ -527,10 +533,17 @@ if __name__ == "__main__": status = status + " C" if sim_mode: status = status + " S" - if (debug_mode == 1): - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + if (mode != 'e'): + if (debug_mode == 1): + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + else: + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") else: - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + if (debug_mode == 1): + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3") + else: + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1") + output(txLed, 0) sleep(1) From e09eaa5ce8e55fe9d650c9c3d1e1603c7c889034 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:30:28 -0400 Subject: [PATCH 1028/1744] Update transmit.py make txr string --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index eceef102..6c049f0d 100644 --- a/transmit.py +++ b/transmit.py @@ -421,7 +421,8 @@ if __name__ == "__main__": txf = float(config[6]) tx = "{:.4f}".format(txf) if (mode == 'e'): - txr = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + txr = "{:.4f}".format(txrf) print("Transmit frequency: ",txr) else: print("Transmit frequency: ",tx) From 67461651cd501510bdc94f9a468912189c5f4538 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:32:25 -0400 Subject: [PATCH 1029/1744] Update transmit.py fix txr --- transmit.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index 6c049f0d..d0de724f 100644 --- a/transmit.py +++ b/transmit.py @@ -964,18 +964,18 @@ if __name__ == "__main__": print("Ready to detect carrier") start_time = time.perf_counter() - doppler_start_hz = txr * 1e6 - doppler_freq_hz = txr * 1e6 + doppler_start_hz = txrf * 1e6 + doppler_freq_hz = txrf * 1e6 print(doppler_start_hz) while True: if (input(squelch) == False) and (command_tx == True): doppler_freq_hz = doppler_start_hz + (time.perf_counter() - start_time) * 60 print(doppler_freq_hz) - tx = "{:.3f}".format(doppler_freq_hz/1000) - print(tx) + txr = "{:.3f}".format(doppler_freq_hz/1000) + print(txr) print("Carrier detected, starting repeater") output(txLed, 1) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + " > /dev/null 2>&1 &") + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") while (input(squelch) == False): From 2cd07c5f76e10694e1e4e99d4be41f6719f21ee9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:43:38 -0400 Subject: [PATCH 1030/1744] Update transmit.py fix doppler freq --- transmit.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index d0de724f..a0135477 100644 --- a/transmit.py +++ b/transmit.py @@ -964,12 +964,13 @@ if __name__ == "__main__": print("Ready to detect carrier") start_time = time.perf_counter() - doppler_start_hz = txrf * 1e6 - doppler_freq_hz = txrf * 1e6 - print(doppler_start_hz) + tx_doppler_start_hz = txrf * 1e6 + tx_doppler_shift_hz = 0 + print(tx_doppler_start_hz + tx_doppler_shift_hz) while True: if (input(squelch) == False) and (command_tx == True): - doppler_freq_hz = doppler_start_hz + (time.perf_counter() - start_time) * 60 + doppler_shift_hz = (time.perf_counter() - start_time) * 60 + doppler_freq_hz = doppler_start_hz + doppler_shift_hz print(doppler_freq_hz) txr = "{:.3f}".format(doppler_freq_hz/1000) print(txr) From 7aa35b3f63e8f8516ea28a7c102f887c31a51009 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:45:43 -0400 Subject: [PATCH 1031/1744] Update transmit.py rename tx_doppler --- transmit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index a0135477..abdced43 100644 --- a/transmit.py +++ b/transmit.py @@ -969,10 +969,10 @@ if __name__ == "__main__": print(tx_doppler_start_hz + tx_doppler_shift_hz) while True: if (input(squelch) == False) and (command_tx == True): - doppler_shift_hz = (time.perf_counter() - start_time) * 60 - doppler_freq_hz = doppler_start_hz + doppler_shift_hz - print(doppler_freq_hz) - txr = "{:.3f}".format(doppler_freq_hz/1000) + tx_doppler_shift_hz = (time.perf_counter() - start_time) * 60 + tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz + print(tx_doppler_freq_hz) + txr = "{:.3f}".format(tx_doppler_freq_hz/1000) print(txr) print("Carrier detected, starting repeater") output(txLed, 1) From a78d3a61989efcc4a4bc7f49132e38c3dfc565f1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:52:30 -0400 Subject: [PATCH 1032/1744] Update transmit.py add start and stop repeater functions --- transmit.py | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/transmit.py b/transmit.py index abdced43..512a4df5 100644 --- a/transmit.py +++ b/transmit.py @@ -247,6 +247,28 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): print("Restarting gpsd.socket") system("sudo systemctl restart gpsd.socket") +def start_repeater(txr): + global txLed + print("Starting repeater") + output(txLed, 1) + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") + sleep(0.5) + system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") + +def stop_repeater(): + global txLed +# print("No carrier detected, stopping repeater") + output(txLed, 0) + system("sudo rpitx -i null > /dev/null 2>&1") + system("sudo killall -9 arecord > /dev/null 2>&1") + system("sudo killall -9 nc > /dev/null 2>&1") + system("sudo killall -9 rpitx > /dev/null 2>&1") + print("Resetting audio") + system("sudo /etc/init.d/alsa-utils stop") + system("sudo /etc/init.d/alsa-utils start") + print("Finished resetting audio") +# print("Ready to detect carrier") + print("CubeSatSim v2.2 transmit.py starting...") pd = 21 @@ -974,24 +996,12 @@ if __name__ == "__main__": print(tx_doppler_freq_hz) txr = "{:.3f}".format(tx_doppler_freq_hz/1000) print(txr) - print("Carrier detected, starting repeater") - output(txLed, 1) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") - sleep(0.5) - system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") + print("Carrier detected") + start_repeater() while (input(squelch) == False): sleep(1) - print("No carrier detected, stopping repeater") - output(txLed, 0) - system("sudo rpitx -i null > /dev/null 2>&1") - system("sudo killall -9 arecord > /dev/null 2>&1") - system("sudo killall -9 nc > /dev/null 2>&1") - system("sudo killall -9 rpitx > /dev/null 2>&1") - print("Resetting audio") - system("sudo /etc/init.d/alsa-utils stop") - system("sudo /etc/init.d/alsa-utils start") - print("Finished resetting audio") - print("Ready to detect carrier") + print("No carrier detected") + stop_repeater() else: print("FSK") print("turn on FM rx") From 89bdf87859cb6079dc969637a04054fc6957b771 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 09:53:40 -0400 Subject: [PATCH 1033/1744] Update transmit.py add txr to start_repeater --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 512a4df5..9720b89e 100644 --- a/transmit.py +++ b/transmit.py @@ -997,7 +997,7 @@ if __name__ == "__main__": txr = "{:.3f}".format(tx_doppler_freq_hz/1000) print(txr) print("Carrier detected") - start_repeater() + start_repeater(txr) while (input(squelch) == False): sleep(1) print("No carrier detected") From 8367544b1c1c083b07062cf4eab5b0eec8133764 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 10:03:22 -0400 Subject: [PATCH 1034/1744] Update transmit.py program rx --- transmit.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 9720b89e..9f0eb5e8 100644 --- a/transmit.py +++ b/transmit.py @@ -988,7 +988,10 @@ if __name__ == "__main__": start_time = time.perf_counter() tx_doppler_start_hz = txrf * 1e6 tx_doppler_shift_hz = 0 - print(tx_doppler_start_hz + tx_doppler_shift_hz) + print(tx_doppler_start_hz) + rx_doppler_start_hz = rxf * 1e6 + rx_doppler_shift_hz = 0 + print(rx_doppler_start_hz) while True: if (input(squelch) == False) and (command_tx == True): tx_doppler_shift_hz = (time.perf_counter() - start_time) * 60 @@ -996,6 +999,10 @@ if __name__ == "__main__": print(tx_doppler_freq_hz) txr = "{:.3f}".format(tx_doppler_freq_hz/1000) print(txr) + rx_doppler_freq_hz = rx_doppler_start_hz + tx_doppler_shift_hz + rx = "{:.3f}".format(rx_doppler_freq_hz/1e6) + print(tx) + program_fm(rx,tx,rxpl_value,sq,txpl_value) print("Carrier detected") start_repeater(txr) while (input(squelch) == False): From c076d57caa0b8b8a4bd4157cce27be40ec2649d2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 10:08:17 -0400 Subject: [PATCH 1035/1744] Update transmit.py print rx --- transmit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 9f0eb5e8..6619b3d1 100644 --- a/transmit.py +++ b/transmit.py @@ -991,7 +991,8 @@ if __name__ == "__main__": print(tx_doppler_start_hz) rx_doppler_start_hz = rxf * 1e6 rx_doppler_shift_hz = 0 - print(rx_doppler_start_hz) + print(rx_doppler_start_hz) + print(rx_doppler_freq_hz) while True: if (input(squelch) == False) and (command_tx == True): tx_doppler_shift_hz = (time.perf_counter() - start_time) * 60 @@ -1000,8 +1001,9 @@ if __name__ == "__main__": txr = "{:.3f}".format(tx_doppler_freq_hz/1000) print(txr) rx_doppler_freq_hz = rx_doppler_start_hz + tx_doppler_shift_hz + print(rx_doppler_freq_hz) rx = "{:.3f}".format(rx_doppler_freq_hz/1e6) - print(tx) + print(rx) program_fm(rx,tx,rxpl_value,sq,txpl_value) print("Carrier detected") start_repeater(txr) From 929a6e306376ba318c8e9bede824c5264082d6f6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 10:10:24 -0400 Subject: [PATCH 1036/1744] Update transmit.py extra print --- transmit.py | 1 - 1 file changed, 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6619b3d1..19969159 100644 --- a/transmit.py +++ b/transmit.py @@ -992,7 +992,6 @@ if __name__ == "__main__": rx_doppler_start_hz = rxf * 1e6 rx_doppler_shift_hz = 0 print(rx_doppler_start_hz) - print(rx_doppler_freq_hz) while True: if (input(squelch) == False) and (command_tx == True): tx_doppler_shift_hz = (time.perf_counter() - start_time) * 60 From c52e4c484c04b1cf604b1f086febacdd14383c33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 10:12:24 -0400 Subject: [PATCH 1037/1744] Update transmit.py don't turn off receiver in program_fm --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 19969159..c6f5d705 100644 --- a/transmit.py +++ b/transmit.py @@ -242,7 +242,7 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data except: print("Error in serial write") - output(pd, 0) +# output(pd, 0) # Don't turn off receiver if (gpsd_status == "active"): print("Restarting gpsd.socket") system("sudo systemctl restart gpsd.socket") From b766789e4565f9a5b89e29fcd2e5130b8074a7f2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 12:48:59 -0400 Subject: [PATCH 1038/1744] Update transmit.py rx with 4 decimal places --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c6f5d705..72c50942 100644 --- a/transmit.py +++ b/transmit.py @@ -1001,7 +1001,7 @@ if __name__ == "__main__": print(txr) rx_doppler_freq_hz = rx_doppler_start_hz + tx_doppler_shift_hz print(rx_doppler_freq_hz) - rx = "{:.3f}".format(rx_doppler_freq_hz/1e6) + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) print(rx) program_fm(rx,tx,rxpl_value,sq,txpl_value) print("Carrier detected") From e1df088e52424f3d9b07f328b22d6c73c5804613 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 12:59:09 -0400 Subject: [PATCH 1039/1744] Update transmit.py 20k max doppler shift --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 72c50942..315f5cdf 100644 --- a/transmit.py +++ b/transmit.py @@ -994,7 +994,7 @@ if __name__ == "__main__": print(rx_doppler_start_hz) while True: if (input(squelch) == False) and (command_tx == True): - tx_doppler_shift_hz = (time.perf_counter() - start_time) * 60 + tx_doppler_shift_hz = ((time.perf_counter() - start_time) * 100) % 20000 tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz print(tx_doppler_freq_hz) txr = "{:.3f}".format(tx_doppler_freq_hz/1000) From eb6ecaa84ddcbc2a833909c9acc8368cf299da49 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:25:09 -0400 Subject: [PATCH 1040/1744] Update transmit.py add iss_doppler_passes --- transmit.py | 150 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/transmit.py b/transmit.py index 315f5cdf..c9dbfd83 100644 --- a/transmit.py +++ b/transmit.py @@ -269,6 +269,156 @@ def stop_repeater(): print("Finished resetting audio") # print("Ready to detect carrier") +iss_doppler_passes = { + 20: [ + {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, + {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, + {"time_sec": -160, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, + {"time_sec": -150, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, + {"time_sec": -140, "velocity_kms": -5.22, "doppler_434_khz": 7.57, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.52, "obs_144_mhz": 144.9025}, + {"time_sec": -130, "velocity_kms": -5.02, "doppler_434_khz": 7.28, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.43, "obs_144_mhz": 144.9024}, + {"time_sec": -120, "velocity_kms": -4.81, "doppler_434_khz": 6.98, "obs_434_mhz": 434.9070, "doppler_144_khz": 2.32, "obs_144_mhz": 144.9023}, + {"time_sec": -110, "velocity_kms": -4.57, "doppler_434_khz": 6.63, "obs_434_mhz": 434.9066, "doppler_144_khz": 2.21, "obs_144_mhz": 144.9022}, + {"time_sec": -100, "velocity_kms": -4.30, "doppler_434_khz": 6.24, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.08, "obs_144_mhz": 144.9021}, + {"time_sec": -90, "velocity_kms": -4.00, "doppler_434_khz": 5.80, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, + {"time_sec": -80, "velocity_kms": -3.68, "doppler_434_khz": 5.34, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.78, "obs_144_mhz": 144.9018}, + {"time_sec": -70, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, + {"time_sec": -60, "velocity_kms": -2.92, "doppler_434_khz": 4.24, "obs_434_mhz": 434.9042, "doppler_144_khz": 1.41, "obs_144_mhz": 144.9014}, + {"time_sec": -50, "velocity_kms": -2.50, "doppler_434_khz": 3.63, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.21, "obs_144_mhz": 144.9012}, + {"time_sec": -40, "velocity_kms": -2.04, "doppler_434_khz": 2.96, "obs_434_mhz": 434.9030, "doppler_144_khz": 0.99, "obs_144_mhz": 144.9010}, + {"time_sec": -30, "velocity_kms": -1.56, "doppler_434_khz": 2.26, "obs_434_mhz": 434.9023, "doppler_144_khz": 0.75, "obs_144_mhz": 144.9008}, + {"time_sec": -20, "velocity_kms": -1.05, "doppler_434_khz": 1.52, "obs_434_mhz": 434.9015, "doppler_144_khz": 0.51, "obs_144_mhz": 144.9005}, + {"time_sec": -10, "velocity_kms": -0.53, "doppler_434_khz": 0.77, "obs_434_mhz": 434.9008, "doppler_144_khz": 0.26, "obs_144_mhz": 144.9003}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 0.53, "doppler_434_khz": -0.77, "obs_434_mhz": 434.8992, "doppler_144_khz": -0.26, "obs_144_mhz": 144.8997}, + {"time_sec": 20, "velocity_kms": 1.05, "doppler_434_khz": -1.52, "obs_434_mhz": 434.8985, "doppler_144_khz": -0.51, "obs_144_mhz": 144.8995}, + {"time_sec": 30, "velocity_kms": 1.56, "doppler_434_khz": -2.26, "obs_434_mhz": 434.8977, "doppler_144_khz": -0.75, "obs_144_mhz": 144.8992}, + {"time_sec": 40, "velocity_kms": 2.04, "doppler_434_khz": -2.96, "obs_434_mhz": 434.8970, "doppler_144_khz": -0.99, "obs_144_mhz": 144.8990}, + {"time_sec": 50, "velocity_kms": 2.50, "doppler_434_khz": -3.63, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.21, "obs_144_mhz": 144.8988}, + {"time_sec": 60, "velocity_kms": 2.92, "doppler_434_khz": -4.24, "obs_434_mhz": 434.8958, "doppler_144_khz": -1.41, "obs_144_mhz": 144.8986}, + {"time_sec": 70, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, + {"time_sec": 80, "velocity_kms": 3.68, "doppler_434_khz": -5.34, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.78, "obs_144_mhz": 144.8982}, + {"time_sec": 90, "velocity_kms": 4.00, "doppler_434_khz": -5.80, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981}, + {"time_sec": 100, "velocity_kms": 4.30, "doppler_434_khz": -6.24, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.08, "obs_144_mhz": 144.8979}, + {"time_sec": 110, "velocity_kms": 4.57, "doppler_434_khz": -6.63, "obs_434_mhz": 434.8934, "doppler_144_khz": -2.21, "obs_144_mhz": 144.8978}, + {"time_sec": 120, "velocity_kms": 4.81, "doppler_434_khz": -6.98, "obs_434_mhz": 434.8930, "doppler_144_khz": -2.32, "obs_144_mhz": 144.8977}, + {"time_sec": 130, "velocity_kms": 5.02, "doppler_434_khz": -7.28, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.43, "obs_144_mhz": 144.8976}, + {"time_sec": 140, "velocity_kms": 5.22, "doppler_434_khz": -7.57, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.52, "obs_144_mhz": 144.8975}, + {"time_sec": 150, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, + {"time_sec": 160, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, + {"time_sec": 170, "velocity_kms": 5.68, "doppler_434_khz": -8.24, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.75, "obs_144_mhz": 144.8973}, + {"time_sec": 180, "velocity_kms": 5.81, "doppler_434_khz": -8.43, "obs_434_mhz": 434.8916, "doppler_144_khz": -2.81, "obs_144_mhz": 144.8972} + ], + 40: [ + {"time_sec": -180, "velocity_kms": -6.67, "doppler_434_khz": 9.68, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.22, "obs_144_mhz": 144.9032}, + {"time_sec": -170, "velocity_kms": -6.60, "doppler_434_khz": 9.57, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.19, "obs_144_mhz": 144.9032}, + {"time_sec": -160, "velocity_kms": -6.52, "doppler_434_khz": 9.46, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.15, "obs_144_mhz": 144.9032}, + {"time_sec": -150, "velocity_kms": -6.43, "doppler_434_khz": 9.33, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.11, "obs_144_mhz": 144.9031}, + {"time_sec": -140, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, + {"time_sec": -130, "velocity_kms": -6.19, "doppler_434_khz": 8.98, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.99, "obs_144_mhz": 144.9030}, + {"time_sec": -120, "velocity_kms": -6.04, "doppler_434_khz": 8.76, "obs_434_mhz": 434.9088, "doppler_144_khz": 2.92, "obs_144_mhz": 144.9029}, + {"time_sec": -110, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, + {"time_sec": -100, "velocity_kms": -5.65, "doppler_434_khz": 8.20, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.73, "obs_144_mhz": 144.9027}, + {"time_sec": -90, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, + {"time_sec": -80, "velocity_kms": -5.08, "doppler_434_khz": 7.37, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.46, "obs_144_mhz": 144.9025}, + {"time_sec": -70, "velocity_kms": -4.72, "doppler_434_khz": 6.85, "obs_434_mhz": 434.9068, "doppler_144_khz": 2.28, "obs_144_mhz": 144.9023}, + {"time_sec": -60, "velocity_kms": -4.28, "doppler_434_khz": 6.21, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.07, "obs_144_mhz": 144.9021}, + {"time_sec": -50, "velocity_kms": -3.77, "doppler_434_khz": 5.47, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.82, "obs_144_mhz": 144.8993}, # manual note context adjustments active + {"time_sec": -40, "velocity_kms": -3.17, "doppler_434_khz": 4.60, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.53, "obs_144_mhz": 144.9015}, + {"time_sec": -30, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, + {"time_sec": -20, "velocity_kms": -1.70, "doppler_434_khz": 2.47, "obs_434_mhz": 434.9025, "doppler_144_khz": 0.82, "obs_144_mhz": 144.9008}, + {"time_sec": -10, "velocity_kms": -0.87, "doppler_434_khz": 1.26, "obs_434_mhz": 434.9013, "doppler_144_khz": 0.42, "obs_144_mhz": 144.9004}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 0.87, "doppler_434_khz": -1.26, "obs_434_mhz": 434.8987, "doppler_144_khz": -0.42, "obs_144_mhz": 144.8996}, + {"time_sec": 20, "velocity_kms": 1.70, "doppler_434_khz": -2.47, "obs_434_mhz": 434.8975, "doppler_144_khz": -0.82, "obs_144_mhz": 144.8992}, + {"time_sec": 30, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, + {"time_sec": 40, "velocity_kms": 3.17, "doppler_434_khz": -4.60, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.53, "obs_144_mhz": 144.8985}, + {"time_sec": 50, "velocity_kms": 3.77, "doppler_434_khz": -5.47, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.82, "obs_144_mhz": 144.8982}, + {"time_sec": 60, "velocity_kms": 4.28, "doppler_434_khz": -6.21, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.07, "obs_144_mhz": 144.8979}, + {"time_sec": 70, "velocity_kms": 4.72, "doppler_434_khz": -6.85, "obs_434_mhz": 434.8932, "doppler_144_khz": -2.28, "obs_144_mhz": 144.8977}, + {"time_sec": 80, "velocity_kms": 5.08, "doppler_434_khz": -7.37, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.46, "obs_144_mhz": 144.8975}, + {"time_sec": 90, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974} + ], + 70: [ + {"time_sec": -180, "velocity_kms": -7.00, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, + {"time_sec": -170, "velocity_kms": -6.95, "doppler_434_khz": 10.09, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.36, "obs_144_mhz": 144.9034}, + {"time_sec": -160, "velocity_kms": -6.91, "doppler_434_khz": 10.02, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.34, "obs_144_mhz": 144.9033}, + {"time_sec": -150, "velocity_kms": -6.86, "doppler_434_khz": 9.95, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.32, "obs_144_mhz": 144.9033}, + {"time_sec": -140, "velocity_kms": -6.78, "doppler_434_khz": 9.84, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.28, "obs_144_mhz": 144.9033}, + {"time_sec": -130, "velocity_kms": -6.70, "doppler_434_khz": 9.72, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, + {"time_sec": -120, "velocity_kms": -6.62, "doppler_434_khz": 9.60, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, + {"time_sec": -110, "velocity_kms": -6.47, "doppler_434_khz": 9.39, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.13, "obs_144_mhz": 144.9031}, + {"time_sec": -100, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, + {"time_sec": -90, "velocity_kms": -6.17, "doppler_434_khz": 8.95, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.98, "obs_144_mhz": 144.9030}, + {"time_sec": -80, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, + {"time_sec": -70, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, + {"time_sec": -60, "velocity_kms": -5.24, "doppler_434_khz": 7.60, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.53, "obs_144_mhz": 144.9025}, + {"time_sec": -50, "velocity_kms": -4.60, "doppler_434_khz": 6.67, "obs_434_mhz": 434.9067, "doppler_144_khz": 2.22, "obs_144_mhz": 144.9022}, + {"time_sec": -40, "velocity_kms": -3.96, "doppler_434_khz": 5.74, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.91, "obs_144_mhz": 144.9019}, + {"time_sec": -30, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, + {"time_sec": -20, "velocity_kms": -2.21, "doppler_434_khz": 3.21, "obs_434_mhz": 434.9032, "doppler_144_khz": 1.07, "obs_144_mhz": 144.9011}, + {"time_sec": -10, "velocity_kms": -1.11, "doppler_434_khz": 1.61, "obs_434_mhz": 434.9016, "doppler_144_khz": 0.53, "obs_144_mhz": 144.9005}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 1.11, "doppler_434_khz": -1.61, "obs_434_mhz": 434.8984, "doppler_144_khz": -0.53, "obs_144_mhz": 144.8995}, + {"time_sec": 20, "velocity_kms": 2.21, "doppler_434_khz": -3.21, "obs_434_mhz": 434.8968, "doppler_144_khz": -1.07, "obs_144_mhz": 144.8989}, + {"time_sec": 30, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, + {"time_sec": 40, "velocity_kms": 3.96, "doppler_434_khz": -5.74, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.91, "obs_144_mhz": 144.8981}, + {"time_sec": 50, "velocity_kms": 4.60, "doppler_434_khz": -6.67, "obs_434_mhz": 434.8933, "doppler_144_khz": -2.22, "obs_144_mhz": 144.8978}, + {"time_sec": 60, "velocity_kms": 5.24, "doppler_434_khz": -7.60, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.53, "obs_144_mhz": 144.8975}, + {"time_sec": 70, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, + {"time_sec": 80, "velocity_kms": 5.86, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, + {"time_sec": 90, "velocity_kms": 6.17, "doppler_434_khz": -8.95, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.98, "obs_144_mhz": 144.8970}, + {"time_sec": 100:, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, + {"time_sec": 110, "velocity_kms": 6.47, "doppler_434_khz": -9.39, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.13, "obs_144_mhz": 144.8969}, + {"time_sec": 120, "velocity_kms": 6.62, "doppler_434_khz": -9.60, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, + {"time_sec": 130, "velocity_kms": 6.70, "doppler_434_khz": -9.72, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, + {"time_sec": 140, "velocity_kms": 6.78, "doppler_434_khz": -9.84, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.28, "obs_144_mhz": 144.8967}, + {"time_sec": 150, "velocity_kms": 6.86, "doppler_434_khz": -9.95, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.32, "obs_144_mhz": 144.8967}, + {"time_sec": 160, "velocity_kms": 6.91, "doppler_434_khz": -10.02, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.34, "obs_144_mhz": 144.8967}, + {"time_sec": 170, "velocity_kms": 6.95, "doppler_434_khz": -10.09, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.36, "obs_144_mhz": 144.8966}, + {"time_sec": 180, "velocity_kms": 7.00, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966} + ], + 85: [ + {"time_sec": -180, "velocity_kms": -7.15, "doppler_434_khz": 10.37, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.46, "obs_144_mhz": 144.9035}, + {"time_sec": -170, "velocity_kms": -7.12, "doppler_434_khz": 10.32, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.44, "obs_144_mhz": 144.9034}, + {"time_sec": -160, "velocity_kms": -7.08, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.42, "obs_144_mhz": 144.9034}, + {"time_sec": -150, "velocity_kms": -7.05, "doppler_434_khz": 10.23, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.41, "obs_144_mhz": 144.9034}, + {"time_sec": -140, "velocity_kms": -6.99, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, + {"time_sec": -130, "velocity_kms": -6.94, "doppler_434_khz": 10.06, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.35, "obs_144_mhz": 144.9034}, + {"time_sec": -120, "velocity_kms": -6.88, "doppler_434_khz": 9.98, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, + {"time_sec": -110, "velocity_kms": -6.75, "doppler_434_khz": 9.80, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.26, "obs_144_mhz": 144.9033}, + {"time_sec": -100, "velocity_kms": -6.63, "doppler_434_khz": 9.61, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, + {"time_sec": -90, "velocity_kms": -6.50, "doppler_434_khz": 9.43, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.14, "obs_144_mhz": 144.9031}, + {"time_sec": -80, "velocity_kms": -6.23, "doppler_434_khz": 9.04, "obs_434_mhz": 434.9090, "doppler_144_khz": 3.01, "obs_144_mhz": 144.9030}, + {"time_sec": -70, "velocity_kms": -5.97, "doppler_434_khz": 8.66, "obs_434_mhz": 434.9087, "doppler_144_khz": 2.88, "obs_144_mhz": 144.9029}, + {"time_sec": -60, "velocity_kms": -5.70, "doppler_434_khz": 8.27, "obs_434_mhz": 434.9083, "doppler_144_khz": 2.76, "obs_144_mhz": 144.9028}, + {"time_sec": -50, "velocity_kms": -5.10, "doppler_434_khz": 7.40, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.47, "obs_144_mhz": 144.9025}, + {"time_sec": -40, "velocity_kms": -4.50, "doppler_434_khz": 6.53, "obs_434_mhz": 434.9065, "doppler_144_khz": 2.18, "obs_144_mhz": 144.9022}, + {"time_sec": -30, "velocity_kms": -3.90, "doppler_434_khz": 5.66, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.89, "obs_144_mhz": 144.9019}, + {"time_sec": -20 ,"velocity_kms": -2.60, "doppler_434_khz": 3.77, "obs_434_mhz": 434.9038, "doppler_144_khz": 1.26, "obs_144_mhz": 144.9013}, + {"time_sec": -10 ,"velocity_kms": -1.30, "doppler_434_khz": 1.89, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.63, "obs_144_mhz": 144.9006}, + {"time_sec": 0 ,"velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10 ,"velocity_kms": 1.30, "doppler_434_khz": -1.89, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.63, "obs_144_mhz": 144.8994}, + {"time_sec": 20 ,"velocity_kms": 2.60, "doppler_434_khz": -3.77, "obs_434_mhz": 434.8962, "doppler_144_khz": -1.26, "obs_144_mhz": 144.8987}, + {"time_sec": 30 ,"velocity_kms": 3.90, "doppler_434_khz": -5.66, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.89, "obs_144_mhz": 144.8981}, + {"time_sec": 40 ,"velocity_kms": 4.50, "doppler_434_khz": -6.53, "obs_434_mhz": 434.8935, "doppler_144_khz": -2.18, "obs_144_mhz": 144.8978}, + {"time_sec": 50 ,"velocity_kms": 5.10, "doppler_434_khz": -7.40, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.47, "obs_144_mhz": 144.8975}, + {"time_sec": 60 ,"velocity_kms": 5.70, "doppler_434_khz": -8.27, "obs_434_mhz": 434.8917, "doppler_144_khz": -2.76, "obs_144_mhz": 144.8972}, + {"time_sec": 70 ,"velocity_kms": 5.97, "doppler_434_khz": -8.66, "obs_434_mhz": 434.8913, "doppler_144_khz": -2.88, "obs_144_mhz": 144.8971}, + {"time_sec": 80 ,"velocity_kms": 6.23, "doppler_434_khz": -9.04, "obs_434_mhz": 434.8910, "doppler_144_khz": -3.01, "obs_144_mhz": 144.8970}, + {"time_sec": 90 ,"velocity_kms": 6.50, "doppler_434_khz": -9.43, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.14, "obs_144_mhz": 144.8969}, + {"time_sec": 100 ,"velocity_kms": 6.63, "doppler_434_khz": -9.61, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, + {"time_sec": 110 ,"velocity_kms": 6.75, "doppler_434_khz": -9.80, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.26, "obs_144_mhz": 144.8967}, + {"time_sec": 120 ,"velocity_kms": 6.88, "doppler_434_khz": -9.98, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, + {"time_sec": 130 ,"velocity_kms": 6.94, "doppler_434_khz": -10.06, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.35, "obs_144_mhz": 144.8966}, + {"time_sec": 140 ,"velocity_kms": 6.99, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966}, + {"time_sec": 150 ,"velocity_kms": 7.05, "doppler_434_khz": -10.23, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.41, "obs_144_mhz": 144.8966}, + {"time_sec": 160 ,"velocity_kms": 7.08, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8917, "doppler_144_khz": -3.42, "obs_144_mhz": 144.8966}, + {"time_sec": 170 ,"velocity_kms": 7.12, "doppler_434_khz": -10.32, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.44, "obs_144_mhz": 144.8966}, + {"time_sec": 180 ,"velocity_kms": 7.15, "doppler_434_khz": -10.37, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.46, "obs_144_mhz": 144.8965} + ] +} + print("CubeSatSim v2.2 transmit.py starting...") pd = 21 From 42978df6ce57aa8ffb924f1b98c0132d5d7eba46 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:29:16 -0400 Subject: [PATCH 1041/1744] Update transmit.py extra : --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c9dbfd83..9bf72d46 100644 --- a/transmit.py +++ b/transmit.py @@ -368,7 +368,7 @@ iss_doppler_passes = { {"time_sec": 70, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, {"time_sec": 80, "velocity_kms": 5.86, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, {"time_sec": 90, "velocity_kms": 6.17, "doppler_434_khz": -8.95, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.98, "obs_144_mhz": 144.8970}, - {"time_sec": 100:, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, + {"time_sec": 100, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, {"time_sec": 110, "velocity_kms": 6.47, "doppler_434_khz": -9.39, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.13, "obs_144_mhz": 144.8969}, {"time_sec": 120, "velocity_kms": 6.62, "doppler_434_khz": -9.60, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, {"time_sec": 130, "velocity_kms": 6.70, "doppler_434_khz": -9.72, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, From c55843147f8d408dacb1120a1f2cd3234528f286 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:37:34 -0400 Subject: [PATCH 1042/1744] Update transmit.py add doppler retrieval code --- transmit.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/transmit.py b/transmit.py index 9bf72d46..8e00fd32 100644 --- a/transmit.py +++ b/transmit.py @@ -1142,6 +1142,32 @@ if __name__ == "__main__": rx_doppler_start_hz = rxf * 1e6 rx_doppler_shift_hz = 0 print(rx_doppler_start_hz) + + TARGET_PASS = 85 # Maximum elevation profile + PASS_START_TIME = -180 # The absolute time index where the pass begins + TIME_FROM_START = 30 # 30 seconds into the pass + + # Map the "time from start" to the "relative time index" used in the table + relative_time_index = PASS_START_TIME + TIME_FROM_START + index = 10/10 + + try: + # Navigate the dictionary structure + pass_profile = iss_doppler_database[TARGET_PASS] + data_entry = pass_profile[index] # relative_time_index] + + # Extract the specific metric + doppler_shift = data_entry["doppler_434"] + + print(f"Pass Elevation: {TARGET_PASS}°") +# print(f"Time Index: {TIME_FROM_START} seconds from start (Relative: {relative_time_index}s)") + print(f"Time Index: {index}") + print(f"Extracted Doppler Shift (434.9 MHz): {doppler_shift} kHz") + + except KeyError: + print("Error: The requested pass elevation or time index does not exist in the database.") + + while True: if (input(squelch) == False) and (command_tx == True): tx_doppler_shift_hz = ((time.perf_counter() - start_time) * 100) % 20000 From 8fc5d62437a921f82d27e49b0d6ca31c8a4c1dce Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:38:33 -0400 Subject: [PATCH 1043/1744] Update transmit.py change to passes --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 8e00fd32..8b70a3c6 100644 --- a/transmit.py +++ b/transmit.py @@ -1153,7 +1153,7 @@ if __name__ == "__main__": try: # Navigate the dictionary structure - pass_profile = iss_doppler_database[TARGET_PASS] + pass_profile = iss_doppler_passes[TARGET_PASS] data_entry = pass_profile[index] # relative_time_index] # Extract the specific metric From d9eb34fef2d6356185e56807ce1e71a7bda5dfbd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:39:53 -0400 Subject: [PATCH 1044/1744] Update transmit.py make index int --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 8b70a3c6..053fa491 100644 --- a/transmit.py +++ b/transmit.py @@ -1149,7 +1149,7 @@ if __name__ == "__main__": # Map the "time from start" to the "relative time index" used in the table relative_time_index = PASS_START_TIME + TIME_FROM_START - index = 10/10 + index = int(10/10) try: # Navigate the dictionary structure From 6da20d3c4e8dc0a188eb796fc3223f176f6c4dee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:48:42 -0400 Subject: [PATCH 1045/1744] Update transmit.py change indexes --- transmit.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index 053fa491..351a9c32 100644 --- a/transmit.py +++ b/transmit.py @@ -1153,11 +1153,18 @@ if __name__ == "__main__": try: # Navigate the dictionary structure - pass_profile = iss_doppler_passes[TARGET_PASS] - data_entry = pass_profile[index] # relative_time_index] - - # Extract the specific metric - doppler_shift = data_entry["doppler_434"] +# pass_profile = iss_doppler_passes[TARGET_PASS] +# data_entry = pass_profile[index] # relative_time_index] + + third_row = iss_doppler_passes[TARGET_PASS][index] + + print("Full Third:") + print(third_row) + print("\n" + "="*40 + "\n") + + time_index = third_row["time_sec"] + doppler_shift = third_row["doppler_434"] + uhf_freq = third_row["obs_434_mhz"] print(f"Pass Elevation: {TARGET_PASS}°") # print(f"Time Index: {TIME_FROM_START} seconds from start (Relative: {relative_time_index}s)") From af69b00d62bb7fff6e0b06bbef44c37f2c8ee765 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:50:10 -0400 Subject: [PATCH 1046/1744] Update transmit.py fix indent --- transmit.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/transmit.py b/transmit.py index 351a9c32..f7a8f2e8 100644 --- a/transmit.py +++ b/transmit.py @@ -1166,15 +1166,14 @@ if __name__ == "__main__": doppler_shift = third_row["doppler_434"] uhf_freq = third_row["obs_434_mhz"] - print(f"Pass Elevation: {TARGET_PASS}°") + print(f"Pass Elevation: {TARGET_PASS}°") # print(f"Time Index: {TIME_FROM_START} seconds from start (Relative: {relative_time_index}s)") - print(f"Time Index: {index}") - print(f"Extracted Doppler Shift (434.9 MHz): {doppler_shift} kHz") + print(f"Time Index: {index}") + print(f"Extracted Doppler Shift (434.9 MHz): {doppler_shift} kHz") except KeyError: - print("Error: The requested pass elevation or time index does not exist in the database.") - - + print("Error: The requested pass elevation or time index does not exist in the database.") + while True: if (input(squelch) == False) and (command_tx == True): tx_doppler_shift_hz = ((time.perf_counter() - start_time) * 100) % 20000 From 56efeff989e9dbbe0d107c504d0f3e90c68be618 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 15:53:33 -0400 Subject: [PATCH 1047/1744] Update transmit.py fix index --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f7a8f2e8..285ae666 100644 --- a/transmit.py +++ b/transmit.py @@ -1163,13 +1163,14 @@ if __name__ == "__main__": print("\n" + "="*40 + "\n") time_index = third_row["time_sec"] - doppler_shift = third_row["doppler_434"] + doppler_shift = third_row["doppler_434_khz"] uhf_freq = third_row["obs_434_mhz"] print(f"Pass Elevation: {TARGET_PASS}°") # print(f"Time Index: {TIME_FROM_START} seconds from start (Relative: {relative_time_index}s)") print(f"Time Index: {index}") print(f"Extracted Doppler Shift (434.9 MHz): {doppler_shift} kHz") + print(f"UHF frequency (434.9 MHz): {uhf_freq} MHz") except KeyError: print("Error: The requested pass elevation or time index does not exist in the database.") From 856d4ac540c23b6e8ff60c451c7f87cb84e173a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:05:28 -0400 Subject: [PATCH 1048/1744] Update transmit.py lookup tx and rx doppler --- transmit.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index 285ae666..4c063826 100644 --- a/transmit.py +++ b/transmit.py @@ -269,7 +269,7 @@ def stop_repeater(): print("Finished resetting audio") # print("Ready to detect carrier") -iss_doppler_passes = { +doppler_passes = { 20: [ {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, @@ -1156,6 +1156,7 @@ if __name__ == "__main__": # pass_profile = iss_doppler_passes[TARGET_PASS] # data_entry = pass_profile[index] # relative_time_index] + doppler_table = iss_doppler_passes[TARGET_PASS] third_row = iss_doppler_passes[TARGET_PASS][index] print("Full Third:") @@ -1177,15 +1178,22 @@ if __name__ == "__main__": while True: if (input(squelch) == False) and (command_tx == True): - tx_doppler_shift_hz = ((time.perf_counter() - start_time) * 100) % 20000 + + relative_time = time.perf_counter() - start_time + index = int(relative_time/10) + table_row = iss_doppler_table[index] + rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + +# tx_doppler_shift_hz = ((time.perf_counter() - start_time) * 100) % 20000 tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(tx_doppler_freq_hz) + print(f"Tx Doppler shift: {tx_doppler_freq_hz}") txr = "{:.3f}".format(tx_doppler_freq_hz/1000) print(txr) rx_doppler_freq_hz = rx_doppler_start_hz + tx_doppler_shift_hz - print(rx_doppler_freq_hz) + print(f"Rx Doppler shift: {rx_doppler_freq_hz}") rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) - print(rx) +# print(rx) program_fm(rx,tx,rxpl_value,sq,txpl_value) print("Carrier detected") start_repeater(txr) From 81f428db9fb79a4c69a77806b56aeef5d946b11f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:06:56 -0400 Subject: [PATCH 1049/1744] Update transmit.py change to doppler_table --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 4c063826..524d5a53 100644 --- a/transmit.py +++ b/transmit.py @@ -1181,7 +1181,7 @@ if __name__ == "__main__": relative_time = time.perf_counter() - start_time index = int(relative_time/10) - table_row = iss_doppler_table[index] + table_row = doppler_table[index] rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 From faba648eae4909599401eebd2e0ab7612f8c1a98 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:08:32 -0400 Subject: [PATCH 1050/1744] Update transmit.py iss_doppler_passes --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 524d5a53..048ddaed 100644 --- a/transmit.py +++ b/transmit.py @@ -269,7 +269,7 @@ def stop_repeater(): print("Finished resetting audio") # print("Ready to detect carrier") -doppler_passes = { +iss_doppler_passes = { 20: [ {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, From 2ecd386418c0dd03750a8270fa06c94e331f36ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:19:08 -0400 Subject: [PATCH 1051/1744] Update transmit.py time in 370 second periods --- transmit.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/transmit.py b/transmit.py index 048ddaed..88daea48 100644 --- a/transmit.py +++ b/transmit.py @@ -1138,17 +1138,17 @@ if __name__ == "__main__": start_time = time.perf_counter() tx_doppler_start_hz = txrf * 1e6 tx_doppler_shift_hz = 0 - print(tx_doppler_start_hz) + print(f"Tx center frequency: {tx_doppler_start_hz}") rx_doppler_start_hz = rxf * 1e6 rx_doppler_shift_hz = 0 - print(rx_doppler_start_hz) + print(f"Rx center frequency: {rx_doppler_start_hz}") TARGET_PASS = 85 # Maximum elevation profile - PASS_START_TIME = -180 # The absolute time index where the pass begins - TIME_FROM_START = 30 # 30 seconds into the pass +# PASS_START_TIME = -180 # The absolute time index where the pass begins +# TIME_FROM_START = 30 # 30 seconds into the pass # Map the "time from start" to the "relative time index" used in the table - relative_time_index = PASS_START_TIME + TIME_FROM_START +# relative_time_index = PASS_START_TIME + TIME_FROM_START index = int(10/10) try: @@ -1159,9 +1159,9 @@ if __name__ == "__main__": doppler_table = iss_doppler_passes[TARGET_PASS] third_row = iss_doppler_passes[TARGET_PASS][index] - print("Full Third:") - print(third_row) - print("\n" + "="*40 + "\n") +# print("Full Third:") +# print(third_row) +# print("\n" + "="*40 + "\n") time_index = third_row["time_sec"] doppler_shift = third_row["doppler_434_khz"] @@ -1170,8 +1170,8 @@ if __name__ == "__main__": print(f"Pass Elevation: {TARGET_PASS}°") # print(f"Time Index: {TIME_FROM_START} seconds from start (Relative: {relative_time_index}s)") print(f"Time Index: {index}") - print(f"Extracted Doppler Shift (434.9 MHz): {doppler_shift} kHz") - print(f"UHF frequency (434.9 MHz): {uhf_freq} MHz") + print(f"Extracted Doppler Shift (435.0 MHz): {doppler_shift} kHz") + print(f"UHF frequency (435.0 MHz): {uhf_freq} MHz") except KeyError: print("Error: The requested pass elevation or time index does not exist in the database.") @@ -1179,7 +1179,7 @@ if __name__ == "__main__": while True: if (input(squelch) == False) and (command_tx == True): - relative_time = time.perf_counter() - start_time + relative_time = (time.perf_counter() - start_time) % 370 index = int(relative_time/10) table_row = doppler_table[index] rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 @@ -1190,7 +1190,7 @@ if __name__ == "__main__": print(f"Tx Doppler shift: {tx_doppler_freq_hz}") txr = "{:.3f}".format(tx_doppler_freq_hz/1000) print(txr) - rx_doppler_freq_hz = rx_doppler_start_hz + tx_doppler_shift_hz + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz}") rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) # print(rx) From d9d6b90c21a4d691bb513fd67f37c883dee32847 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:38:52 -0400 Subject: [PATCH 1052/1744] Update transmit.py cleanup doppler table --- transmit.py | 109 ++++++++++++++++++++++++++++------------------------ 1 file changed, 59 insertions(+), 50 deletions(-) diff --git a/transmit.py b/transmit.py index 88daea48..bc589740 100644 --- a/transmit.py +++ b/transmit.py @@ -337,38 +337,47 @@ iss_doppler_passes = { {"time_sec": 60, "velocity_kms": 4.28, "doppler_434_khz": -6.21, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.07, "obs_144_mhz": 144.8979}, {"time_sec": 70, "velocity_kms": 4.72, "doppler_434_khz": -6.85, "obs_434_mhz": 434.8932, "doppler_144_khz": -2.28, "obs_144_mhz": 144.8977}, {"time_sec": 80, "velocity_kms": 5.08, "doppler_434_khz": -7.37, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.46, "obs_144_mhz": 144.8975}, - {"time_sec": 90, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974} - ], + {"time_sec": 90, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, + {"time_sec": 100, "velocity_kms": 0.87, "doppler_434_khz": -8.19, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.73, "obs_144_mhz": 144.8973}, + {"time_sec": 110, "velocity_kms": 1.70, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, + {"time_sec": 120, "velocity_kms": 2.48, "doppler_434_khz": -8.76, "obs_434_mhz": 434.8912, "doppler_144_khz": -2.92, "obs_144_mhz": 144.8971}, + {"time_sec": 130, "velocity_kms": 3.17, "doppler_434_khz": -8.98, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.99, "obs_144_mhz": 144.8970}, + {"time_sec": 140, "velocity_kms": 3.77, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, + {"time_sec": 150, "velocity_kms": 4.28, "doppler_434_khz": -9.33, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.11, "obs_144_mhz": 144.8969}, + {"time_sec": 160, "velocity_kms": 4.72, "doppler_434_khz": -9.46, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.15, "obs_144_mhz": 144.8968}, + {"time_sec": 170, "velocity_kms": 5.08, "doppler_434_khz": -9.58, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.19, "obs_144_mhz": 144.8968}, + {"time_sec": 180, "velocity_kms": 5.39, "doppler_434_khz": -9.68, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.22, "obs_144_mhz": 144.8968} + ], 70: [ {"time_sec": -180, "velocity_kms": -7.00, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, {"time_sec": -170, "velocity_kms": -6.95, "doppler_434_khz": 10.09, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.36, "obs_144_mhz": 144.9034}, {"time_sec": -160, "velocity_kms": -6.91, "doppler_434_khz": 10.02, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.34, "obs_144_mhz": 144.9033}, - {"time_sec": -150, "velocity_kms": -6.86, "doppler_434_khz": 9.95, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.32, "obs_144_mhz": 144.9033}, - {"time_sec": -140, "velocity_kms": -6.78, "doppler_434_khz": 9.84, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.28, "obs_144_mhz": 144.9033}, - {"time_sec": -130, "velocity_kms": -6.70, "doppler_434_khz": 9.72, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, - {"time_sec": -120, "velocity_kms": -6.62, "doppler_434_khz": 9.60, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, - {"time_sec": -110, "velocity_kms": -6.47, "doppler_434_khz": 9.39, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.13, "obs_144_mhz": 144.9031}, - {"time_sec": -100, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, - {"time_sec": -90, "velocity_kms": -6.17, "doppler_434_khz": 8.95, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.98, "obs_144_mhz": 144.9030}, - {"time_sec": -80, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, - {"time_sec": -70, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, - {"time_sec": -60, "velocity_kms": -5.24, "doppler_434_khz": 7.60, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.53, "obs_144_mhz": 144.9025}, - {"time_sec": -50, "velocity_kms": -4.60, "doppler_434_khz": 6.67, "obs_434_mhz": 434.9067, "doppler_144_khz": 2.22, "obs_144_mhz": 144.9022}, - {"time_sec": -40, "velocity_kms": -3.96, "doppler_434_khz": 5.74, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.91, "obs_144_mhz": 144.9019}, - {"time_sec": -30, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, - {"time_sec": -20, "velocity_kms": -2.21, "doppler_434_khz": 3.21, "obs_434_mhz": 434.9032, "doppler_144_khz": 1.07, "obs_144_mhz": 144.9011}, - {"time_sec": -10, "velocity_kms": -1.11, "doppler_434_khz": 1.61, "obs_434_mhz": 434.9016, "doppler_144_khz": 0.53, "obs_144_mhz": 144.9005}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 1.11, "doppler_434_khz": -1.61, "obs_434_mhz": 434.8984, "doppler_144_khz": -0.53, "obs_144_mhz": 144.8995}, - {"time_sec": 20, "velocity_kms": 2.21, "doppler_434_khz": -3.21, "obs_434_mhz": 434.8968, "doppler_144_khz": -1.07, "obs_144_mhz": 144.8989}, - {"time_sec": 30, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, - {"time_sec": 40, "velocity_kms": 3.96, "doppler_434_khz": -5.74, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.91, "obs_144_mhz": 144.8981}, - {"time_sec": 50, "velocity_kms": 4.60, "doppler_434_khz": -6.67, "obs_434_mhz": 434.8933, "doppler_144_khz": -2.22, "obs_144_mhz": 144.8978}, - {"time_sec": 60, "velocity_kms": 5.24, "doppler_434_khz": -7.60, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.53, "obs_144_mhz": 144.8975}, - {"time_sec": 70, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, - {"time_sec": 80, "velocity_kms": 5.86, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, - {"time_sec": 90, "velocity_kms": 6.17, "doppler_434_khz": -8.95, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.98, "obs_144_mhz": 144.8970}, - {"time_sec": 100, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, + {"time_sec": -150, "velocity_kms": -6.86, "doppler_434_khz": 9.95, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.32, "obs_144_mhz": 144.9033}, + {"time_sec": -140, "velocity_kms": -6.78, "doppler_434_khz": 9.84, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.28, "obs_144_mhz": 144.9033}, + {"time_sec": -130, "velocity_kms": -6.70, "doppler_434_khz": 9.72, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, + {"time_sec": -120, "velocity_kms": -6.62, "doppler_434_khz": 9.60, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, + {"time_sec": -110, "velocity_kms": -6.47, "doppler_434_khz": 9.39, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.13, "obs_144_mhz": 144.9031}, + {"time_sec": -100, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, + {"time_sec": -90, "velocity_kms": -6.17, "doppler_434_khz": 8.95, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.98, "obs_144_mhz": 144.9030}, + {"time_sec": -80, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, + {"time_sec": -70, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, + {"time_sec": -60, "velocity_kms": -5.24, "doppler_434_khz": 7.60, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.53, "obs_144_mhz": 144.9025}, + {"time_sec": -50, "velocity_kms": -4.60, "doppler_434_khz": 6.67, "obs_434_mhz": 434.9067, "doppler_144_khz": 2.22, "obs_144_mhz": 144.9022}, + {"time_sec": -40, "velocity_kms": -3.96, "doppler_434_khz": 5.74, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.91, "obs_144_mhz": 144.9019}, + {"time_sec": -30, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, + {"time_sec": -20, "velocity_kms": -2.21, "doppler_434_khz": 3.21, "obs_434_mhz": 434.9032, "doppler_144_khz": 1.07, "obs_144_mhz": 144.9011}, + {"time_sec": -10, "velocity_kms": -1.11, "doppler_434_khz": 1.61, "obs_434_mhz": 434.9016, "doppler_144_khz": 0.53, "obs_144_mhz": 144.9005}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 1.11, "doppler_434_khz": -1.61, "obs_434_mhz": 434.8984, "doppler_144_khz": -0.53, "obs_144_mhz": 144.8995}, + {"time_sec": 20, "velocity_kms": 2.21, "doppler_434_khz": -3.21, "obs_434_mhz": 434.8968, "doppler_144_khz": -1.07, "obs_144_mhz": 144.8989}, + {"time_sec": 30, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, + {"time_sec": 40, "velocity_kms": 3.96, "doppler_434_khz": -5.74, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.91, "obs_144_mhz": 144.8981}, + {"time_sec": 50, "velocity_kms": 4.60, "doppler_434_khz": -6.67, "obs_434_mhz": 434.8933, "doppler_144_khz": -2.22, "obs_144_mhz": 144.8978}, + {"time_sec": 60, "velocity_kms": 5.24, "doppler_434_khz": -7.60, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.53, "obs_144_mhz": 144.8975}, + {"time_sec": 70, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, + {"time_sec": 80, "velocity_kms": 5.86, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, + {"time_sec": 90, "velocity_kms": 6.17, "doppler_434_khz": -8.95, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.98, "obs_144_mhz": 144.8970}, + {"time_sec": 100, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, {"time_sec": 110, "velocity_kms": 6.47, "doppler_434_khz": -9.39, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.13, "obs_144_mhz": 144.8969}, {"time_sec": 120, "velocity_kms": 6.62, "doppler_434_khz": -9.60, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, {"time_sec": 130, "velocity_kms": 6.70, "doppler_434_khz": -9.72, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, @@ -392,30 +401,30 @@ iss_doppler_passes = { {"time_sec": -80, "velocity_kms": -6.23, "doppler_434_khz": 9.04, "obs_434_mhz": 434.9090, "doppler_144_khz": 3.01, "obs_144_mhz": 144.9030}, {"time_sec": -70, "velocity_kms": -5.97, "doppler_434_khz": 8.66, "obs_434_mhz": 434.9087, "doppler_144_khz": 2.88, "obs_144_mhz": 144.9029}, {"time_sec": -60, "velocity_kms": -5.70, "doppler_434_khz": 8.27, "obs_434_mhz": 434.9083, "doppler_144_khz": 2.76, "obs_144_mhz": 144.9028}, - {"time_sec": -50, "velocity_kms": -5.10, "doppler_434_khz": 7.40, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.47, "obs_144_mhz": 144.9025}, + {"time_sec": -50, "velocity_kms": -5.10, "doppler_434_khz": 7.40, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.47, "obs_144_mhz": 144.9025}, {"time_sec": -40, "velocity_kms": -4.50, "doppler_434_khz": 6.53, "obs_434_mhz": 434.9065, "doppler_144_khz": 2.18, "obs_144_mhz": 144.9022}, {"time_sec": -30, "velocity_kms": -3.90, "doppler_434_khz": 5.66, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.89, "obs_144_mhz": 144.9019}, - {"time_sec": -20 ,"velocity_kms": -2.60, "doppler_434_khz": 3.77, "obs_434_mhz": 434.9038, "doppler_144_khz": 1.26, "obs_144_mhz": 144.9013}, - {"time_sec": -10 ,"velocity_kms": -1.30, "doppler_434_khz": 1.89, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.63, "obs_144_mhz": 144.9006}, - {"time_sec": 0 ,"velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10 ,"velocity_kms": 1.30, "doppler_434_khz": -1.89, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.63, "obs_144_mhz": 144.8994}, - {"time_sec": 20 ,"velocity_kms": 2.60, "doppler_434_khz": -3.77, "obs_434_mhz": 434.8962, "doppler_144_khz": -1.26, "obs_144_mhz": 144.8987}, - {"time_sec": 30 ,"velocity_kms": 3.90, "doppler_434_khz": -5.66, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.89, "obs_144_mhz": 144.8981}, - {"time_sec": 40 ,"velocity_kms": 4.50, "doppler_434_khz": -6.53, "obs_434_mhz": 434.8935, "doppler_144_khz": -2.18, "obs_144_mhz": 144.8978}, - {"time_sec": 50 ,"velocity_kms": 5.10, "doppler_434_khz": -7.40, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.47, "obs_144_mhz": 144.8975}, - {"time_sec": 60 ,"velocity_kms": 5.70, "doppler_434_khz": -8.27, "obs_434_mhz": 434.8917, "doppler_144_khz": -2.76, "obs_144_mhz": 144.8972}, - {"time_sec": 70 ,"velocity_kms": 5.97, "doppler_434_khz": -8.66, "obs_434_mhz": 434.8913, "doppler_144_khz": -2.88, "obs_144_mhz": 144.8971}, - {"time_sec": 80 ,"velocity_kms": 6.23, "doppler_434_khz": -9.04, "obs_434_mhz": 434.8910, "doppler_144_khz": -3.01, "obs_144_mhz": 144.8970}, - {"time_sec": 90 ,"velocity_kms": 6.50, "doppler_434_khz": -9.43, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.14, "obs_144_mhz": 144.8969}, - {"time_sec": 100 ,"velocity_kms": 6.63, "doppler_434_khz": -9.61, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, - {"time_sec": 110 ,"velocity_kms": 6.75, "doppler_434_khz": -9.80, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.26, "obs_144_mhz": 144.8967}, - {"time_sec": 120 ,"velocity_kms": 6.88, "doppler_434_khz": -9.98, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, - {"time_sec": 130 ,"velocity_kms": 6.94, "doppler_434_khz": -10.06, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.35, "obs_144_mhz": 144.8966}, - {"time_sec": 140 ,"velocity_kms": 6.99, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966}, - {"time_sec": 150 ,"velocity_kms": 7.05, "doppler_434_khz": -10.23, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.41, "obs_144_mhz": 144.8966}, - {"time_sec": 160 ,"velocity_kms": 7.08, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8917, "doppler_144_khz": -3.42, "obs_144_mhz": 144.8966}, - {"time_sec": 170 ,"velocity_kms": 7.12, "doppler_434_khz": -10.32, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.44, "obs_144_mhz": 144.8966}, - {"time_sec": 180 ,"velocity_kms": 7.15, "doppler_434_khz": -10.37, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.46, "obs_144_mhz": 144.8965} + {"time_sec": -20 ,"velocity_kms": -2.60, "doppler_434_khz": 3.77, "obs_434_mhz": 434.9038, "doppler_144_khz": 1.26, "obs_144_mhz": 144.9013}, + {"time_sec": -10 ,"velocity_kms": -1.30, "doppler_434_khz": 1.89, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.63, "obs_144_mhz": 144.9006}, + {"time_sec": 0 ,"velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10 ,"velocity_kms": 1.30, "doppler_434_khz": -1.89, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.63, "obs_144_mhz": 144.8994}, + {"time_sec": 20 ,"velocity_kms": 2.60, "doppler_434_khz": -3.77, "obs_434_mhz": 434.8962, "doppler_144_khz": -1.26, "obs_144_mhz": 144.8987}, + {"time_sec": 30 ,"velocity_kms": 3.90, "doppler_434_khz": -5.66, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.89, "obs_144_mhz": 144.8981}, + {"time_sec": 40 ,"velocity_kms": 4.50, "doppler_434_khz": -6.53, "obs_434_mhz": 434.8935, "doppler_144_khz": -2.18, "obs_144_mhz": 144.8978}, + {"time_sec": 50 ,"velocity_kms": 5.10, "doppler_434_khz": -7.40, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.47, "obs_144_mhz": 144.8975}, + {"time_sec": 60 ,"velocity_kms": 5.70, "doppler_434_khz": -8.27, "obs_434_mhz": 434.8917, "doppler_144_khz": -2.76, "obs_144_mhz": 144.8972}, + {"time_sec": 70 ,"velocity_kms": 5.97, "doppler_434_khz": -8.66, "obs_434_mhz": 434.8913, "doppler_144_khz": -2.88, "obs_144_mhz": 144.8971}, + {"time_sec": 80 ,"velocity_kms": 6.23, "doppler_434_khz": -9.04, "obs_434_mhz": 434.8910, "doppler_144_khz": -3.01, "obs_144_mhz": 144.8970}, + {"time_sec": 90 ,"velocity_kms": 6.50, "doppler_434_khz": -9.43, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.14, "obs_144_mhz": 144.8969}, + {"time_sec": 100 ,"velocity_kms": 6.63, "doppler_434_khz": -9.61, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, + {"time_sec": 110 ,"velocity_kms": 6.75, "doppler_434_khz": -9.80, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.26, "obs_144_mhz": 144.8967}, + {"time_sec": 120 ,"velocity_kms": 6.88, "doppler_434_khz": -9.98, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, + {"time_sec": 130 ,"velocity_kms": 6.94, "doppler_434_khz": -10.06, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.35, "obs_144_mhz": 144.8966}, + {"time_sec": 140 ,"velocity_kms": 6.99, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966}, + {"time_sec": 150 ,"velocity_kms": 7.05, "doppler_434_khz": -10.23, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.41, "obs_144_mhz": 144.8966}, + {"time_sec": 160 ,"velocity_kms": 7.08, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8917, "doppler_144_khz": -3.42, "obs_144_mhz": 144.8966}, + {"time_sec": 170 ,"velocity_kms": 7.12, "doppler_434_khz": -10.32, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.44, "obs_144_mhz": 144.8966}, + {"time_sec": 180 ,"velocity_kms": 7.15, "doppler_434_khz": -10.37, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.46, "obs_144_mhz": 144.8965} ] } From 7ed05076d8895390bfa8206f73bb39dbcea620aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:48:09 -0400 Subject: [PATCH 1053/1744] Update transmit.py print relative time --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index bc589740..960b249b 100644 --- a/transmit.py +++ b/transmit.py @@ -1190,6 +1190,7 @@ if __name__ == "__main__": relative_time = (time.perf_counter() - start_time) % 370 index = int(relative_time/10) + print(f"relative time: {relative_time} seconds after AOS is index: {index}") table_row = doppler_table[index] rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 @@ -1198,7 +1199,7 @@ if __name__ == "__main__": tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz print(f"Tx Doppler shift: {tx_doppler_freq_hz}") txr = "{:.3f}".format(tx_doppler_freq_hz/1000) - print(txr) +# print(txr) rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz}") rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) From e1fe3085c8ead02533073436a8bc52cd13bc1af3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:54:02 -0400 Subject: [PATCH 1054/1744] Update transmit.py add formatting to prints --- transmit.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/transmit.py b/transmit.py index 960b249b..54c6b2bb 100644 --- a/transmit.py +++ b/transmit.py @@ -269,7 +269,7 @@ def stop_repeater(): print("Finished resetting audio") # print("Ready to detect carrier") -iss_doppler_passes = { +doppler_passes = { 20: [ {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, @@ -1161,26 +1161,16 @@ if __name__ == "__main__": index = int(10/10) try: - # Navigate the dictionary structure -# pass_profile = iss_doppler_passes[TARGET_PASS] -# data_entry = pass_profile[index] # relative_time_index] - doppler_table = iss_doppler_passes[TARGET_PASS] third_row = iss_doppler_passes[TARGET_PASS][index] - -# print("Full Third:") -# print(third_row) -# print("\n" + "="*40 + "\n") - time_index = third_row["time_sec"] doppler_shift = third_row["doppler_434_khz"] uhf_freq = third_row["obs_434_mhz"] print(f"Pass Elevation: {TARGET_PASS}°") -# print(f"Time Index: {TIME_FROM_START} seconds from start (Relative: {relative_time_index}s)") print(f"Time Index: {index}") - print(f"Extracted Doppler Shift (435.0 MHz): {doppler_shift} kHz") - print(f"UHF frequency (435.0 MHz): {uhf_freq} MHz") + print(f"Extracted Doppler Shift (435.0 MHz): {doppler_shift:.2f} kHz") + print(f"UHF frequency (435.0 MHz): {uhf_freq:.4f} MHz") except KeyError: print("Error: The requested pass elevation or time index does not exist in the database.") @@ -1190,18 +1180,18 @@ if __name__ == "__main__": relative_time = (time.perf_counter() - start_time) % 370 index = int(relative_time/10) - print(f"relative time: {relative_time} seconds after AOS is index: {index}") + print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") table_row = doppler_table[index] rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 # tx_doppler_shift_hz = ((time.perf_counter() - start_time) * 100) % 20000 tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz}") + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") txr = "{:.3f}".format(tx_doppler_freq_hz/1000) # print(txr) rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz}") + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) # print(rx) program_fm(rx,tx,rxpl_value,sq,txpl_value) From 9de04dac3cbb37134dc678ca9bb86c029d2b45eb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 16:55:02 -0400 Subject: [PATCH 1055/1744] Update transmit.py add back iss_ --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 54c6b2bb..4946f10e 100644 --- a/transmit.py +++ b/transmit.py @@ -269,7 +269,7 @@ def stop_repeater(): print("Finished resetting audio") # print("Ready to detect carrier") -doppler_passes = { +iss_doppler_passes = { 20: [ {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, From 460801dbe967220faedb7270a978726329866c77 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 17:10:29 -0400 Subject: [PATCH 1056/1744] Update transmit.py add 5 degree pass --- transmit.py | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 4946f10e..f4d849c9 100644 --- a/transmit.py +++ b/transmit.py @@ -270,6 +270,45 @@ def stop_repeater(): # print("Ready to detect carrier") iss_doppler_passes = { + 5: [ + {"time_sec": -180, "velocity_kms": -4.00, "doppler_434_khz": 5.79, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, + {"time_sec": -170, "velocity_kms": -3.89, "doppler_434_khz": 5.64, "obs_434_mhz": 434.9056, "doppler_144_khz": 1.88, "obs_144_mhz": 144.9019}, + {"time_sec": -160, "velocity_kms": -3.78, "doppler_434_khz": 5.48, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.83, "obs_144_mhz": 144.9018}, + {"time_sec": -150, "velocity_kms": -3.67, "doppler_434_khz": 5.32, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.77, "obs_144_mhz": 144.9018}, + {"time_sec": -140, "velocity_kms": -3.54, "doppler_434_khz": 5.14, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.71, "obs_144_mhz": 144.9017}, + {"time_sec": -130, "velocity_kms": -3.42, "doppler_434_khz": 4.96, "obs_434_mhz": 434.9050, "doppler_144_khz": 1.65, "obs_144_mhz": 144.9017}, + {"time_sec": -120, "velocity_kms": -3.28, "doppler_434_khz": 4.76, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.59, "obs_144_mhz": 144.9016}, + {"time_sec": -110, "velocity_kms": -3.14, "doppler_434_khz": 4.55, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.52, "obs_144_mhz": 144.9015}, + {"time_sec": -100, "velocity_kms": -2.99, "doppler_434_khz": 4.33, "obs_434_mhz": 434.9043, "doppler_144_khz": 1.44, "obs_144_mhz": 144.9014}, + {"time_sec": -90, "velocity_kms": -2.83, "doppler_434_khz": 4.10, "obs_434_mhz": 434.9041, "doppler_144_khz": 1.37, "obs_144_mhz": 144.9014}, + {"time_sec": -80, "velocity_kms": -2.66, "doppler_434_khz": 3.86, "obs_434_mhz": 434.9039, "doppler_144_khz": 1.29, "obs_144_mhz": 144.9013}, + {"time_sec": -70, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, + {"time_sec": -60, "velocity_kms": -2.29, "doppler_434_khz": 3.32, "obs_434_mhz": 434.9033, "doppler_144_khz": 1.11, "obs_144_mhz": 144.9011}, + {"time_sec": -50, "velocity_kms": -2.09, "doppler_434_khz": 3.03, "obs_434_mhz": 434.9030, "doppler_144_khz": 1.01, "obs_144_mhz": 144.9010}, + {"time_sec": -40, "velocity_kms": -1.87, "doppler_434_khz": 2.71, "obs_434_mhz": 434.9027, "doppler_144_khz": 0.90, "obs_144_mhz": 144.9009}, + {"time_sec": -30, "velocity_kms": -1.63, "doppler_434_khz": 2.37, "obs_434_mhz": 434.9024, "doppler_144_khz": 0.79, "obs_144_mhz": 144.9008}, + {"time_sec": -20, "velocity_kms": -1.33, "doppler_434_khz": 1.93, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, + {"time_sec": -10, "velocity_kms": -0.84, "doppler_434_khz": 1.22, "obs_434_mhz": 434.9012, "doppler_144_khz": 0.41, "obs_144_mhz": 144.9004}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 0.84, "doppler_434_khz": -1.22, "obs_434_mhz": 434.8988, "doppler_144_khz": -0.41, "obs_144_mhz": 144.8996}, + {"time_sec": 20, "velocity_kms": 1.33, "doppler_434_khz": -1.93, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, + {"time_sec": 30, "velocity_kms": 1.63, "doppler_434_khz": -2.37, "obs_434_mhz": 434.8976, "doppler_144_khz": -0.79, "obs_144_mhz": 144.8992}, + {"time_sec": 40, "velocity_kms": 1.87, "doppler_434_khz": -2.71, "obs_434_mhz": 434.8973, "doppler_144_khz": -0.90, "obs_144_mhz": 144.8991}, + {"time_sec": 50, "velocity_kms": 2.09, "doppler_434_khz": -3.03, "obs_434_mhz": 434.8970, "doppler_144_khz": -1.01, "obs_144_mhz": 144.8990}, + {"time_sec": 60, "velocity_kms": 2.29, "doppler_434_khz": -3.32, "obs_434_mhz": 434.8967, "doppler_144_khz": -1.11, "obs_144_mhz": 144.8989}, + {"time_sec": 70, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, + {"time_sec": 80, "velocity_kms": 2.66, "doppler_434_khz": -3.86, "obs_434_mhz": 434.8961, "doppler_144_khz": -1.29, "obs_144_mhz": 144.8987}, + {"time_sec": 90, "velocity_kms": 2.83, "doppler_434_khz": -4.10, "obs_434_mhz": 434.8959, "doppler_144_khz": -1.37, "obs_144_mhz": 144.8986}, + {"time_sec": 100, "velocity_kms": 2.99, "doppler_434_khz": -4.33, "obs_434_mhz": 434.8957, "doppler_144_khz": -1.44, "obs_144_mhz": 144.8986}, + {"time_sec": 110, "velocity_kms": 3.14, "doppler_434_khz": -4.55, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.52, "obs_144_mhz": 144.8985}, + {"time_sec": 120, "velocity_kms": 3.28, "doppler_434_khz": -4.76, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.59, "obs_144_mhz": 144.8984}, + {"time_sec": 130, "velocity_kms": 3.42, "doppler_434_khz": -4.96, "obs_434_mhz": 434.8950, "doppler_144_khz": -1.65, "obs_144_mhz": 144.8983}, + {"time_sec": 140, "velocity_kms": 3.54, "doppler_434_khz": -5.14, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.71, "obs_144_mhz": 144.8983}, + {"time_sec": 150, "velocity_kms": 3.67, "doppler_434_khz": -5.32, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.77, "obs_144_mhz": 144.8982}, + {"time_sec": 160, "velocity_kms": 3.78, "doppler_434_khz": -5.48, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.83, "obs_144_mhz": 144.8982}, + {"time_sec": 170, "velocity_kms": 3.89, "doppler_434_khz": -5.64, "obs_434_mhz": 434.8944, "doppler_144_khz": -1.88, "obs_144_mhz": 144.8981}, + {"time_sec": 180, "velocity_kms": 4.00, "doppler_434_khz": -5.79, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981} + ], 20: [ {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, @@ -425,7 +464,46 @@ iss_doppler_passes = { {"time_sec": 160 ,"velocity_kms": 7.08, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8917, "doppler_144_khz": -3.42, "obs_144_mhz": 144.8966}, {"time_sec": 170 ,"velocity_kms": 7.12, "doppler_434_khz": -10.32, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.44, "obs_144_mhz": 144.8966}, {"time_sec": 180 ,"velocity_kms": 7.15, "doppler_434_khz": -10.37, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.46, "obs_144_mhz": 144.8965} - ] + ], + 89: [ + {"time_sec": -180, "velocity_kms": -7.17, "doppler_434_khz": 10.40, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.47, "obs_144_mhz": 144.9035}, + {"time_sec": -170, "velocity_kms": -7.13, "doppler_434_khz": 10.35, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.45, "obs_144_mhz": 144.9034}, + {"time_sec": -160, "velocity_kms": -7.09, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.43, "obs_144_mhz": 144.9034}, + {"time_sec": -150, "velocity_kms": -7.04, "doppler_434_khz": 10.21, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.40, "obs_144_mhz": 144.9034}, + {"time_sec": -140, "velocity_kms": -6.97, "doppler_434_khz": 10.12, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.37, "obs_144_mhz": 144.9034}, + {"time_sec": -130, "velocity_kms": -6.90, "doppler_434_khz": 10.01, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, + {"time_sec": -120, "velocity_kms": -6.81, "doppler_434_khz": 9.87, "obs_434_mhz": 434.9099, "doppler_144_khz": 3.29, "obs_144_mhz": 144.9033}, + {"time_sec": -110, "velocity_kms": -6.69, "doppler_434_khz": 9.71, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, + {"time_sec": -100, "velocity_kms": -6.55, "doppler_434_khz": 9.51, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.17, "obs_144_mhz": 144.9032}, + {"time_sec": -90, "velocity_kms": -6.38, "doppler_434_khz": 9.25, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.08, "obs_144_mhz": 144.9031}, + {"time_sec": -80, "velocity_kms": -6.15, "doppler_434_khz": 8.93, "obs_434_mhz": 434.9089, "doppler_144_khz": 2.97, "obs_144_mhz": 144.9030}, + {"time_sec": -70, "velocity_kms": -5.87, "doppler_434_khz": 8.51, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.84, "obs_144_mhz": 144.9028}, + {"time_sec": -60, "velocity_kms": -5.49, "doppler_434_khz": 7.97, "obs_434_mhz": 434.9080, "doppler_144_khz": 2.66, "obs_144_mhz": 144.9027}, + {"time_sec": -50, "velocity_kms": -5.01, "doppler_434_khz": 7.26, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.42, "obs_144_mhz": 144.9024}, + {"time_sec": -40, "velocity_kms": -4.37, "doppler_434_khz": 6.34, "obs_434_mhz": 434.9063, "doppler_144_khz": 2.11, "obs_144_mhz": 144.9021}, + {"time_sec": -30, "velocity_kms": -3.55, "doppler_434_khz": 5.15, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.72, "obs_144_mhz": 144.9017}, + {"time_sec": -20, "velocity_kms": -2.53, "doppler_434_khz": 3.67, "obs_434_mhz": 434.9037, "doppler_144_khz": 1.22, "obs_144_mhz": 144.9012}, + {"time_sec": -10, "velocity_kms": -1.32, "doppler_434_khz": 1.92, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 1.32, "doppler_434_khz": -1.92, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, + {"time_sec": 20, "velocity_kms": 2.53, "doppler_434_khz": -3.67, "obs_434_mhz": 434.8963, "doppler_144_khz": -1.22, "obs_144_mhz": 144.8988}, + {"time_sec": 30, "velocity_kms": 3.55, "doppler_434_khz": -5.15, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.72, "obs_144_mhz": 144.8983}, + {"time_sec": 40, "velocity_kms": 4.37, "doppler_434_khz": -6.34, "obs_434_mhz": 434.8937, "doppler_144_khz": -2.11, "obs_144_mhz": 144.8979}, + {"time_sec": 50, "velocity_kms": 5.01, "doppler_434_khz": -7.26, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.42, "obs_144_mhz": 144.8976}, + {"time_sec": 60, "velocity_kms": 5.49, "doppler_434_khz": -7.97, "obs_434_mhz": 434.8920, "doppler_144_khz": -2.66, "obs_144_mhz": 144.8973}, + {"time_sec": 70, "velocity_kms": 5.87, "doppler_434_khz": -8.51, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.84, "obs_144_mhz": 144.8972}, + {"time_sec": 80, "velocity_kms": 6.15, "doppler_434_khz": -8.93, "obs_434_mhz": 434.8911, "doppler_144_khz": -2.97, "obs_144_mhz": 144.8970}, + {"time_sec": 90, "velocity_kms": 6.38, "doppler_434_khz": -9.25, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.08, "obs_144_mhz": 144.8969}, + {"time_sec": 100, "velocity_kms": 6.55, "doppler_434_khz": -9.51, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.17, "obs_144_mhz": 144.8968}, + {"time_sec": 110, "velocity_kms": 6.69, "doppler_434_khz": -9.71, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, + {"time_sec": 120, "velocity_kms": 6.81, "doppler_434_khz": -9.87, "obs_434_mhz": 434.8901, "doppler_144_khz": -3.29, "obs_144_mhz": 144.8967}, + {"time_sec": 130, "velocity_kms": 6.90, "doppler_434_khz": -10.01, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, + {"time_sec": 140, "velocity_kms": 6.97, "doppler_434_khz": -10.12, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.37, "obs_144_mhz": 144.8966}, + {"time_sec": 150, "velocity_kms": 7.04, "doppler_434_khz": -10.21, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.40, "obs_144_mhz": 144.8966}, + {"time_sec": 160, "velocity_kms": 7.09, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.43, "obs_144_mhz": 144.8966}, + {"time_sec": 170, "velocity_kms": 7.13, "doppler_434_khz": -10.35, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.45, "obs_144_mhz": 144.8966}, + {"time_sec": 180, "velocity_kms": 7.17, "doppler_434_khz": -10.40, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.47, "obs_144_mhz": 144.8965} + ] } print("CubeSatSim v2.2 transmit.py starting...") From 59de158f0c9385086e1b6516043c8adc48ecdbfd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 23:26:57 -0400 Subject: [PATCH 1057/1744] Update transmit.py add doppler mode to a,s,m modes --- transmit.py | 128 ++++++++++++++++++++++++++-------------------------- 1 file changed, 64 insertions(+), 64 deletions(-) diff --git a/transmit.py b/transmit.py index f4d849c9..c4a494a7 100644 --- a/transmit.py +++ b/transmit.py @@ -247,10 +247,11 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): print("Restarting gpsd.socket") system("sudo systemctl restart gpsd.socket") -def start_repeater(txr): +def start_repeater(tx_doppler_freq_hz): global txLed print("Starting repeater") output(txLed, 1) + txr = "{:.3f}".format(tx_doppler_freq_hz/1000) system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") @@ -506,6 +507,27 @@ iss_doppler_passes = { ] } +def update_doppler(): + + global start_time + global tx_doppler_freq_hz + global rx_doppler_freq_hz + global rxpl_value + global txpl_value + global sq + relative_time = (time.perf_counter() - start_time) % 370 + index = int(relative_time/10) + print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") + table_row = doppler_table[index] + rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + program_fm(rx,tx,rxpl_value,sq,txpl_value) + print("CubeSatSim v2.2 transmit.py starting...") pd = 21 @@ -652,6 +674,7 @@ if __name__ == "__main__": sim_mode = False sim_config = False hab_mode = False + doppler_mode == True try: file = open("/home/pi/CubeSatSim/sim.cfg") @@ -780,6 +803,19 @@ if __name__ == "__main__": # if (mode != 'e'): program_fm(rx,tx,rxpl_value,sq,txpl_value) + + if (doppler_mode == True): + tx_doppler_start_hz = txrf * 1e6 + tx_doppler_shift_hz = 0 + print(f"Tx center frequency: {tx_doppler_start_hz}") + rx_doppler_start_hz = rxf * 1e6 + rx_doppler_shift_hz = 0 + print(f"Rx center frequency: {rx_doppler_start_hz}") + + TARGET_PASS = 85 # Maximum elevation profile + + doppler_table = iss_doppler_passes[TARGET_PASS] + print(f"Pass Max Elevation: {TARGET_PASS}°") sim_failure_check() if (hab_mode == True) and (mode == 'a'): @@ -884,11 +920,10 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): output(txLed, 1) -# output(pd, 1) -# output (ptt, 0) -# sleep(.1) -# -# battery_saver_check() + if (doppler_mode == True): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) if (txc): sim_failure_check() # output(pd, 1) @@ -940,7 +975,10 @@ if __name__ == "__main__": ## chan = chan + 1 if (command_tx == True): output(txLed, 1) - + if (doppler_mode == True): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) if (txc): sim_failure_check() # output (pd, 1) @@ -1028,10 +1066,13 @@ if __name__ == "__main__": system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/camera_out.jpg") system("sudo rm /home/pi/CubeSatSim/camera_out.jpg > /dev/null 2>&1") -# command_control_check() - if (command_tx == True): print ("Sending SSTV image") + if (doppler_mode == True): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) + output(txLed, 1) # battery_saver_check() @@ -1099,11 +1140,13 @@ if __name__ == "__main__": system("/home/pi/PiSSTVpp/pisstvpp -r 48000 -p s2 /home/pi/CubeSatSim/sstv_image_2_320_x_256.jpg") while 1: - -# command_control_check() - if (command_tx == True): print ("Sending SSTV image") + if (doppler_mode == True): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) + output(txLed, 1) # battery_saver_check() @@ -1131,11 +1174,11 @@ if __name__ == "__main__": system("(while true; do (sleep 10 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") while 1: if (command_tx == True): -# command_control_check() - + if (doppler_mode == True): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) output(txLed, 1) - -# battery_saver_check() if (txc): sim_failure_check() @@ -1223,58 +1266,15 @@ if __name__ == "__main__": print("Ready to detect carrier") start_time = time.perf_counter() - tx_doppler_start_hz = txrf * 1e6 - tx_doppler_shift_hz = 0 - print(f"Tx center frequency: {tx_doppler_start_hz}") - rx_doppler_start_hz = rxf * 1e6 - rx_doppler_shift_hz = 0 - print(f"Rx center frequency: {rx_doppler_start_hz}") - - TARGET_PASS = 85 # Maximum elevation profile -# PASS_START_TIME = -180 # The absolute time index where the pass begins -# TIME_FROM_START = 30 # 30 seconds into the pass - - # Map the "time from start" to the "relative time index" used in the table -# relative_time_index = PASS_START_TIME + TIME_FROM_START - index = int(10/10) - - try: - doppler_table = iss_doppler_passes[TARGET_PASS] - third_row = iss_doppler_passes[TARGET_PASS][index] - time_index = third_row["time_sec"] - doppler_shift = third_row["doppler_434_khz"] - uhf_freq = third_row["obs_434_mhz"] - - print(f"Pass Elevation: {TARGET_PASS}°") - print(f"Time Index: {index}") - print(f"Extracted Doppler Shift (435.0 MHz): {doppler_shift:.2f} kHz") - print(f"UHF frequency (435.0 MHz): {uhf_freq:.4f} MHz") - - except KeyError: - print("Error: The requested pass elevation or time index does not exist in the database.") while True: if (input(squelch) == False) and (command_tx == True): - - relative_time = (time.perf_counter() - start_time) % 370 - index = int(relative_time/10) - print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") - table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 - -# tx_doppler_shift_hz = ((time.perf_counter() - start_time) * 100) % 20000 - tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - txr = "{:.3f}".format(tx_doppler_freq_hz/1000) -# print(txr) - rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) -# print(rx) - program_fm(rx,tx,rxpl_value,sq,txpl_value) print("Carrier detected") - start_repeater(txr) + if (doppler_mode == True): + update_doppler() + start_repeater(tx_doppler_freq_hz) + else: + start_repeater(txr) while (input(squelch) == False): sleep(1) print("No carrier detected") From 07316a5841b25b987d30a359602b6b79b162e7d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 23:28:43 -0400 Subject: [PATCH 1058/1744] Update transmit.py stray space --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c4a494a7..dfa95695 100644 --- a/transmit.py +++ b/transmit.py @@ -977,7 +977,7 @@ if __name__ == "__main__": output(txLed, 1) if (doppler_mode == True): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1000 tx = "{:.4f}".format(txf) if (txc): sim_failure_check() From c9055440acf9b925c09fdcab3c6b277433ff4d7a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 23:30:35 -0400 Subject: [PATCH 1059/1744] Update transmit.py more extra spaces --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index dfa95695..46261851 100644 --- a/transmit.py +++ b/transmit.py @@ -1144,7 +1144,7 @@ if __name__ == "__main__": print ("Sending SSTV image") if (doppler_mode == True): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1000 tx = "{:.4f}".format(txf) output(txLed, 1) @@ -1176,7 +1176,7 @@ if __name__ == "__main__": if (command_tx == True): if (doppler_mode == True): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1000 tx = "{:.4f}".format(txf) output(txLed, 1) From eddebacb848a17eba884c755e787d828581b446a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 23:31:37 -0400 Subject: [PATCH 1060/1744] Update transmit.py fix doppler_mode assignment --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 46261851..e8be0128 100644 --- a/transmit.py +++ b/transmit.py @@ -674,7 +674,7 @@ if __name__ == "__main__": sim_mode = False sim_config = False hab_mode = False - doppler_mode == True + doppler_mode = True try: file = open("/home/pi/CubeSatSim/sim.cfg") From 400b7619429d922ff850c651ec71c885075d7443 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 23:38:45 -0400 Subject: [PATCH 1061/1744] Update transmit.py fix txrf --- transmit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index e8be0128..69f4a361 100644 --- a/transmit.py +++ b/transmit.py @@ -805,7 +805,10 @@ if __name__ == "__main__": program_fm(rx,tx,rxpl_value,sq,txpl_value) if (doppler_mode == True): - tx_doppler_start_hz = txrf * 1e6 + if (mode == 'e'): + tx_doppler_start_hz = txrf * 1e6 + else: + tx_doppler_start_hz = txf * 1e6 tx_doppler_shift_hz = 0 print(f"Tx center frequency: {tx_doppler_start_hz}") rx_doppler_start_hz = rxf * 1e6 From 4c4a2f395ac9f03c8c5d7ac53cdde2d4dcf2abc9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 18 Jun 2026 23:45:35 -0400 Subject: [PATCH 1062/1744] Update transmit.py doppler mode off --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 69f4a361..df72e3a1 100644 --- a/transmit.py +++ b/transmit.py @@ -674,7 +674,7 @@ if __name__ == "__main__": sim_mode = False sim_config = False hab_mode = False - doppler_mode = True + doppler_mode = False # True try: file = open("/home/pi/CubeSatSim/sim.cfg") From 1046f39d51c80faf04701ed3e924b746d31a54ce Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:10:55 -0400 Subject: [PATCH 1063/1744] Update transmit.py cleanup --- transmit.py | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/transmit.py b/transmit.py index df72e3a1..52e21bea 100644 --- a/transmit.py +++ b/transmit.py @@ -709,27 +709,25 @@ if __name__ == "__main__": else: print("Transmit frequency: ",tx) if len(config) > 7: - rxf = float(config[7]) -# print(rxf) -# print( "{:.4f}".format(rxf)) - rx = "{:.4f}".format(rxf) - print(rx) + rxf = float(config[7]) + rx = "{:.4f}".format(rxf) + print(rx) if len(config) > 8: if config[8] == 'y' or config[8] == 'yes': hab_mode = True print("Balloon (HAB) mode is configured.") if len(config) > 9: - rxpl = float(config[9]) - # print(rxpl) - # print( "{:.0f}".format(rxpl)) - rxpl_value = "{:.0f}".format(rxpl) - print(rxpl_value) + rxpl = float(config[9]) +# print(rxpl) +# print( "{:.0f}".format(rxpl)) + rxpl_value = "{:.0f}".format(rxpl) + print(rxpl_value) if len(config) > 10: - txpl = float(config[10]) + txpl = float(config[10]) # print(txpl) # print( "{:.0f}".format(txpl)) - txpl_value = "{:.0f}".format(txpl) - print(txpl_value) + txpl_value = "{:.0f}".format(txpl) + print(txpl_value) print(config) print # print(callsign) From 0724a0c84e63e80962714e39fcc329eb29632727 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:19:40 -0400 Subject: [PATCH 1064/1744] Update transmit.py fix indent --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 52e21bea..cdd5a5be 100644 --- a/transmit.py +++ b/transmit.py @@ -711,7 +711,7 @@ if __name__ == "__main__": if len(config) > 7: rxf = float(config[7]) rx = "{:.4f}".format(rxf) - print(rx) + print(rx) if len(config) > 8: if config[8] == 'y' or config[8] == 'yes': hab_mode = True From 3f64db3ae7938a315635acc934f526aa003c216d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:20:43 -0400 Subject: [PATCH 1065/1744] Update transmit.py doppler_mode true --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index cdd5a5be..451d302a 100644 --- a/transmit.py +++ b/transmit.py @@ -674,7 +674,7 @@ if __name__ == "__main__": sim_mode = False sim_config = False hab_mode = False - doppler_mode = False # True + doppler_mode = True try: file = open("/home/pi/CubeSatSim/sim.cfg") From 54ec56f6fc35b031fe7ed65cf472458b85e8541d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:25:04 -0400 Subject: [PATCH 1066/1744] Update transmit.py print doppler --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index 451d302a..7becf5e2 100644 --- a/transmit.py +++ b/transmit.py @@ -515,6 +515,7 @@ def update_doppler(): global rxpl_value global txpl_value global sq + print("update_doppler") relative_time = (time.perf_counter() - start_time) % 370 index = int(relative_time/10) print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") From 49deca66615453a1c8a894acd15039710131fe10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:27:47 -0400 Subject: [PATCH 1067/1744] Update transmit.py don't program fm in update --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 7becf5e2..b482b5ed 100644 --- a/transmit.py +++ b/transmit.py @@ -527,7 +527,7 @@ def update_doppler(): rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) - program_fm(rx,tx,rxpl_value,sq,txpl_value) +# program_fm(rx,tx,rxpl_value,sq,txpl_value) print("CubeSatSim v2.2 transmit.py starting...") From ddd6c01258c5560aba09ad1a493481e0585c0f1b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:34:14 -0400 Subject: [PATCH 1068/1744] Update transmit.py add prints --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index b482b5ed..c18216ad 100644 --- a/transmit.py +++ b/transmit.py @@ -986,6 +986,7 @@ if __name__ == "__main__": # output (pd, 1) sleep(0.3) output (ptt, 0) + print("aplay") system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") sleep(0.1) output (ptt, 1) @@ -1003,6 +1004,7 @@ if __name__ == "__main__": sleep(10) except: # command_control_check() + print("cw not ready") sleep(1) elif (mode == 's'): print("SSTV") From be9d96d5ebfbbf6acc14a8bd576836f34ed7f6f8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:37:55 -0400 Subject: [PATCH 1069/1744] Update transmit.py add try to update_doppler --- transmit.py | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/transmit.py b/transmit.py index c18216ad..b6097b31 100644 --- a/transmit.py +++ b/transmit.py @@ -509,25 +509,28 @@ iss_doppler_passes = { def update_doppler(): - global start_time - global tx_doppler_freq_hz - global rx_doppler_freq_hz - global rxpl_value - global txpl_value - global sq - print("update_doppler") - relative_time = (time.perf_counter() - start_time) % 370 - index = int(relative_time/10) - print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") - table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 - tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) -# program_fm(rx,tx,rxpl_value,sq,txpl_value) + try: + global start_time + global tx_doppler_freq_hz + global rx_doppler_freq_hz + global rxpl_value + global txpl_value + global sq + print("update_doppler") + relative_time = (time.perf_counter() - start_time) % 370 + index = int(relative_time/10) + print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") + table_row = doppler_table[index] + rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + program_fm(rx,tx,rxpl_value,sq,txpl_value) + except: + print("update_doppler failed") print("CubeSatSim v2.2 transmit.py starting...") From 3a9881f310a4d676c4c7471fc5f883356ec8f7ee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:47:55 -0400 Subject: [PATCH 1070/1744] Update transmit.py set start_time if not set --- transmit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index b6097b31..33e468b7 100644 --- a/transmit.py +++ b/transmit.py @@ -516,8 +516,13 @@ def update_doppler(): global rxpl_value global txpl_value global sq + global doppler_table print("update_doppler") - relative_time = (time.perf_counter() - start_time) % 370 + try: + relative_time = (time.perf_counter() - start_time) % 370 + except: + start_time = time.perf_counter() + relative_time = (time.perf_counter() - start_time) % 370 index = int(relative_time/10) print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") table_row = doppler_table[index] From fe1d16187906cc1a681e11a0030dee239ee7e375 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:52:37 -0400 Subject: [PATCH 1071/1744] Update transmit.py use uhf doppler unless mode e --- transmit.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 33e468b7..1240e772 100644 --- a/transmit.py +++ b/transmit.py @@ -517,6 +517,7 @@ def update_doppler(): global txpl_value global sq global doppler_table + global mode print("update_doppler") try: relative_time = (time.perf_counter() - start_time) % 370 @@ -527,7 +528,10 @@ def update_doppler(): print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") table_row = doppler_table[index] rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + if (mode == 'e'): + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + else: + tx_doppler_shift_hz = rx_doppler_shift_hz tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz @@ -994,7 +998,6 @@ if __name__ == "__main__": # output (pd, 1) sleep(0.3) output (ptt, 0) - print("aplay") system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") sleep(0.1) output (ptt, 1) @@ -1012,7 +1015,7 @@ if __name__ == "__main__": sleep(10) except: # command_control_check() - print("cw not ready") +# print("cw not ready") sleep(1) elif (mode == 's'): print("SSTV") From d2c4dcd6eece0f75cf797212e105a863cdf9bf15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:55:57 -0400 Subject: [PATCH 1072/1744] Update transmit.py change tx in update_doppler --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 1240e772..81270ce3 100644 --- a/transmit.py +++ b/transmit.py @@ -537,6 +537,8 @@ def update_doppler(): rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + if (mode == 'e'): + tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) program_fm(rx,tx,rxpl_value,sq,txpl_value) except: print("update_doppler failed") From 35395941d4369ed5f3b256a14818c3b251fe299a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 08:58:25 -0400 Subject: [PATCH 1073/1744] Update transmit.py print tx --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index 81270ce3..07323e0e 100644 --- a/transmit.py +++ b/transmit.py @@ -539,6 +539,7 @@ def update_doppler(): rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) if (mode == 'e'): tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) + print(tx) program_fm(rx,tx,rxpl_value,sq,txpl_value) except: print("update_doppler failed") From 6151dcb0c5c886eeba5f1455808cac6b249b4fdf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 09:21:39 -0400 Subject: [PATCH 1074/1744] Update transmit.py add try in program_fm --- transmit.py | 53 ++++++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/transmit.py b/transmit.py index 07323e0e..32bb851c 100644 --- a/transmit.py +++ b/transmit.py @@ -219,33 +219,36 @@ def camera_photo(): def program_fm(rx, tx, rxpl_value, sq, txpl_value): - global gpsd_status - global pd - global ptt - if (gpsd_status == "active"): - print("Stopping gpsd.socket") - system("sudo systemctl stop gpsd.socket") - print("Programming FM module!\n"); - output(pd, 1) - output (ptt, 1) try: - ser = serial.Serial("/dev/ttyAMA0", 9600) - print(ser.portstr) - # uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" - uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" - print(uhf_string) - for i in range(6): - # ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") - ser.write(uhf_string.encode()) - sleep(0.1) - ser.close() - ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data + global gpsd_status + global pd + global ptt + if (gpsd_status == "active"): + print("Stopping gpsd.socket") + system("sudo systemctl stop gpsd.socket") + print("Programming FM module!\n"); + output(pd, 1) + output (ptt, 1) + try: + ser = serial.Serial("/dev/ttyAMA0", 9600) + print(ser.portstr) + # uhf_string = "AT+DMOSETGROUP=0," + rx +"," + tx + ",0,3,0,0\r\n" + uhf_string = "AT+DMOSETGROUP=0," + rx + "," + tx + "," + rxpl_value + "," + sq + "," + txpl_value + ",0\r\n" + print(uhf_string) + for i in range(6): + # ser.write(b"AT+DMOSETGROUP=0,435.0000,434.9000,0,3,0,0\r\n") + ser.write(uhf_string.encode()) + sleep(0.1) + ser.close() + ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data + except: + print("Error in serial write") + # output(pd, 0) # Don't turn off receiver + if (gpsd_status == "active"): + print("Restarting gpsd.socket") + system("sudo systemctl restart gpsd.socket") except: - print("Error in serial write") -# output(pd, 0) # Don't turn off receiver - if (gpsd_status == "active"): - print("Restarting gpsd.socket") - system("sudo systemctl restart gpsd.socket") + print("program_fm failed") def start_repeater(tx_doppler_freq_hz): global txLed From 4ec2f0bbea3fda4e4c206fcb1d57da1f2bda8011 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 09:25:31 -0400 Subject: [PATCH 1075/1744] Update transmit.py add prints to update_doppler --- transmit.py | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 32bb851c..dd9b4633 100644 --- a/transmit.py +++ b/transmit.py @@ -539,11 +539,20 @@ def update_doppler(): print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + try: + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + except: + print("1") if (mode == 'e'): - tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) + try: + tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) + except: + print("2") print(tx) - program_fm(rx,tx,rxpl_value,sq,txpl_value) + try: + program_fm(rx,tx,rxpl_value,sq,txpl_value) + except: + print("3") except: print("update_doppler failed") From a36cf5a1bb65648a5c24d0bd89fe8cfb220e5c1a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 09:27:11 -0400 Subject: [PATCH 1076/1744] Update transmit.py more prints --- transmit.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index dd9b4633..d0d4deec 100644 --- a/transmit.py +++ b/transmit.py @@ -549,7 +549,13 @@ def update_doppler(): except: print("2") print(tx) - try: + try: + print(rx) + print(tx) + print(rxpl_value) + print(sq) + print(txpl_value) + print("Program_fm") program_fm(rx,tx,rxpl_value,sq,txpl_value) except: print("3") From 45504bfb3bdc3a4fe3d0a4ce383012b856107cbe Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 09:28:33 -0400 Subject: [PATCH 1077/1744] Update transmit.py add global tx --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index d0d4deec..a1c8a45f 100644 --- a/transmit.py +++ b/transmit.py @@ -521,6 +521,7 @@ def update_doppler(): global sq global doppler_table global mode + global tx print("update_doppler") try: relative_time = (time.perf_counter() - start_time) % 370 From d59a9cce438b7d0de87c32055a7dcce414342d59 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 09:35:56 -0400 Subject: [PATCH 1078/1744] Update transmit.py fix tx --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index a1c8a45f..dca09a54 100644 --- a/transmit.py +++ b/transmit.py @@ -544,7 +544,7 @@ def update_doppler(): rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) except: print("1") - if (mode == 'e'): + if (mode != 'e'): try: tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) except: From 4e3829fe729fdaad60b8823d25ce6fffc3f3cad0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 19 Jun 2026 09:46:22 -0400 Subject: [PATCH 1079/1744] Update transmit.py remove extra prints --- transmit.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/transmit.py b/transmit.py index dca09a54..14a5bd01 100644 --- a/transmit.py +++ b/transmit.py @@ -540,26 +540,12 @@ def update_doppler(): print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - try: - rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) - except: - print("1") + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) if (mode != 'e'): - try: - tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) - except: - print("2") + tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) print(tx) - try: - print(rx) - print(tx) - print(rxpl_value) - print(sq) - print(txpl_value) - print("Program_fm") - program_fm(rx,tx,rxpl_value,sq,txpl_value) - except: - print("3") + program_fm(rx,tx,rxpl_value,sq,txpl_value) + except: print("update_doppler failed") From 3b7d31e39c64e6eab1c98c63703ada88c7711e5e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 20 Jun 2026 20:36:11 -0400 Subject: [PATCH 1080/1744] Update transmit.py doppler_mode from sim.cfg --- transmit.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 14a5bd01..2898ad30 100644 --- a/transmit.py +++ b/transmit.py @@ -695,7 +695,7 @@ if __name__ == "__main__": sim_mode = False sim_config = False hab_mode = False - doppler_mode = True + doppler_mode = False try: file = open("/home/pi/CubeSatSim/sim.cfg") @@ -748,7 +748,12 @@ if __name__ == "__main__": # print(txpl) # print( "{:.0f}".format(txpl)) txpl_value = "{:.0f}".format(txpl) - print(txpl_value) + print(txpl_value) + if len(config) > 11: + if config[11] == 'y' or config[11] == 'yes': + doppler_mode = True + print("Doppler mode is configured.") + print(config) print # print(callsign) From 0ba4ac3f80b2aed4abd6263aee6905e23ead9380 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 20 Jun 2026 20:53:28 -0400 Subject: [PATCH 1081/1744] Update config add doppler mode -K --- config | 105 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 77 insertions(+), 28 deletions(-) diff --git a/config b/config index 634d4d57..d0cf7ca4 100755 --- a/config +++ b/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-121:CDCSS (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 From ec9dcd9fb262df945413ee4b1063ccc70b649eee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 20 Jun 2026 20:56:42 -0400 Subject: [PATCH 1082/1744] Update transmit.py doppler is position 14 --- transmit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 2898ad30..c5fcbc48 100644 --- a/transmit.py +++ b/transmit.py @@ -749,10 +749,10 @@ if __name__ == "__main__": # print( "{:.0f}".format(txpl)) txpl_value = "{:.0f}".format(txpl) print(txpl_value) - if len(config) > 11: - if config[11] == 'y' or config[11] == 'yes': + if len(config) > 13: + if config[13] == 'y' or config[13] == 'yes': doppler_mode = True - print("Doppler mode is configured.") + print("Doppler frequency shift mode is configured.") print(config) print From 475f610e5ef472350d0c504ebe5339ee6dfef449 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 20 Jun 2026 20:59:58 -0400 Subject: [PATCH 1083/1744] Update install added doppler to sim.cfg --- install | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install b/install index 44196645..b7b68af3 100755 --- a/install +++ b/install @@ -39,7 +39,7 @@ else touch /home/pi/CubeSatSim/command_control_direwolf echo "creating $FILE" - echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60 no" > /home/pi/CubeSatSim/sim.cfg /home/pi/CubeSatSim/config -c -n @@ -295,21 +295,22 @@ if [ -f "$FILE" ]; then if [ -z "${11}" ] ; then m2="0" ; changed=1 ; else m2=${11} ; fi # tx pl code if [ -z "${12}" ] ; then m3="no" ; changed=1 ; else m3=${12} ; fi # random fail if [ -z "${13}" ] ; then m4="60" ; changed=1 ; else m4=${13} ; fi # random fail period + if [ -z "${14}" ] ; then m5="no" ; changed=1 ; else m5=${14} ; fi # doppler mode if [ $changed -eq 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 -e "\nCubeSatSim configuration sim.cfg file updated to: \n" echo - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4 - echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4> /home/pi/CubeSatSim/sim.cfg + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4 $m5 + echo $n1 $n2 $n3 $n4 $n5 $n6 $n7 $n8 $n9 $m1 $m2 $m3 $m4 $m5 > /home/pi/CubeSatSim/sim.cfg echo fi else echo "creating $FILE" - echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60" > /home/pi/CubeSatSim/sim.cfg + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60 no" > /home/pi/CubeSatSim/sim.cfg fi if [[ $(grep 'cubesatsim' /etc/motd) ]]; then From ae50461811481f32c3e25f5cfcbf32466b8c383d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 28 Jun 2026 17:29:19 -0400 Subject: [PATCH 1084/1744] Update install add ft857d install --- install | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install b/install index b7b68af3..18d10ab5 100755 --- a/install +++ b/install @@ -834,6 +834,18 @@ if [ ! -f "/home/pi/ssdv/ssdv" ]; then make fi +if [ ! -f "/home/pi/FT857d" ]; then + cd + echo "Installing FT857d for Doppler rigctld control mode" + git clone https://github.com/alanbjohnston/FT857d.git + cd FT857d/examples/FT857d + git checkout pi + g++ main.c ../../src/ft857d.cpp -lwiringPi -o ft857d + + sudo apt-get install -y libhamlib-utils socat gpredict + +fi + cd #echo "Would you like to reboot to complete the installation (y/n)?" From caee9d95fdedf4f7bee72375fef44cd5d81f4d81 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 10:19:25 -0400 Subject: [PATCH 1085/1744] Create rigctld.service --- systemd/rigctld.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 systemd/rigctld.service diff --git a/systemd/rigctld.service b/systemd/rigctld.service new file mode 100644 index 00000000..f40d7c1c --- /dev/null +++ b/systemd/rigctld.service @@ -0,0 +1,14 @@ +[Unit] +Description=rigctld + +[Service] +TimeoutStopSec=5 +ExecStart=/home/pi/CubeSatSim/rigctld.sh +WorkingDirectory=/home/pi/CubeSatSim +StandardOutput=inherit +StandardError=inherit +Restart=always +User=pi + +[Install] +WantedBy=default.target From a85925be2da8c2478fe90bdc7d309959f7879908 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 10:23:54 -0400 Subject: [PATCH 1086/1744] Create rigctld.sh --- rigctld.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 rigctld.sh diff --git a/rigctld.sh b/rigctld.sh new file mode 100644 index 00000000..9c0ae91f --- /dev/null +++ b/rigctld.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +echo "Starting virtual serial ports /tmp/vttyA and /tmp/vttyB" + +socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB + +echo "Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB" + +rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv + +echo "rigctld ended" From cae75720f76cf3f68ffa894c6e5f92a2b715a48f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 10:49:31 -0400 Subject: [PATCH 1087/1744] make executable --- rigctld.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 rigctld.sh diff --git a/rigctld.sh b/rigctld.sh old mode 100644 new mode 100755 index 9c0ae91f..e4ec754b --- a/rigctld.sh +++ b/rigctld.sh @@ -2,7 +2,11 @@ echo "Starting virtual serial ports /tmp/vttyA and /tmp/vttyB" -socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB +socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB & + +echo "Starting CubeSatSim FT857 emulation" + +/home/pi/FT857d/examples/FT857d/ft857d & echo "Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB" From 215d1e18c98eb661dbbf9848216868ed5aed2531 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 10:56:23 -0400 Subject: [PATCH 1088/1744] Update rigctld.sh kill processes --- rigctld.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rigctld.sh b/rigctld.sh index e4ec754b..fd3c488f 100755 --- a/rigctld.sh +++ b/rigctld.sh @@ -1,5 +1,9 @@ #!/bin/bash +sudo killall -9 ft857d &>/dev/null +sudo killall -9 socat &>/dev/null +sudo killall -9 rigctld &>/dev/null + echo "Starting virtual serial ports /tmp/vttyA and /tmp/vttyB" socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB & From b0c1a9395a4921425297d2a7ed606a064df2ed9d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 10:57:27 -0400 Subject: [PATCH 1089/1744] Update rigctld.sh add sleeps --- rigctld.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rigctld.sh b/rigctld.sh index fd3c488f..5c4b5e81 100755 --- a/rigctld.sh +++ b/rigctld.sh @@ -8,10 +8,14 @@ echo "Starting virtual serial ports /tmp/vttyA and /tmp/vttyB" socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB & +sleep 1 + echo "Starting CubeSatSim FT857 emulation" /home/pi/FT857d/examples/FT857d/ft857d & +sleep 1 + echo "Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB" rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv From ce5835fffcaf1d8bd8913148609333b7154b7306 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 11:05:57 -0400 Subject: [PATCH 1090/1744] Update install add rigctld.service install --- install | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/install b/install index 18d10ab5..1ce24c20 100755 --- a/install +++ b/install @@ -718,6 +718,22 @@ else FLAG=1 fi +FILE=/etc/systemd/system/rigctld.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/rigctld.service /etc/systemd/system/rigctld.service) ]]; then + echo "changed rigctld.service." + sudo cp /home/pi/CubeSatSim/systemd/rigctld.service /etc/systemd/system/rigctld.service + FLAG=1 + else + echo "no change to rigctld.service." + fi +else + echo "creating rigctld.service." + sudo cp /home/pi/CubeSatSim/systemd/rigctld.service /etc/systemd/system/rigctld.service + FLAG=1 +fi + + FILE=/etc/asound.conf if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/asound.conf /etc/asound.conf) ]]; then From 4d0d72278b0bee563b6abc32c8001daf813487d4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 11:12:54 -0400 Subject: [PATCH 1091/1744] Update install add update to FT857d --- install | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/install b/install index 1ce24c20..19520125 100755 --- a/install +++ b/install @@ -862,6 +862,17 @@ if [ ! -f "/home/pi/FT857d" ]; then fi +cd /home/pi/FT857d +git checkout pi +git pull --no-rebase > .updated_p + +if [[ $(grep 'changed' //home/pi/FT857d/.updated_p) ]]; then + echo "updating FT857d" + g++ main.c ../../src/ft857d.cpp -lwiringPi -o ft857d +else + echo "nothing to do for FT857d." +fi + cd #echo "Would you like to reboot to complete the installation (y/n)?" From f6115583ab393775848ac6e12b5031cf39c8e84f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 30 Jun 2026 16:01:59 -0400 Subject: [PATCH 1092/1744] Update log added rigctld --- log | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/log b/log index a516a3c0..e3a4afc5 100755 --- a/log +++ b/log @@ -8,6 +8,7 @@ if [ "$1" = "-h" ] ; then echo " -t transmit" echo " -c command and control" echo " -p pacsat" + echo " -r rigctld" echo "Default is the log is dumpted to the screen and written to a file." echo "If an additional r is included, the log is realtime, and exits with a Control-C" echo @@ -25,7 +26,7 @@ if [ "$REALTIME" = "1" ] ; then echo sleep 2 - if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then + if [ "$1" = "-t" ] ; then sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt # cat /home/pi/CubeSatSim/logt.txt # echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" @@ -37,6 +38,8 @@ if [ "$REALTIME" = "1" ] ; then sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" + elif [ "$1" = "-r" ]; then + sudo journalctl -af -u rigctld # > /home/pi/CubeSatSim/logr.txt else sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt # cat /home/pi/CubeSatSim/log.txt @@ -45,7 +48,7 @@ if [ "$REALTIME" = "1" ] ; then else - if [ "$1" = "-r" ] || [ "$1" = "-t" ] ; then + if [ "$1" = "-t" ] ; then sudo journalctl -a -u transmit > /home/pi/CubeSatSim/logt.txt cat /home/pi/CubeSatSim/logt.txt echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" @@ -57,6 +60,10 @@ else sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" + elif [ "$1" = "-r" ]; then + sudo journalctl -a -u rigctld > /home/pi/CubeSatSim/logr.txt + cat /home/pi/CubeSatSim/logr.txt + echo -e "\nrigtcld Log file also saved as /home/pi/CubeSatSim/logr.txt" else sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt From 726e5597e92799eb9f96505d410679c7ed555b4a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 09:33:13 -0400 Subject: [PATCH 1093/1744] Update install fix ft857d install --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 19520125..8add5b1d 100755 --- a/install +++ b/install @@ -854,12 +854,12 @@ if [ ! -f "/home/pi/FT857d" ]; then cd echo "Installing FT857d for Doppler rigctld control mode" git clone https://github.com/alanbjohnston/FT857d.git - cd FT857d/examples/FT857d + cd FT857d git checkout pi + cd examples/FT857d g++ main.c ../../src/ft857d.cpp -lwiringPi -o ft857d sudo apt-get install -y libhamlib-utils socat gpredict - fi cd /home/pi/FT857d From 0deb0d55154266e18cdea7b3ccea320c67a0208d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 10:36:50 -0400 Subject: [PATCH 1094/1744] Update .gitignore add doppler.txt --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index acb007e4..041e454e 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ sim_mode_auto direwolf-pacsatsim-tmp.conf groundstation/direwolf-pacsat-tmp.conf tlm.bin +doppler.txt From d4565ea78c4940deecfc7c7a44144329e74001a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 10:49:41 -0400 Subject: [PATCH 1095/1744] Update config doppler mode sim/rig/no --- config | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/config b/config index d0cf7ca4..a48b22eb 100755 --- a/config +++ b/config @@ -260,8 +260,10 @@ if [ "$1" = "" ]; then echo "Random Failure Mode is OFF" fi - if [ "${14}" = "y" ] || [ "${14}" = "yes" ] ; then - echo "Doppler frequency shift mode enabled" + if [ "${14}" = "sim" ] ; then + echo "Simulated Doppler frequency shift mode enabled" + elif [ "${14}" = "rig" ] ; then + echo "rigctld Doppler frequency shift mode enabled" else echo "Doppler frequency shift is OFF" fi @@ -1905,10 +1907,12 @@ elif [ "$1" = "-K" ]; then echo "$value" > /dev/null set -- $value - if [ "${14}" = "yes" ] || [ "${14}" = "y" ]; then - echo "Doppler frequency shift mode is ON" + if [ "${14}" = "sim" ] ; then + echo "Simulated Doppler frequency shift mode enabled" + elif [ "${14}" = "rig" ] ; then + echo "rigctld Doppler frequency shift mode enabled" else - echo " Doppler frequency shift mode is OFF" + echo "Doppler frequency shift is OFF" fi echo @@ -1921,7 +1925,17 @@ elif [ "$1" = "-K" ]; then if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then doppler="yes" - echo "Doppler frequency shift is ON" + echo "Do you want simulated Doppler shift or rigctld Doppler (sim/rig)" + read doppler + + if [ "$doppler" = "sim" ] ; then + echo "Simulated Doppler frequency shift mode enabled" + elif [ "$doppler" = "rig" ] ; then + echo "rigctld Doppler frequency shift mode enabled" + else + doppler="no" + echo "sim or rig not entered. Doppler frequency shift is OFF" + fi else doppler="no" echo " Doppler frequency shift is OFF" From 5a83c49dab17a6e2faf2ae7539487a1cbe9abc85 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 10:55:26 -0400 Subject: [PATCH 1096/1744] Update config --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index a48b22eb..35908e6f 100755 --- a/config +++ b/config @@ -524,7 +524,7 @@ elif [ "$1" = "-t" ]; then 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} ${14} - echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14}> /home/pi/CubeSatSim/sim.cfg + 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 @@ -1433,7 +1433,7 @@ elif [ "$1" = "-g" ]; then echo "Resetting" - echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0" > /home/pi/CubeSatSim/sim.cfg + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60 no" > /home/pi/CubeSatSim/sim.cfg sudo echo "b" > /home/pi/CubeSatSim/.mode From 078ad8153e83250053cefb6485e51afedc05682d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 10:58:29 -0400 Subject: [PATCH 1097/1744] Update config print doppler --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 35908e6f..109ea621 100755 --- a/config +++ b/config @@ -260,6 +260,7 @@ if [ "$1" = "" ]; then echo "Random Failure Mode is OFF" fi + echo ${14} if [ "${14}" = "sim" ] ; then echo "Simulated Doppler frequency shift mode enabled" elif [ "${14}" = "rig" ] ; then From 6e946df2eaa65e43f7ead6d91d181597e0f1da9b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 11:03:22 -0400 Subject: [PATCH 1098/1744] Update main.h add doppler_moe --- main.h | 1 + 1 file changed, 1 insertion(+) diff --git a/main.h b/main.h index 08a9ad5e..60e534b8 100644 --- a/main.h +++ b/main.h @@ -170,6 +170,7 @@ char sim_yes[10]; char hab_yes[10]; char fail_yes[10]; int fail_time = 60; +char doppler_mode[10]; int squelch = 3; // default squelch char rx[12], tx[12]; int tx_pl = 0; From bd96517428bedb2456b9e5b80467a974615ad5c2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 11:06:54 -0400 Subject: [PATCH 1099/1744] Update main.c add doppler_mode --- main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 3152e021..c58f72d7 100644 --- a/main.c +++ b/main.c @@ -42,11 +42,11 @@ int main(int argc, char * argv[]) { // char * cfg_buf[100]; - fscanf(config_file, "%s %d %f %f %s %d %s %s %s %d %d %s %d", - call, &reset_count, &lat_file, &long_file, sim_yes, &squelch, tx, rx, hab_yes, &rx_pl, &tx_pl, fail_yes, &fail_time); + fscanf(config_file, "%s %d %f %f %s %d %s %s %s %d %d %s %d %s", + call, &reset_count, &lat_file, &long_file, sim_yes, &squelch, tx, rx, hab_yes, &rx_pl, &tx_pl, fail_yes, &fail_time, &doppler_mode); fclose(config_file); - fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d %s %d\n", - call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time); + fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d %s %d %s\n", + call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time, doppler_mode); fprintf(stderr, "Transmit on %s MHz Receive on %s MHz\n", tx, rx); @@ -322,7 +322,7 @@ int main(int argc, char * argv[]) { config_file = fopen("sim.cfg", "w"); fprintf(config_file, "%s %d %8.4f %8.4f %s %d %s %s %s %d %d %s %d", - call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time); + call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time, doppler_mode); // fprintf(config_file, "%s %d", call, reset_count); fclose(config_file); config_file = fopen("sim.cfg", "r"); From cc820aacd171b95d9ea9fa440e62d0ff06425297 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 17:21:45 -0400 Subject: [PATCH 1100/1744] Update main.c fix doppler_mode --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index c58f72d7..3ecc52e2 100644 --- a/main.c +++ b/main.c @@ -43,7 +43,7 @@ int main(int argc, char * argv[]) { // char * cfg_buf[100]; fscanf(config_file, "%s %d %f %f %s %d %s %s %s %d %d %s %d %s", - call, &reset_count, &lat_file, &long_file, sim_yes, &squelch, tx, rx, hab_yes, &rx_pl, &tx_pl, fail_yes, &fail_time, &doppler_mode); + call, &reset_count, &lat_file, &long_file, sim_yes, &squelch, tx, rx, hab_yes, &rx_pl, &tx_pl, fail_yes, &fail_time, doppler_mode); fclose(config_file); fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d %s %d %s\n", call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time, doppler_mode); From 53248a7e85c3aa61d5e1d0a241da7c85a08bdf2f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 17:25:05 -0400 Subject: [PATCH 1101/1744] Update main.c write doppler_mode --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 3ecc52e2..08478b4a 100644 --- a/main.c +++ b/main.c @@ -321,7 +321,7 @@ int main(int argc, char * argv[]) { } config_file = fopen("sim.cfg", "w"); - fprintf(config_file, "%s %d %8.4f %8.4f %s %d %s %s %s %d %d %s %d", + fprintf(config_file, "%s %d %8.4f %8.4f %s %d %s %s %s %d %d %s %d %s", call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl, fail_yes, fail_time, doppler_mode); // fprintf(config_file, "%s %d", call, reset_count); fclose(config_file); From 9b08f80703989b1fa0263c61c8d7acb9fc60077d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 17:27:29 -0400 Subject: [PATCH 1102/1744] Update config don't print doppler_mode --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 109ea621..2811fdcd 100755 --- a/config +++ b/config @@ -260,11 +260,11 @@ if [ "$1" = "" ]; then echo "Random Failure Mode is OFF" fi - echo ${14} +# echo ${14} if [ "${14}" = "sim" ] ; then - echo "Simulated Doppler frequency shift mode enabled" + echo "Simulated Doppler frequency shift enabled" elif [ "${14}" = "rig" ] ; then - echo "rigctld Doppler frequency shift mode enabled" + echo "rigctld Doppler frequency shift enabled" else echo "Doppler frequency shift is OFF" fi From 72a78278237b68d592133ccbe591719461212f0f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 1 Jul 2026 17:33:06 -0400 Subject: [PATCH 1103/1744] Update transmit.py start/stop rigctld based on config --- transmit.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index c5fcbc48..df7afc9b 100644 --- a/transmit.py +++ b/transmit.py @@ -750,10 +750,17 @@ if __name__ == "__main__": txpl_value = "{:.0f}".format(txpl) print(txpl_value) if len(config) > 13: - if config[13] == 'y' or config[13] == 'yes': + if config[13] == 'sim': doppler_mode = True - print("Doppler frequency shift mode is configured.") - + print("Simulated Doppler frequency shift is enabled.") + if config[13] == 'rig': + doppler_mode = True + system("sudo systemctl restart rigctld") + print("rigctl Doppler frequency shift is enabled.") + else: + system("sudo systemctl stop rigctld") + else: + system("sudo systemctl stop rigctld") print(config) print # print(callsign) From 98939a9c3165cd181777bca61ff07065c6bfdc7a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 13:55:31 -0400 Subject: [PATCH 1104/1744] Update transmit.py added true cw using rpitx --- transmit.py | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/transmit.py b/transmit.py index df7afc9b..c46e8aad 100644 --- a/transmit.py +++ b/transmit.py @@ -549,6 +549,74 @@ def update_doppler(): except: print("update_doppler failed") +morse_table = [ # 0-9, A-Z only by (ASCII - 48) + [ 3, 3, 3, 3, 3, 0 ], # 0 + [ 1, 3, 3, 3, 3, 0 ], # 1 + [ 1, 1, 3, 3, 3, 0 ], # 2 + [ 1, 1, 1, 3, 3, 0 ], # 3 + [ 1, 1, 1, 1, 3, 0 ], # 4 + [ 1, 1, 1, 1, 1, 0 ], # 5 + [ 3, 1, 1, 1, 1, 0 ], # 6 + [ 3, 3, 1, 1, 1, 0 ], # 7 + [ 3, 3, 3, 1, 1, 0 ], # 8 + [ 3, 3, 3, 3, 1, 0 ], # 9 + [ 0, 0, 0, 0, 0, 0 ], # - + [ 0, 0, 0, 0, 0, 0 ], # - + [ 0, 0, 0, 0, 0, 0 ], # - + [ 0, 0, 0, 0, 0, 0 ], # - + [ 0, 0, 0, 0, 0, 0 ], # - + [ 0, 0, 0, 0, 0, 0 ], # - + [ 0, 0, 0, 0, 0, 0 ], # - + [ 1, 3, 0, 0, 0, 0 ], # A + [ 3, 1, 1, 1, 0, 0 ], # B + [ 3, 1, 3, 1, 0, 0 ], # C + [ 3, 1, 1, 0, 0, 0 ], # D + [ 1, 0, 0, 0, 0, 0 ], # E + [ 1, 1, 3, 1, 0, 0 ], # F + [ 3, 3, 1, 0, 0, 0 ], # G + [ 1, 1, 1, 1, 0, 0 ], # H + [ 1, 1, 0, 0, 0, 0 ], # I + [ 1, 3, 3, 3, 0, 0 ], # J + [ 3, 1, 3, 0, 0, 0 ], # K + [ 1, 3, 1, 1, 0, 0 ], # L + [ 3, 3, 0, 0, 0, 0 ], # M + [ 3, 1, 0, 0, 0, 0 ], # N + [ 3, 3, 3, 0, 0, 0 ], # O + [ 1, 3, 3, 1, 0, 0 ], # P + [ 3, 3, 1, 3, 0, 0 ], # Q + [ 1, 3, 1, 0, 0, 0 ], # R + [ 1, 1, 1, 0, 0, 0 ], # S + [ 3, 0, 0, 0, 0, 0 ], # T + [ 1, 1, 3, 0, 0, 0 ], # U + [ 1, 1, 1, 3, 0, 0 ], # V + [ 1, 3, 3, 0, 0, 0 ], # W + [ 3, 1, 1, 3, 0, 0 ], # X + [ 3, 1, 3, 3, 0, 0 ], # Y + [ 3, 3, 1, 1, 0, 0 ] # Z +] + +def cw_transmit_string(string): + global morse_timing + for character in string: + if (character != ' '): + cw_transmit_char(character); + else: + sleep(6.0 * morse_timing); + +def cw_transmit_char(character): + global morse_timing + i = 0 + while (morse_table[(ord(character.upper()) - ord('0')) % 44][i] != 0): + transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing); + i=i+1 + sleep(morse_timing); + sleep(morse_timing * 3.0); + +def transmit_carrier(duration): + global tx_doppler_freq_hz + command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + system(command) + print("CubeSatSim v2.2 transmit.py starting...") pd = 21 From 4d853a5148d5fcbc59a4f10dd68deba9d6d4a1d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:06:01 -0400 Subject: [PATCH 1105/1744] Update transmit.py if doppler_mode, cw using tone --- transmit.py | 63 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/transmit.py b/transmit.py index c46e8aad..a429addd 100644 --- a/transmit.py +++ b/transmit.py @@ -614,8 +614,11 @@ def cw_transmit_char(character): def transmit_carrier(duration): global tx_doppler_freq_hz + global txLed command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + output(txLed, 1) system(command) + output(txLed, 0) print("CubeSatSim v2.2 transmit.py starting...") @@ -1071,34 +1074,42 @@ if __name__ == "__main__": system("sudo rm /home/pi/CubeSatSim/cwready") ## ch = 1 for chan in range(7): - command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" - print(command) - system(command) -## chan = chan + 1 - if (command_tx == True): - output(txLed, 1) - if (doppler_mode == True): - update_doppler() - txf = tx_doppler_freq_hz / 1000 - tx = "{:.4f}".format(txf) - if (txc): - sim_failure_check() -# output (pd, 1) - sleep(0.3) - output (ptt, 0) - system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") - sleep(0.1) - output (ptt, 1) -# output (pd, 0) + if (doppler_mode): + try: + file = open("/home/pi/CubeSatSim/cw" + str(chan) + ".txt") + string = file.readline() + cw_transmit_string(string) else: - if (debug_mode == 1): - system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + print("error reading cw string " + str(chan)) + else: + command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" + print(command) + system(command) + ## chan = chan + 1 + if (command_tx == True): + output(txLed, 1) + if (doppler_mode == True): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) + if (txc): + sim_failure_check() + # output (pd, 1) + sleep(0.3) + output (ptt, 0) + system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") + sleep(0.1) + output (ptt, 1) + # output (pd, 0) else: - system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, 0) - -# command_control_check() - sleep(2) + if (debug_mode == 1): + system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + else: + system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + output(txLed, 0) + + # command_control_check() + sleep(2) f.close() sleep(10) except: From 86708b0c996aa3162da41330408b02902a10736c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:07:07 -0400 Subject: [PATCH 1106/1744] Update transmit.py fix except --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index a429addd..94f1843e 100644 --- a/transmit.py +++ b/transmit.py @@ -1079,7 +1079,7 @@ if __name__ == "__main__": file = open("/home/pi/CubeSatSim/cw" + str(chan) + ".txt") string = file.readline() cw_transmit_string(string) - else: + except: print("error reading cw string " + str(chan)) else: command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" From 3305fae6e319242abd977dc3fb41492451631cd5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:10:53 -0400 Subject: [PATCH 1107/1744] Update transmit.py add prints --- transmit.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 94f1843e..86647ad2 100644 --- a/transmit.py +++ b/transmit.py @@ -1076,9 +1076,12 @@ if __name__ == "__main__": for chan in range(7): if (doppler_mode): try: - file = open("/home/pi/CubeSatSim/cw" + str(chan) + ".txt") - string = file.readline() - cw_transmit_string(string) + filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" + print(filename) + file = open(filename) + cw_string = file.readline() + print(cw_string) + cw_transmit_string(cw_string) except: print("error reading cw string " + str(chan)) else: From 528bb1f5ce65dae124a3d788876fb7b64abf5809 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:11:53 -0400 Subject: [PATCH 1108/1744] Update transmit.py remove try to see error --- transmit.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index 86647ad2..bc1e67af 100644 --- a/transmit.py +++ b/transmit.py @@ -1075,15 +1075,15 @@ if __name__ == "__main__": ## ch = 1 for chan in range(7): if (doppler_mode): - try: - filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" - print(filename) - file = open(filename) - cw_string = file.readline() - print(cw_string) - cw_transmit_string(cw_string) - except: - print("error reading cw string " + str(chan)) +# try: + filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" + print(filename) + file = open(filename) + cw_string = file.readline() + print(cw_string) + cw_transmit_string(cw_string) +# except: +# print("error reading cw string " + str(chan)) else: command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" print(command) From f15f8afb3d5dc2f97be240912859f03df4c69efb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:14:40 -0400 Subject: [PATCH 1109/1744] Update transmit.py set morse_timing to 0.1 --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index bc1e67af..d5c4ddc9 100644 --- a/transmit.py +++ b/transmit.py @@ -628,6 +628,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 +morse_timing = 0.1 command_tx = True From 1792cb75548b12521dba03371fcdc79fc9afadf0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:17:25 -0400 Subject: [PATCH 1110/1744] Update transmit.py move sleep 2 --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index d5c4ddc9..eab6e23b 100644 --- a/transmit.py +++ b/transmit.py @@ -1112,8 +1112,8 @@ if __name__ == "__main__": system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") output(txLed, 0) - # command_control_check() - sleep(2) +# command_control_check() + sleep(2) f.close() sleep(10) except: From e56b63a8322364baee309e3661d06bdd3a6594bc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:22:12 -0400 Subject: [PATCH 1111/1744] Update transmit.py test cw_transmit_string --- transmit.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index eab6e23b..e40ecba4 100644 --- a/transmit.py +++ b/transmit.py @@ -1068,7 +1068,15 @@ if __name__ == "__main__": while True: # command_control_check() output (pd, 1) - output (ptt, 1) + output (ptt, 1) + + filename="/home/pi/CubeSatSim/cw0.txt" + print(filename) + file = open(filename) + cw_string = file.readline() + print(cw_string) + cw_transmit_string(cw_string) + try: f = open("/home/pi/CubeSatSim/cwready") f.close() From a737f6f6ebb2036fd7093b8b59bdc3829fae49a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:27:00 -0400 Subject: [PATCH 1112/1744] Update transmit.py add except print --- transmit.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index e40ecba4..d4863e21 100644 --- a/transmit.py +++ b/transmit.py @@ -1070,6 +1070,7 @@ if __name__ == "__main__": output (pd, 1) output (ptt, 1) + update_doppler() filename="/home/pi/CubeSatSim/cw0.txt" print(filename) file = open(filename) @@ -1084,15 +1085,17 @@ if __name__ == "__main__": ## ch = 1 for chan in range(7): if (doppler_mode): -# try: - filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" - print(filename) - file = open(filename) - cw_string = file.readline() - print(cw_string) - cw_transmit_string(cw_string) -# except: -# print("error reading cw string " + str(chan)) + try: + update_doppler() + filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" + print(filename) + file = open(filename) + cw_string = file.readline() + print(cw_string) + cw_transmit_string(cw_string) + except Exception as e: + print(f"An error occurred: {e}") + print("error reading cw string " + str(chan)) else: command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" print(command) From cf455bed73dbc52d60820d69af01fe0d1333e412 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:28:00 -0400 Subject: [PATCH 1113/1744] Update transmit.py fix tabs --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d4863e21..beb3e7f8 100644 --- a/transmit.py +++ b/transmit.py @@ -1094,7 +1094,7 @@ if __name__ == "__main__": print(cw_string) cw_transmit_string(cw_string) except Exception as e: - print(f"An error occurred: {e}") + print(f"An error occurred: {e}") print("error reading cw string " + str(chan)) else: command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" From f4a0feb7cc73cddf7fe768f908705c5a96427d25 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:32:29 -0400 Subject: [PATCH 1114/1744] Update transmit.py update doppler each character --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index beb3e7f8..8259fb07 100644 --- a/transmit.py +++ b/transmit.py @@ -605,6 +605,7 @@ def cw_transmit_string(string): def cw_transmit_char(character): global morse_timing + update_doppler() i = 0 while (morse_table[(ord(character.upper()) - ord('0')) % 44][i] != 0): transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing); From 848361627115c6028188e6ce3fa2b4214c472671 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:36:31 -0400 Subject: [PATCH 1115/1744] Update transmit.py add "no" to update_doppler for no fm --- transmit.py | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/transmit.py b/transmit.py index 8259fb07..0117c703 100644 --- a/transmit.py +++ b/transmit.py @@ -510,7 +510,7 @@ iss_doppler_passes = { ] } -def update_doppler(): +def update_doppler(fm): try: global start_time @@ -540,11 +540,12 @@ def update_doppler(): print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) - if (mode != 'e'): - tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) - print(tx) - program_fm(rx,tx,rxpl_value,sq,txpl_value) + if (fm != "no"): + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + if (mode != 'e'): + tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) + print(tx) + program_fm(rx,tx,rxpl_value,sq,txpl_value) except: print("update_doppler failed") @@ -605,7 +606,7 @@ def cw_transmit_string(string): def cw_transmit_char(character): global morse_timing - update_doppler() + update_doppler("no") i = 0 while (morse_table[(ord(character.upper()) - ord('0')) % 44][i] != 0): transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing); @@ -1069,16 +1070,7 @@ if __name__ == "__main__": while True: # command_control_check() output (pd, 1) - output (ptt, 1) - - update_doppler() - filename="/home/pi/CubeSatSim/cw0.txt" - print(filename) - file = open(filename) - cw_string = file.readline() - print(cw_string) - cw_transmit_string(cw_string) - + output (ptt, 1) try: f = open("/home/pi/CubeSatSim/cwready") f.close() @@ -1087,7 +1079,7 @@ if __name__ == "__main__": for chan in range(7): if (doppler_mode): try: - update_doppler() +# update_doppler() filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" print(filename) file = open(filename) From dc55ae6f0998683035e78446aee7f5e2450dc23c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 14:40:38 -0400 Subject: [PATCH 1116/1744] Update transmit.py reduce spacing for characters --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 0117c703..0434ad4f 100644 --- a/transmit.py +++ b/transmit.py @@ -612,7 +612,7 @@ def cw_transmit_char(character): transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing); i=i+1 sleep(morse_timing); - sleep(morse_timing * 3.0); + sleep(morse_timing * 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz @@ -630,7 +630,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.1 +morse_timing = 0.07 command_tx = True From 57835a27ac561c8433dfcd22e2370420f5743bf8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 15:02:14 -0400 Subject: [PATCH 1117/1744] Update transmit.py reduce inter dit timing --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 0434ad4f..3e0d2abd 100644 --- a/transmit.py +++ b/transmit.py @@ -611,7 +611,7 @@ def cw_transmit_char(character): while (morse_table[(ord(character.upper()) - ord('0')) % 44][i] != 0): transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing); i=i+1 - sleep(morse_timing); + sleep(morse_timing * 0.7); sleep(morse_timing * 1.5); def transmit_carrier(duration): From 7dd2b1cdd3cc4ef306679bc1653fafc60758eb1c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 15:09:29 -0400 Subject: [PATCH 1118/1744] Update transmit.py 0.15 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 3e0d2abd..6e006fb8 100644 --- a/transmit.py +++ b/transmit.py @@ -630,7 +630,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.07 +morse_timing = 0.15 command_tx = True From 479d85a2be1254f92063a73edee0647b167ce44f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:33:47 -0400 Subject: [PATCH 1119/1744] Create frequency.py --- frequency.py | 382 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 382 insertions(+) create mode 100644 frequency.py diff --git a/frequency.py b/frequency.py new file mode 100644 index 00000000..3cfa0561 --- /dev/null +++ b/frequency.py @@ -0,0 +1,382 @@ +#!/usr/bin/env python + +#import subprocess +import time +from time import sleep +#import os +import sys +from os import system + + +iss_doppler_passes = { + 5: [ + {"time_sec": -180, "velocity_kms": -4.00, "doppler_434_khz": 5.79, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, + {"time_sec": -170, "velocity_kms": -3.89, "doppler_434_khz": 5.64, "obs_434_mhz": 434.9056, "doppler_144_khz": 1.88, "obs_144_mhz": 144.9019}, + {"time_sec": -160, "velocity_kms": -3.78, "doppler_434_khz": 5.48, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.83, "obs_144_mhz": 144.9018}, + {"time_sec": -150, "velocity_kms": -3.67, "doppler_434_khz": 5.32, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.77, "obs_144_mhz": 144.9018}, + {"time_sec": -140, "velocity_kms": -3.54, "doppler_434_khz": 5.14, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.71, "obs_144_mhz": 144.9017}, + {"time_sec": -130, "velocity_kms": -3.42, "doppler_434_khz": 4.96, "obs_434_mhz": 434.9050, "doppler_144_khz": 1.65, "obs_144_mhz": 144.9017}, + {"time_sec": -120, "velocity_kms": -3.28, "doppler_434_khz": 4.76, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.59, "obs_144_mhz": 144.9016}, + {"time_sec": -110, "velocity_kms": -3.14, "doppler_434_khz": 4.55, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.52, "obs_144_mhz": 144.9015}, + {"time_sec": -100, "velocity_kms": -2.99, "doppler_434_khz": 4.33, "obs_434_mhz": 434.9043, "doppler_144_khz": 1.44, "obs_144_mhz": 144.9014}, + {"time_sec": -90, "velocity_kms": -2.83, "doppler_434_khz": 4.10, "obs_434_mhz": 434.9041, "doppler_144_khz": 1.37, "obs_144_mhz": 144.9014}, + {"time_sec": -80, "velocity_kms": -2.66, "doppler_434_khz": 3.86, "obs_434_mhz": 434.9039, "doppler_144_khz": 1.29, "obs_144_mhz": 144.9013}, + {"time_sec": -70, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, + {"time_sec": -60, "velocity_kms": -2.29, "doppler_434_khz": 3.32, "obs_434_mhz": 434.9033, "doppler_144_khz": 1.11, "obs_144_mhz": 144.9011}, + {"time_sec": -50, "velocity_kms": -2.09, "doppler_434_khz": 3.03, "obs_434_mhz": 434.9030, "doppler_144_khz": 1.01, "obs_144_mhz": 144.9010}, + {"time_sec": -40, "velocity_kms": -1.87, "doppler_434_khz": 2.71, "obs_434_mhz": 434.9027, "doppler_144_khz": 0.90, "obs_144_mhz": 144.9009}, + {"time_sec": -30, "velocity_kms": -1.63, "doppler_434_khz": 2.37, "obs_434_mhz": 434.9024, "doppler_144_khz": 0.79, "obs_144_mhz": 144.9008}, + {"time_sec": -20, "velocity_kms": -1.33, "doppler_434_khz": 1.93, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, + {"time_sec": -10, "velocity_kms": -0.84, "doppler_434_khz": 1.22, "obs_434_mhz": 434.9012, "doppler_144_khz": 0.41, "obs_144_mhz": 144.9004}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 0.84, "doppler_434_khz": -1.22, "obs_434_mhz": 434.8988, "doppler_144_khz": -0.41, "obs_144_mhz": 144.8996}, + {"time_sec": 20, "velocity_kms": 1.33, "doppler_434_khz": -1.93, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, + {"time_sec": 30, "velocity_kms": 1.63, "doppler_434_khz": -2.37, "obs_434_mhz": 434.8976, "doppler_144_khz": -0.79, "obs_144_mhz": 144.8992}, + {"time_sec": 40, "velocity_kms": 1.87, "doppler_434_khz": -2.71, "obs_434_mhz": 434.8973, "doppler_144_khz": -0.90, "obs_144_mhz": 144.8991}, + {"time_sec": 50, "velocity_kms": 2.09, "doppler_434_khz": -3.03, "obs_434_mhz": 434.8970, "doppler_144_khz": -1.01, "obs_144_mhz": 144.8990}, + {"time_sec": 60, "velocity_kms": 2.29, "doppler_434_khz": -3.32, "obs_434_mhz": 434.8967, "doppler_144_khz": -1.11, "obs_144_mhz": 144.8989}, + {"time_sec": 70, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, + {"time_sec": 80, "velocity_kms": 2.66, "doppler_434_khz": -3.86, "obs_434_mhz": 434.8961, "doppler_144_khz": -1.29, "obs_144_mhz": 144.8987}, + {"time_sec": 90, "velocity_kms": 2.83, "doppler_434_khz": -4.10, "obs_434_mhz": 434.8959, "doppler_144_khz": -1.37, "obs_144_mhz": 144.8986}, + {"time_sec": 100, "velocity_kms": 2.99, "doppler_434_khz": -4.33, "obs_434_mhz": 434.8957, "doppler_144_khz": -1.44, "obs_144_mhz": 144.8986}, + {"time_sec": 110, "velocity_kms": 3.14, "doppler_434_khz": -4.55, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.52, "obs_144_mhz": 144.8985}, + {"time_sec": 120, "velocity_kms": 3.28, "doppler_434_khz": -4.76, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.59, "obs_144_mhz": 144.8984}, + {"time_sec": 130, "velocity_kms": 3.42, "doppler_434_khz": -4.96, "obs_434_mhz": 434.8950, "doppler_144_khz": -1.65, "obs_144_mhz": 144.8983}, + {"time_sec": 140, "velocity_kms": 3.54, "doppler_434_khz": -5.14, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.71, "obs_144_mhz": 144.8983}, + {"time_sec": 150, "velocity_kms": 3.67, "doppler_434_khz": -5.32, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.77, "obs_144_mhz": 144.8982}, + {"time_sec": 160, "velocity_kms": 3.78, "doppler_434_khz": -5.48, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.83, "obs_144_mhz": 144.8982}, + {"time_sec": 170, "velocity_kms": 3.89, "doppler_434_khz": -5.64, "obs_434_mhz": 434.8944, "doppler_144_khz": -1.88, "obs_144_mhz": 144.8981}, + {"time_sec": 180, "velocity_kms": 4.00, "doppler_434_khz": -5.79, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981} + ], + 20: [ + {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, + {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, + {"time_sec": -160, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, + {"time_sec": -150, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, + {"time_sec": -140, "velocity_kms": -5.22, "doppler_434_khz": 7.57, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.52, "obs_144_mhz": 144.9025}, + {"time_sec": -130, "velocity_kms": -5.02, "doppler_434_khz": 7.28, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.43, "obs_144_mhz": 144.9024}, + {"time_sec": -120, "velocity_kms": -4.81, "doppler_434_khz": 6.98, "obs_434_mhz": 434.9070, "doppler_144_khz": 2.32, "obs_144_mhz": 144.9023}, + {"time_sec": -110, "velocity_kms": -4.57, "doppler_434_khz": 6.63, "obs_434_mhz": 434.9066, "doppler_144_khz": 2.21, "obs_144_mhz": 144.9022}, + {"time_sec": -100, "velocity_kms": -4.30, "doppler_434_khz": 6.24, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.08, "obs_144_mhz": 144.9021}, + {"time_sec": -90, "velocity_kms": -4.00, "doppler_434_khz": 5.80, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, + {"time_sec": -80, "velocity_kms": -3.68, "doppler_434_khz": 5.34, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.78, "obs_144_mhz": 144.9018}, + {"time_sec": -70, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, + {"time_sec": -60, "velocity_kms": -2.92, "doppler_434_khz": 4.24, "obs_434_mhz": 434.9042, "doppler_144_khz": 1.41, "obs_144_mhz": 144.9014}, + {"time_sec": -50, "velocity_kms": -2.50, "doppler_434_khz": 3.63, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.21, "obs_144_mhz": 144.9012}, + {"time_sec": -40, "velocity_kms": -2.04, "doppler_434_khz": 2.96, "obs_434_mhz": 434.9030, "doppler_144_khz": 0.99, "obs_144_mhz": 144.9010}, + {"time_sec": -30, "velocity_kms": -1.56, "doppler_434_khz": 2.26, "obs_434_mhz": 434.9023, "doppler_144_khz": 0.75, "obs_144_mhz": 144.9008}, + {"time_sec": -20, "velocity_kms": -1.05, "doppler_434_khz": 1.52, "obs_434_mhz": 434.9015, "doppler_144_khz": 0.51, "obs_144_mhz": 144.9005}, + {"time_sec": -10, "velocity_kms": -0.53, "doppler_434_khz": 0.77, "obs_434_mhz": 434.9008, "doppler_144_khz": 0.26, "obs_144_mhz": 144.9003}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 0.53, "doppler_434_khz": -0.77, "obs_434_mhz": 434.8992, "doppler_144_khz": -0.26, "obs_144_mhz": 144.8997}, + {"time_sec": 20, "velocity_kms": 1.05, "doppler_434_khz": -1.52, "obs_434_mhz": 434.8985, "doppler_144_khz": -0.51, "obs_144_mhz": 144.8995}, + {"time_sec": 30, "velocity_kms": 1.56, "doppler_434_khz": -2.26, "obs_434_mhz": 434.8977, "doppler_144_khz": -0.75, "obs_144_mhz": 144.8992}, + {"time_sec": 40, "velocity_kms": 2.04, "doppler_434_khz": -2.96, "obs_434_mhz": 434.8970, "doppler_144_khz": -0.99, "obs_144_mhz": 144.8990}, + {"time_sec": 50, "velocity_kms": 2.50, "doppler_434_khz": -3.63, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.21, "obs_144_mhz": 144.8988}, + {"time_sec": 60, "velocity_kms": 2.92, "doppler_434_khz": -4.24, "obs_434_mhz": 434.8958, "doppler_144_khz": -1.41, "obs_144_mhz": 144.8986}, + {"time_sec": 70, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, + {"time_sec": 80, "velocity_kms": 3.68, "doppler_434_khz": -5.34, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.78, "obs_144_mhz": 144.8982}, + {"time_sec": 90, "velocity_kms": 4.00, "doppler_434_khz": -5.80, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981}, + {"time_sec": 100, "velocity_kms": 4.30, "doppler_434_khz": -6.24, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.08, "obs_144_mhz": 144.8979}, + {"time_sec": 110, "velocity_kms": 4.57, "doppler_434_khz": -6.63, "obs_434_mhz": 434.8934, "doppler_144_khz": -2.21, "obs_144_mhz": 144.8978}, + {"time_sec": 120, "velocity_kms": 4.81, "doppler_434_khz": -6.98, "obs_434_mhz": 434.8930, "doppler_144_khz": -2.32, "obs_144_mhz": 144.8977}, + {"time_sec": 130, "velocity_kms": 5.02, "doppler_434_khz": -7.28, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.43, "obs_144_mhz": 144.8976}, + {"time_sec": 140, "velocity_kms": 5.22, "doppler_434_khz": -7.57, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.52, "obs_144_mhz": 144.8975}, + {"time_sec": 150, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, + {"time_sec": 160, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, + {"time_sec": 170, "velocity_kms": 5.68, "doppler_434_khz": -8.24, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.75, "obs_144_mhz": 144.8973}, + {"time_sec": 180, "velocity_kms": 5.81, "doppler_434_khz": -8.43, "obs_434_mhz": 434.8916, "doppler_144_khz": -2.81, "obs_144_mhz": 144.8972} + ], + 40: [ + {"time_sec": -180, "velocity_kms": -6.67, "doppler_434_khz": 9.68, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.22, "obs_144_mhz": 144.9032}, + {"time_sec": -170, "velocity_kms": -6.60, "doppler_434_khz": 9.57, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.19, "obs_144_mhz": 144.9032}, + {"time_sec": -160, "velocity_kms": -6.52, "doppler_434_khz": 9.46, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.15, "obs_144_mhz": 144.9032}, + {"time_sec": -150, "velocity_kms": -6.43, "doppler_434_khz": 9.33, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.11, "obs_144_mhz": 144.9031}, + {"time_sec": -140, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, + {"time_sec": -130, "velocity_kms": -6.19, "doppler_434_khz": 8.98, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.99, "obs_144_mhz": 144.9030}, + {"time_sec": -120, "velocity_kms": -6.04, "doppler_434_khz": 8.76, "obs_434_mhz": 434.9088, "doppler_144_khz": 2.92, "obs_144_mhz": 144.9029}, + {"time_sec": -110, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, + {"time_sec": -100, "velocity_kms": -5.65, "doppler_434_khz": 8.20, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.73, "obs_144_mhz": 144.9027}, + {"time_sec": -90, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, + {"time_sec": -80, "velocity_kms": -5.08, "doppler_434_khz": 7.37, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.46, "obs_144_mhz": 144.9025}, + {"time_sec": -70, "velocity_kms": -4.72, "doppler_434_khz": 6.85, "obs_434_mhz": 434.9068, "doppler_144_khz": 2.28, "obs_144_mhz": 144.9023}, + {"time_sec": -60, "velocity_kms": -4.28, "doppler_434_khz": 6.21, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.07, "obs_144_mhz": 144.9021}, + {"time_sec": -50, "velocity_kms": -3.77, "doppler_434_khz": 5.47, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.82, "obs_144_mhz": 144.8993}, # manual note context adjustments active + {"time_sec": -40, "velocity_kms": -3.17, "doppler_434_khz": 4.60, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.53, "obs_144_mhz": 144.9015}, + {"time_sec": -30, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, + {"time_sec": -20, "velocity_kms": -1.70, "doppler_434_khz": 2.47, "obs_434_mhz": 434.9025, "doppler_144_khz": 0.82, "obs_144_mhz": 144.9008}, + {"time_sec": -10, "velocity_kms": -0.87, "doppler_434_khz": 1.26, "obs_434_mhz": 434.9013, "doppler_144_khz": 0.42, "obs_144_mhz": 144.9004}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 0.87, "doppler_434_khz": -1.26, "obs_434_mhz": 434.8987, "doppler_144_khz": -0.42, "obs_144_mhz": 144.8996}, + {"time_sec": 20, "velocity_kms": 1.70, "doppler_434_khz": -2.47, "obs_434_mhz": 434.8975, "doppler_144_khz": -0.82, "obs_144_mhz": 144.8992}, + {"time_sec": 30, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, + {"time_sec": 40, "velocity_kms": 3.17, "doppler_434_khz": -4.60, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.53, "obs_144_mhz": 144.8985}, + {"time_sec": 50, "velocity_kms": 3.77, "doppler_434_khz": -5.47, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.82, "obs_144_mhz": 144.8982}, + {"time_sec": 60, "velocity_kms": 4.28, "doppler_434_khz": -6.21, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.07, "obs_144_mhz": 144.8979}, + {"time_sec": 70, "velocity_kms": 4.72, "doppler_434_khz": -6.85, "obs_434_mhz": 434.8932, "doppler_144_khz": -2.28, "obs_144_mhz": 144.8977}, + {"time_sec": 80, "velocity_kms": 5.08, "doppler_434_khz": -7.37, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.46, "obs_144_mhz": 144.8975}, + {"time_sec": 90, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, + {"time_sec": 100, "velocity_kms": 0.87, "doppler_434_khz": -8.19, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.73, "obs_144_mhz": 144.8973}, + {"time_sec": 110, "velocity_kms": 1.70, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, + {"time_sec": 120, "velocity_kms": 2.48, "doppler_434_khz": -8.76, "obs_434_mhz": 434.8912, "doppler_144_khz": -2.92, "obs_144_mhz": 144.8971}, + {"time_sec": 130, "velocity_kms": 3.17, "doppler_434_khz": -8.98, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.99, "obs_144_mhz": 144.8970}, + {"time_sec": 140, "velocity_kms": 3.77, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, + {"time_sec": 150, "velocity_kms": 4.28, "doppler_434_khz": -9.33, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.11, "obs_144_mhz": 144.8969}, + {"time_sec": 160, "velocity_kms": 4.72, "doppler_434_khz": -9.46, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.15, "obs_144_mhz": 144.8968}, + {"time_sec": 170, "velocity_kms": 5.08, "doppler_434_khz": -9.58, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.19, "obs_144_mhz": 144.8968}, + {"time_sec": 180, "velocity_kms": 5.39, "doppler_434_khz": -9.68, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.22, "obs_144_mhz": 144.8968} + ], + 70: [ + {"time_sec": -180, "velocity_kms": -7.00, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, + {"time_sec": -170, "velocity_kms": -6.95, "doppler_434_khz": 10.09, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.36, "obs_144_mhz": 144.9034}, + {"time_sec": -160, "velocity_kms": -6.91, "doppler_434_khz": 10.02, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.34, "obs_144_mhz": 144.9033}, + {"time_sec": -150, "velocity_kms": -6.86, "doppler_434_khz": 9.95, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.32, "obs_144_mhz": 144.9033}, + {"time_sec": -140, "velocity_kms": -6.78, "doppler_434_khz": 9.84, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.28, "obs_144_mhz": 144.9033}, + {"time_sec": -130, "velocity_kms": -6.70, "doppler_434_khz": 9.72, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, + {"time_sec": -120, "velocity_kms": -6.62, "doppler_434_khz": 9.60, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, + {"time_sec": -110, "velocity_kms": -6.47, "doppler_434_khz": 9.39, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.13, "obs_144_mhz": 144.9031}, + {"time_sec": -100, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, + {"time_sec": -90, "velocity_kms": -6.17, "doppler_434_khz": 8.95, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.98, "obs_144_mhz": 144.9030}, + {"time_sec": -80, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, + {"time_sec": -70, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, + {"time_sec": -60, "velocity_kms": -5.24, "doppler_434_khz": 7.60, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.53, "obs_144_mhz": 144.9025}, + {"time_sec": -50, "velocity_kms": -4.60, "doppler_434_khz": 6.67, "obs_434_mhz": 434.9067, "doppler_144_khz": 2.22, "obs_144_mhz": 144.9022}, + {"time_sec": -40, "velocity_kms": -3.96, "doppler_434_khz": 5.74, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.91, "obs_144_mhz": 144.9019}, + {"time_sec": -30, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, + {"time_sec": -20, "velocity_kms": -2.21, "doppler_434_khz": 3.21, "obs_434_mhz": 434.9032, "doppler_144_khz": 1.07, "obs_144_mhz": 144.9011}, + {"time_sec": -10, "velocity_kms": -1.11, "doppler_434_khz": 1.61, "obs_434_mhz": 434.9016, "doppler_144_khz": 0.53, "obs_144_mhz": 144.9005}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 1.11, "doppler_434_khz": -1.61, "obs_434_mhz": 434.8984, "doppler_144_khz": -0.53, "obs_144_mhz": 144.8995}, + {"time_sec": 20, "velocity_kms": 2.21, "doppler_434_khz": -3.21, "obs_434_mhz": 434.8968, "doppler_144_khz": -1.07, "obs_144_mhz": 144.8989}, + {"time_sec": 30, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, + {"time_sec": 40, "velocity_kms": 3.96, "doppler_434_khz": -5.74, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.91, "obs_144_mhz": 144.8981}, + {"time_sec": 50, "velocity_kms": 4.60, "doppler_434_khz": -6.67, "obs_434_mhz": 434.8933, "doppler_144_khz": -2.22, "obs_144_mhz": 144.8978}, + {"time_sec": 60, "velocity_kms": 5.24, "doppler_434_khz": -7.60, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.53, "obs_144_mhz": 144.8975}, + {"time_sec": 70, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, + {"time_sec": 80, "velocity_kms": 5.86, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, + {"time_sec": 90, "velocity_kms": 6.17, "doppler_434_khz": -8.95, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.98, "obs_144_mhz": 144.8970}, + {"time_sec": 100, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, + {"time_sec": 110, "velocity_kms": 6.47, "doppler_434_khz": -9.39, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.13, "obs_144_mhz": 144.8969}, + {"time_sec": 120, "velocity_kms": 6.62, "doppler_434_khz": -9.60, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, + {"time_sec": 130, "velocity_kms": 6.70, "doppler_434_khz": -9.72, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, + {"time_sec": 140, "velocity_kms": 6.78, "doppler_434_khz": -9.84, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.28, "obs_144_mhz": 144.8967}, + {"time_sec": 150, "velocity_kms": 6.86, "doppler_434_khz": -9.95, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.32, "obs_144_mhz": 144.8967}, + {"time_sec": 160, "velocity_kms": 6.91, "doppler_434_khz": -10.02, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.34, "obs_144_mhz": 144.8967}, + {"time_sec": 170, "velocity_kms": 6.95, "doppler_434_khz": -10.09, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.36, "obs_144_mhz": 144.8966}, + {"time_sec": 180, "velocity_kms": 7.00, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966} + ], + 85: [ + {"time_sec": -180, "velocity_kms": -7.15, "doppler_434_khz": 10.37, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.46, "obs_144_mhz": 144.9035}, + {"time_sec": -170, "velocity_kms": -7.12, "doppler_434_khz": 10.32, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.44, "obs_144_mhz": 144.9034}, + {"time_sec": -160, "velocity_kms": -7.08, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.42, "obs_144_mhz": 144.9034}, + {"time_sec": -150, "velocity_kms": -7.05, "doppler_434_khz": 10.23, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.41, "obs_144_mhz": 144.9034}, + {"time_sec": -140, "velocity_kms": -6.99, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, + {"time_sec": -130, "velocity_kms": -6.94, "doppler_434_khz": 10.06, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.35, "obs_144_mhz": 144.9034}, + {"time_sec": -120, "velocity_kms": -6.88, "doppler_434_khz": 9.98, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, + {"time_sec": -110, "velocity_kms": -6.75, "doppler_434_khz": 9.80, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.26, "obs_144_mhz": 144.9033}, + {"time_sec": -100, "velocity_kms": -6.63, "doppler_434_khz": 9.61, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, + {"time_sec": -90, "velocity_kms": -6.50, "doppler_434_khz": 9.43, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.14, "obs_144_mhz": 144.9031}, + {"time_sec": -80, "velocity_kms": -6.23, "doppler_434_khz": 9.04, "obs_434_mhz": 434.9090, "doppler_144_khz": 3.01, "obs_144_mhz": 144.9030}, + {"time_sec": -70, "velocity_kms": -5.97, "doppler_434_khz": 8.66, "obs_434_mhz": 434.9087, "doppler_144_khz": 2.88, "obs_144_mhz": 144.9029}, + {"time_sec": -60, "velocity_kms": -5.70, "doppler_434_khz": 8.27, "obs_434_mhz": 434.9083, "doppler_144_khz": 2.76, "obs_144_mhz": 144.9028}, + {"time_sec": -50, "velocity_kms": -5.10, "doppler_434_khz": 7.40, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.47, "obs_144_mhz": 144.9025}, + {"time_sec": -40, "velocity_kms": -4.50, "doppler_434_khz": 6.53, "obs_434_mhz": 434.9065, "doppler_144_khz": 2.18, "obs_144_mhz": 144.9022}, + {"time_sec": -30, "velocity_kms": -3.90, "doppler_434_khz": 5.66, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.89, "obs_144_mhz": 144.9019}, + {"time_sec": -20 ,"velocity_kms": -2.60, "doppler_434_khz": 3.77, "obs_434_mhz": 434.9038, "doppler_144_khz": 1.26, "obs_144_mhz": 144.9013}, + {"time_sec": -10 ,"velocity_kms": -1.30, "doppler_434_khz": 1.89, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.63, "obs_144_mhz": 144.9006}, + {"time_sec": 0 ,"velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10 ,"velocity_kms": 1.30, "doppler_434_khz": -1.89, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.63, "obs_144_mhz": 144.8994}, + {"time_sec": 20 ,"velocity_kms": 2.60, "doppler_434_khz": -3.77, "obs_434_mhz": 434.8962, "doppler_144_khz": -1.26, "obs_144_mhz": 144.8987}, + {"time_sec": 30 ,"velocity_kms": 3.90, "doppler_434_khz": -5.66, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.89, "obs_144_mhz": 144.8981}, + {"time_sec": 40 ,"velocity_kms": 4.50, "doppler_434_khz": -6.53, "obs_434_mhz": 434.8935, "doppler_144_khz": -2.18, "obs_144_mhz": 144.8978}, + {"time_sec": 50 ,"velocity_kms": 5.10, "doppler_434_khz": -7.40, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.47, "obs_144_mhz": 144.8975}, + {"time_sec": 60 ,"velocity_kms": 5.70, "doppler_434_khz": -8.27, "obs_434_mhz": 434.8917, "doppler_144_khz": -2.76, "obs_144_mhz": 144.8972}, + {"time_sec": 70 ,"velocity_kms": 5.97, "doppler_434_khz": -8.66, "obs_434_mhz": 434.8913, "doppler_144_khz": -2.88, "obs_144_mhz": 144.8971}, + {"time_sec": 80 ,"velocity_kms": 6.23, "doppler_434_khz": -9.04, "obs_434_mhz": 434.8910, "doppler_144_khz": -3.01, "obs_144_mhz": 144.8970}, + {"time_sec": 90 ,"velocity_kms": 6.50, "doppler_434_khz": -9.43, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.14, "obs_144_mhz": 144.8969}, + {"time_sec": 100 ,"velocity_kms": 6.63, "doppler_434_khz": -9.61, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, + {"time_sec": 110 ,"velocity_kms": 6.75, "doppler_434_khz": -9.80, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.26, "obs_144_mhz": 144.8967}, + {"time_sec": 120 ,"velocity_kms": 6.88, "doppler_434_khz": -9.98, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, + {"time_sec": 130 ,"velocity_kms": 6.94, "doppler_434_khz": -10.06, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.35, "obs_144_mhz": 144.8966}, + {"time_sec": 140 ,"velocity_kms": 6.99, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966}, + {"time_sec": 150 ,"velocity_kms": 7.05, "doppler_434_khz": -10.23, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.41, "obs_144_mhz": 144.8966}, + {"time_sec": 160 ,"velocity_kms": 7.08, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8917, "doppler_144_khz": -3.42, "obs_144_mhz": 144.8966}, + {"time_sec": 170 ,"velocity_kms": 7.12, "doppler_434_khz": -10.32, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.44, "obs_144_mhz": 144.8966}, + {"time_sec": 180 ,"velocity_kms": 7.15, "doppler_434_khz": -10.37, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.46, "obs_144_mhz": 144.8965} + ], + 89: [ + {"time_sec": -180, "velocity_kms": -7.17, "doppler_434_khz": 10.40, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.47, "obs_144_mhz": 144.9035}, + {"time_sec": -170, "velocity_kms": -7.13, "doppler_434_khz": 10.35, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.45, "obs_144_mhz": 144.9034}, + {"time_sec": -160, "velocity_kms": -7.09, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.43, "obs_144_mhz": 144.9034}, + {"time_sec": -150, "velocity_kms": -7.04, "doppler_434_khz": 10.21, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.40, "obs_144_mhz": 144.9034}, + {"time_sec": -140, "velocity_kms": -6.97, "doppler_434_khz": 10.12, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.37, "obs_144_mhz": 144.9034}, + {"time_sec": -130, "velocity_kms": -6.90, "doppler_434_khz": 10.01, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, + {"time_sec": -120, "velocity_kms": -6.81, "doppler_434_khz": 9.87, "obs_434_mhz": 434.9099, "doppler_144_khz": 3.29, "obs_144_mhz": 144.9033}, + {"time_sec": -110, "velocity_kms": -6.69, "doppler_434_khz": 9.71, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, + {"time_sec": -100, "velocity_kms": -6.55, "doppler_434_khz": 9.51, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.17, "obs_144_mhz": 144.9032}, + {"time_sec": -90, "velocity_kms": -6.38, "doppler_434_khz": 9.25, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.08, "obs_144_mhz": 144.9031}, + {"time_sec": -80, "velocity_kms": -6.15, "doppler_434_khz": 8.93, "obs_434_mhz": 434.9089, "doppler_144_khz": 2.97, "obs_144_mhz": 144.9030}, + {"time_sec": -70, "velocity_kms": -5.87, "doppler_434_khz": 8.51, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.84, "obs_144_mhz": 144.9028}, + {"time_sec": -60, "velocity_kms": -5.49, "doppler_434_khz": 7.97, "obs_434_mhz": 434.9080, "doppler_144_khz": 2.66, "obs_144_mhz": 144.9027}, + {"time_sec": -50, "velocity_kms": -5.01, "doppler_434_khz": 7.26, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.42, "obs_144_mhz": 144.9024}, + {"time_sec": -40, "velocity_kms": -4.37, "doppler_434_khz": 6.34, "obs_434_mhz": 434.9063, "doppler_144_khz": 2.11, "obs_144_mhz": 144.9021}, + {"time_sec": -30, "velocity_kms": -3.55, "doppler_434_khz": 5.15, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.72, "obs_144_mhz": 144.9017}, + {"time_sec": -20, "velocity_kms": -2.53, "doppler_434_khz": 3.67, "obs_434_mhz": 434.9037, "doppler_144_khz": 1.22, "obs_144_mhz": 144.9012}, + {"time_sec": -10, "velocity_kms": -1.32, "doppler_434_khz": 1.92, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, + {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, + {"time_sec": 10, "velocity_kms": 1.32, "doppler_434_khz": -1.92, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, + {"time_sec": 20, "velocity_kms": 2.53, "doppler_434_khz": -3.67, "obs_434_mhz": 434.8963, "doppler_144_khz": -1.22, "obs_144_mhz": 144.8988}, + {"time_sec": 30, "velocity_kms": 3.55, "doppler_434_khz": -5.15, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.72, "obs_144_mhz": 144.8983}, + {"time_sec": 40, "velocity_kms": 4.37, "doppler_434_khz": -6.34, "obs_434_mhz": 434.8937, "doppler_144_khz": -2.11, "obs_144_mhz": 144.8979}, + {"time_sec": 50, "velocity_kms": 5.01, "doppler_434_khz": -7.26, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.42, "obs_144_mhz": 144.8976}, + {"time_sec": 60, "velocity_kms": 5.49, "doppler_434_khz": -7.97, "obs_434_mhz": 434.8920, "doppler_144_khz": -2.66, "obs_144_mhz": 144.8973}, + {"time_sec": 70, "velocity_kms": 5.87, "doppler_434_khz": -8.51, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.84, "obs_144_mhz": 144.8972}, + {"time_sec": 80, "velocity_kms": 6.15, "doppler_434_khz": -8.93, "obs_434_mhz": 434.8911, "doppler_144_khz": -2.97, "obs_144_mhz": 144.8970}, + {"time_sec": 90, "velocity_kms": 6.38, "doppler_434_khz": -9.25, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.08, "obs_144_mhz": 144.8969}, + {"time_sec": 100, "velocity_kms": 6.55, "doppler_434_khz": -9.51, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.17, "obs_144_mhz": 144.8968}, + {"time_sec": 110, "velocity_kms": 6.69, "doppler_434_khz": -9.71, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, + {"time_sec": 120, "velocity_kms": 6.81, "doppler_434_khz": -9.87, "obs_434_mhz": 434.8901, "doppler_144_khz": -3.29, "obs_144_mhz": 144.8967}, + {"time_sec": 130, "velocity_kms": 6.90, "doppler_434_khz": -10.01, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, + {"time_sec": 140, "velocity_kms": 6.97, "doppler_434_khz": -10.12, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.37, "obs_144_mhz": 144.8966}, + {"time_sec": 150, "velocity_kms": 7.04, "doppler_434_khz": -10.21, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.40, "obs_144_mhz": 144.8966}, + {"time_sec": 160, "velocity_kms": 7.09, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.43, "obs_144_mhz": 144.8966}, + {"time_sec": 170, "velocity_kms": 7.13, "doppler_434_khz": -10.35, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.45, "obs_144_mhz": 144.8966}, + {"time_sec": 180, "velocity_kms": 7.17, "doppler_434_khz": -10.40, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.47, "obs_144_mhz": 144.8965} + ] +} + +def update_doppler(): + + try: + global start_time + global tx_doppler_freq_hz + global rx_doppler_freq_hz + global rxpl_value + global txpl_value + global sq + global doppler_table + global mode + global tx + print("update_doppler") + try: + relative_time = (time.perf_counter() - start_time) % 370 + except: + start_time = time.perf_counter() + relative_time = (time.perf_counter() - start_time) % 370 + index = int(relative_time/10) + print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") + table_row = doppler_table[index] + rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + if (mode == 'e'): + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + else: + tx_doppler_shift_hz = rx_doppler_shift_hz + tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + + except: + print("update_doppler failed") + + tx_value = '0' + rx_value = '0' + sq = '0' + tx = '434.9000' + rx = '435.0000' + txr = '144.9000' + sim_mode = False + sim_config = False + doppler_mode = "off" + try: + file = open("/home/pi/CubeSatSim/sim.cfg") + config = file.readline().split() + if len(config) > 6: + txf = float(config[6]) + tx = "{:.4f}".format(txf) + if (mode == 'e'): + txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + txr = "{:.4f}".format(txrf) + print("Transmit frequency: ",txr) + else: + print("Transmit frequency: ",tx) + if len(config) > 7: + rxf = float(config[7]) + rx = "{:.4f}".format(rxf) + print(rx) + if len(config) > 9: + rxpl = float(config[9]) +# print(rxpl) +# print( "{:.0f}".format(rxpl)) + rxpl_value = "{:.0f}".format(rxpl) + print(rxpl_value) + if len(config) > 10: + txpl = float(config[10]) +# print(txpl) +# print( "{:.0f}".format(txpl)) + txpl_value = "{:.0f}".format(txpl) + print(txpl_value) + if len(config) > 13: + if config[13] == 'sim': + doppler_mode = 'sim' + print("Simulated Doppler frequency shift is enabled.") + if config[13] == 'rig': + doppler_mode = 'rig' + print("rigctl Doppler frequency shift is enabled.") + else: + system("sudo systemctl stop rigctld") + else: + system("sudo systemctl stop rigctld") + print(config) + print +# print(callsign) + print(sq) +# if sq == '8': +# print("squelch set to 8, no command input!") +# no_command = True +# else: + no_command = False + print(no_command) + except: + if (debug_mode == 1): + print("Can't read sim.cfg file") + file.close() + +if (doppler_mode == 'off'): + tx_freq_hz = txf * 1000 + rx_freq_hz = txf * 1000 + with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + file.write(f"{tx_freq_hz:.0f} {rx_freq_hz:.0f}") + while True: + sleep(1) + +if (doppler_mode == 'sim'): + print("Sim mode") + start_time = time.perf_counter() + current_index = 0; + while True: + relative_time = (time.perf_counter() - start_time) % 370 + index = int(relative_time/10) + if (index > current_index): + current_index = index + print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") + table_row = doppler_table[index] + rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + if (mode == 'e'): + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + else: + tx_doppler_shift_hz = rx_doppler_shift_hz + tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + + with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + file.write(f"{tx_doppler_freq_hz:.0f} {rx_doppler_freq_hz:.0f}") + sleep(1) + +if (doppler_mode == 'rig'): + print("rig mode") + while True: + sleep(1) + From d01790fac82553c32c94177a7f63687716e29e73 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:40:01 -0400 Subject: [PATCH 1120/1744] Update frequency.py fix indent --- frequency.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/frequency.py b/frequency.py index 3cfa0561..3337340b 100644 --- a/frequency.py +++ b/frequency.py @@ -358,21 +358,21 @@ if (doppler_mode == 'sim'): relative_time = (time.perf_counter() - start_time) % 370 index = int(relative_time/10) if (index > current_index): - current_index = index - print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") - table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 - if (mode == 'e'): - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 - else: - tx_doppler_shift_hz = rx_doppler_shift_hz - tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + current_index = index + print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") + table_row = doppler_table[index] + rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + if (mode == 'e'): + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + else: + tx_doppler_shift_hz = rx_doppler_shift_hz + tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: - file.write(f"{tx_doppler_freq_hz:.0f} {rx_doppler_freq_hz:.0f}") + with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + file.write(f"{tx_doppler_freq_hz:.0f} {rx_doppler_freq_hz:.0f}") sleep(1) if (doppler_mode == 'rig'): From 148a0a19b00cc9abbf0ce176cfbeeac1730b8e7c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:42:04 -0400 Subject: [PATCH 1121/1744] Update frequency.py fix spacing --- frequency.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/frequency.py b/frequency.py index 3337340b..1cff02c9 100644 --- a/frequency.py +++ b/frequency.py @@ -358,21 +358,21 @@ if (doppler_mode == 'sim'): relative_time = (time.perf_counter() - start_time) % 370 index = int(relative_time/10) if (index > current_index): - current_index = index - print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") - table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 - if (mode == 'e'): - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 - else: - tx_doppler_shift_hz = rx_doppler_shift_hz - tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + current_index = index + print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") + table_row = doppler_table[index] + rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + if (mode == 'e'): + tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + else: + tx_doppler_shift_hz = rx_doppler_shift_hz + tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: - file.write(f"{tx_doppler_freq_hz:.0f} {rx_doppler_freq_hz:.0f}") + with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + file.write(f"{tx_doppler_freq_hz:.0f} {rx_doppler_freq_hz:.0f}") sleep(1) if (doppler_mode == 'rig'): From 632d68d7dc8a7da709b9d282490b8da188d55c42 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:45:25 -0400 Subject: [PATCH 1122/1744] Update frequency.py fix exception --- frequency.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frequency.py b/frequency.py index 1cff02c9..f366d571 100644 --- a/frequency.py +++ b/frequency.py @@ -279,6 +279,7 @@ def update_doppler(): except: print("update_doppler failed") +try: tx_value = '0' rx_value = '0' sq = '0' @@ -337,10 +338,14 @@ def update_doppler(): # else: no_command = False print(no_command) - except: - if (debug_mode == 1): - print("Can't read sim.cfg file") + except Exception as e: + print(f"An error occurred: {e}") + if (debug_mode == 1): + print("Can't read sim.cfg file") file.close() + +except Exception as e: + print(f"An error occurred: {e}") if (doppler_mode == 'off'): tx_freq_hz = txf * 1000 From 97d21833adac573f3c753cdf9dc25c51c878b1cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:47:48 -0400 Subject: [PATCH 1123/1744] Update frequency.py indent --- frequency.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/frequency.py b/frequency.py index f366d571..525108a0 100644 --- a/frequency.py +++ b/frequency.py @@ -336,16 +336,16 @@ try: # print("squelch set to 8, no command input!") # no_command = True # else: - no_command = False - print(no_command) + no_command = False + print(no_command) except Exception as e: print(f"An error occurred: {e}") if (debug_mode == 1): print("Can't read sim.cfg file") file.close() -except Exception as e: - print(f"An error occurred: {e}") + except Exception as e: + print(f"An error occurred: {e}") if (doppler_mode == 'off'): tx_freq_hz = txf * 1000 From 2b30f7e0fae79abb0a9622da8536eb125fa8a987 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:49:29 -0400 Subject: [PATCH 1124/1744] Update frequency.py indent --- frequency.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frequency.py b/frequency.py index 525108a0..10e05b6f 100644 --- a/frequency.py +++ b/frequency.py @@ -336,16 +336,16 @@ try: # print("squelch set to 8, no command input!") # no_command = True # else: - no_command = False - print(no_command) + no_command = False + print(no_command) except Exception as e: - print(f"An error occurred: {e}") - if (debug_mode == 1): - print("Can't read sim.cfg file") + print(f"An error occurred: {e}") + if (debug_mode == 1): + print("Can't read sim.cfg file") file.close() - except Exception as e: - print(f"An error occurred: {e}") +except Exception as e: + print(f"An error occurred: {e}") if (doppler_mode == 'off'): tx_freq_hz = txf * 1000 From ddd29954d7137967370a53f84ceda2f63b056dbb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:50:08 -0400 Subject: [PATCH 1125/1744] Update frequency.py indents --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index 10e05b6f..4d22f7fa 100644 --- a/frequency.py +++ b/frequency.py @@ -338,7 +338,7 @@ try: # else: no_command = False print(no_command) - except Exception as e: + except Exception as e: print(f"An error occurred: {e}") if (debug_mode == 1): print("Can't read sim.cfg file") From 1c3549599f2364b60bc30a143539a6608914e35b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:52:40 -0400 Subject: [PATCH 1126/1744] Update frequency.py add mode --- frequency.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/frequency.py b/frequency.py index 4d22f7fa..e6989a12 100644 --- a/frequency.py +++ b/frequency.py @@ -289,6 +289,19 @@ try: sim_mode = False sim_config = False doppler_mode = "off" + debug_mode = True + + try: + file = open("/home/pi/CubeSatSim/.mode") + mode = file.read(1) + except: + mode = 'f' + if (debug_mode == 1): + print("Can't open .mode file, defaulting to FSK") + file.close() + print("Mode is: ") + print(mode) + try: file = open("/home/pi/CubeSatSim/sim.cfg") config = file.readline().split() From ecee07227250b8c6c558b869ec741f41f0d5be11 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:54:24 -0400 Subject: [PATCH 1127/1744] Update frequency.py add target_pass --- frequency.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frequency.py b/frequency.py index e6989a12..2dba38c8 100644 --- a/frequency.py +++ b/frequency.py @@ -370,6 +370,10 @@ if (doppler_mode == 'off'): if (doppler_mode == 'sim'): print("Sim mode") + TARGET_PASS = 85 # Maximum elevation profile + doppler_table = iss_doppler_passes[TARGET_PASS] + print(f"Pass Max Elevation: {TARGET_PASS}°") + start_time = time.perf_counter() current_index = 0; while True: From 82f8226997df8ff5e479e0601639792140744b93 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 16:57:04 -0400 Subject: [PATCH 1128/1744] Update frequency.py add start_hz --- frequency.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frequency.py b/frequency.py index 2dba38c8..349d545e 100644 --- a/frequency.py +++ b/frequency.py @@ -370,6 +370,17 @@ if (doppler_mode == 'off'): if (doppler_mode == 'sim'): print("Sim mode") + + if (mode == 'e'): + tx_doppler_start_hz = txrf * 1e6 + else: + tx_doppler_start_hz = txf * 1e6 + tx_doppler_shift_hz = 0 + print(f"Tx center frequency: {tx_doppler_start_hz}") + rx_doppler_start_hz = rxf * 1e6 + rx_doppler_shift_hz = 0 + print(f"Rx center frequency: {rx_doppler_start_hz}") + TARGET_PASS = 85 # Maximum elevation profile doppler_table = iss_doppler_passes[TARGET_PASS] print(f"Pass Max Elevation: {TARGET_PASS}°") From f09a9459cacb0c4e2fb4ba45e7e386f52ca6461f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 17:03:01 -0400 Subject: [PATCH 1129/1744] Update log -f prints frequencies --- log | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/log b/log index e3a4afc5..727d098f 100755 --- a/log +++ b/log @@ -9,6 +9,7 @@ if [ "$1" = "-h" ] ; then echo " -c command and control" echo " -p pacsat" echo " -r rigctld" + echo " -f frequency" echo "Default is the log is dumpted to the screen and written to a file." echo "If an additional r is included, the log is realtime, and exits with a Control-C" echo @@ -40,6 +41,11 @@ if [ "$REALTIME" = "1" ] ; then # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then sudo journalctl -af -u rigctld # > /home/pi/CubeSatSim/logr.txt + elif [ "$1" = "-f" ] ; then + while true; do + cat /home/pi/CubeSatSim/frequency.txt + sleep 5 + done else sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt # cat /home/pi/CubeSatSim/log.txt @@ -64,6 +70,8 @@ else sudo journalctl -a -u rigctld > /home/pi/CubeSatSim/logr.txt cat /home/pi/CubeSatSim/logr.txt echo -e "\nrigtcld Log file also saved as /home/pi/CubeSatSim/logr.txt" + elif [ "$1" = "-f" ] ; then + cat /home/pi/CubeSatSim/frequency.txt else sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt From bcef0c8d0a6efa0eaee6f227cbf467ac1646ab7c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 17:05:16 -0400 Subject: [PATCH 1130/1744] Update frequency.py add modulo 37 --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index 349d545e..1a038230 100644 --- a/frequency.py +++ b/frequency.py @@ -389,7 +389,7 @@ if (doppler_mode == 'sim'): current_index = 0; while True: relative_time = (time.perf_counter() - start_time) % 370 - index = int(relative_time/10) + index = int(relative_time/10) % 37 if (index > current_index): current_index = index print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") From dcfa155d7c582f05c7f0c4e1e4d1086478b26bb4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 17:07:09 -0400 Subject: [PATCH 1131/1744] Update log add newline for -f --- log | 1 + 1 file changed, 1 insertion(+) diff --git a/log b/log index 727d098f..cb2c860d 100755 --- a/log +++ b/log @@ -44,6 +44,7 @@ if [ "$REALTIME" = "1" ] ; then elif [ "$1" = "-f" ] ; then while true; do cat /home/pi/CubeSatSim/frequency.txt + echo sleep 5 done else From 14762e50893875204af4208484d0e7cdcf40a5a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 17:17:21 -0400 Subject: [PATCH 1132/1744] Update transmit.py add read --- transmit.py | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/transmit.py b/transmit.py index 6e006fb8..c9569f08 100644 --- a/transmit.py +++ b/transmit.py @@ -523,29 +523,29 @@ def update_doppler(fm): global mode global tx print("update_doppler") - try: - relative_time = (time.perf_counter() - start_time) % 370 - except: - start_time = time.perf_counter() - relative_time = (time.perf_counter() - start_time) % 370 - index = int(relative_time/10) - print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") - table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 - if (mode == 'e'): - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + + with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: + frequencies = file.read().split() + + new_tx_frequency = int(frequencies[0]) + new_rx_frequency = int(frequencies[1]) + + print(f"New frequencies: {new_tx_frequency}, Second number: {new_tx_frequency}") + + if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): + tx_doppler_freq_hz = new_tx_frequency + rx_doppler_freq_hz = new_rx_frequency + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + if (fm != "no"): + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + if (mode != 'e'): + tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) + print(tx) + program_fm(rx,tx,rxpl_value,sq,txpl_value) else: - tx_doppler_shift_hz = rx_doppler_shift_hz - tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - if (fm != "no"): - rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) - if (mode != 'e'): - tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) - print(tx) - program_fm(rx,tx,rxpl_value,sq,txpl_value) + print("No frequency changes!") except: print("update_doppler failed") From c3f8ea4227b23c3fcdad7d2842e68ac3c43597bf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 17:26:23 -0400 Subject: [PATCH 1133/1744] Update transmit.py add tx_doppler_freq_hz = 0 --- transmit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transmit.py b/transmit.py index c9569f08..4f07ee2d 100644 --- a/transmit.py +++ b/transmit.py @@ -678,6 +678,9 @@ debug_mode = 0 # change to 1 to debug transmit skip = False +tx_doppler_freq_hz = 0 +rx_doppler_freq_hz = 0 + if __name__ == "__main__": mode = "y" if (len(sys.argv)) > 1: From 75b6a99ed9d6c11ce7c3ee8f8787fc3b6c1ad100 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 2 Jul 2026 23:31:37 -0400 Subject: [PATCH 1134/1744] Update install add cd for ft857 update --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 8add5b1d..54e037ed 100755 --- a/install +++ b/install @@ -868,6 +868,7 @@ git pull --no-rebase > .updated_p if [[ $(grep 'changed' //home/pi/FT857d/.updated_p) ]]; then echo "updating FT857d" + cd examples/FT857d g++ main.c ../../src/ft857d.cpp -lwiringPi -o ft857d else echo "nothing to do for FT857d." From 87fa59401739815d7c6dbcdc9fe0859a92d4133d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:04:36 -0400 Subject: [PATCH 1135/1744] Update and rename rigctld.service to frequency.service --- systemd/{rigctld.service => frequency.service} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename systemd/{rigctld.service => frequency.service} (72%) diff --git a/systemd/rigctld.service b/systemd/frequency.service similarity index 72% rename from systemd/rigctld.service rename to systemd/frequency.service index f40d7c1c..00624d13 100644 --- a/systemd/rigctld.service +++ b/systemd/frequency.service @@ -1,9 +1,9 @@ [Unit] -Description=rigctld +Description=frequency [Service] TimeoutStopSec=5 -ExecStart=/home/pi/CubeSatSim/rigctld.sh +ExecStart=/home/pi/CubeSatSim/frequency.sh WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit From 76be6af3dff0f7f3e0e407252a8681effa51bf40 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:05:55 -0400 Subject: [PATCH 1136/1744] Update log change rigctld to frequency --- log | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log b/log index cb2c860d..81449726 100755 --- a/log +++ b/log @@ -40,7 +40,7 @@ if [ "$REALTIME" = "1" ] ; then cat /home/pi/CubeSatSim/logp.txt # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then - sudo journalctl -af -u rigctld # > /home/pi/CubeSatSim/logr.txt + sudo journalctl -af -u frequency # > /home/pi/CubeSatSim/logr.txt elif [ "$1" = "-f" ] ; then while true; do cat /home/pi/CubeSatSim/frequency.txt @@ -68,7 +68,7 @@ else cat /home/pi/CubeSatSim/logp.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then - sudo journalctl -a -u rigctld > /home/pi/CubeSatSim/logr.txt + sudo journalctl -a -u frequency > /home/pi/CubeSatSim/logr.txt cat /home/pi/CubeSatSim/logr.txt echo -e "\nrigtcld Log file also saved as /home/pi/CubeSatSim/logr.txt" elif [ "$1" = "-f" ] ; then From 3891a61b84a27979d2136154c4ab6f1c39ea0d01 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:07:50 -0400 Subject: [PATCH 1137/1744] Update and rename rigctld.sh to frequency.sh --- frequency.sh | 5 +++++ rigctld.sh | 23 ----------------------- 2 files changed, 5 insertions(+), 23 deletions(-) create mode 100755 frequency.sh delete mode 100755 rigctld.sh diff --git a/frequency.sh b/frequency.sh new file mode 100755 index 00000000..7a81fd07 --- /dev/null +++ b/frequency.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +echo "Starting frequency control" + +python3 /home/pi/CubeSatSim/frequency.py diff --git a/rigctld.sh b/rigctld.sh deleted file mode 100755 index 5c4b5e81..00000000 --- a/rigctld.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -sudo killall -9 ft857d &>/dev/null -sudo killall -9 socat &>/dev/null -sudo killall -9 rigctld &>/dev/null - -echo "Starting virtual serial ports /tmp/vttyA and /tmp/vttyB" - -socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB & - -sleep 1 - -echo "Starting CubeSatSim FT857 emulation" - -/home/pi/FT857d/examples/FT857d/ft857d & - -sleep 1 - -echo "Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB" - -rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv - -echo "rigctld ended" From f7ab3657d83dcc32f44758295c083d740fe49ca5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:11:39 -0400 Subject: [PATCH 1138/1744] Update frequency.py add rigctld code --- frequency.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index 1a038230..ec18eea9 100644 --- a/frequency.py +++ b/frequency.py @@ -411,5 +411,24 @@ if (doppler_mode == 'sim'): if (doppler_mode == 'rig'): print("rig mode") while True: - sleep(1) + + system("sudo killall -9 ft857d &>/dev/null") + system("udo killall -9 socat &>/dev/null") + system("sudo killall -9 rigctld &>/dev/null") + + print("Starting virtual serial ports /tmp/vttyA and /tmp/vttyB") + + system("socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB &") + + sleep(1.0) + + print("Starting CubeSatSim FT857 emulation") + system("/home/pi/FT857d/examples/FT857d/ft857d &") + + sleep(1.0) + + print("Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB") + system("rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv") + + print("rigctld ended") From fff269293ae039aa3f51a152658fdf96baf8ab00 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:13:21 -0400 Subject: [PATCH 1139/1744] Update install change to frequency.service --- install | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install b/install index 54e037ed..d3b7a837 100755 --- a/install +++ b/install @@ -718,18 +718,18 @@ else FLAG=1 fi -FILE=/etc/systemd/system/rigctld.service +FILE=/etc/systemd/system/frequency.service if [ -f "$FILE" ]; then - if [[ $(diff /home/pi/CubeSatSim/systemd/rigctld.service /etc/systemd/system/rigctld.service) ]]; then - echo "changed rigctld.service." - sudo cp /home/pi/CubeSatSim/systemd/rigctld.service /etc/systemd/system/rigctld.service + if [[ $(diff /home/pi/CubeSatSim/systemd/frequency.service /etc/systemd/system/frequency.service) ]]; then + echo "changed frequency.service." + sudo cp /home/pi/CubeSatSim/systemd/frequency.service /etc/systemd/system/frequency.service FLAG=1 else - echo "no change to rigctld.service." + echo "no change to frequency.service." fi else - echo "creating rigctld.service." - sudo cp /home/pi/CubeSatSim/systemd/rigctld.service /etc/systemd/system/rigctld.service + echo "creating frequency.service." + sudo cp /home/pi/CubeSatSim/systemd/frequency.service /etc/systemd/system/frequency.service FLAG=1 fi From 8b81eb0c471fb6bd54fb7bc543e273556459aec4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:21:29 -0400 Subject: [PATCH 1140/1744] Update log add blank line for -f --- log | 1 + 1 file changed, 1 insertion(+) diff --git a/log b/log index 81449726..020510dc 100755 --- a/log +++ b/log @@ -73,6 +73,7 @@ else echo -e "\nrigtcld Log file also saved as /home/pi/CubeSatSim/logr.txt" elif [ "$1" = "-f" ] ; then cat /home/pi/CubeSatSim/frequency.txt + echo else sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt From 79d4bceb4561ba7776f503dee60d526799a59cf3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:26:12 -0400 Subject: [PATCH 1141/1744] Update log add backspaces --- log | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/log b/log index 020510dc..534432e9 100755 --- a/log +++ b/log @@ -8,8 +8,8 @@ if [ "$1" = "-h" ] ; then echo " -t transmit" echo " -c command and control" echo " -p pacsat" - echo " -r rigctld" - echo " -f frequency" + echo " -r frequency control" + echo " -f frequency display" echo "Default is the log is dumpted to the screen and written to a file." echo "If an additional r is included, the log is realtime, and exits with a Control-C" echo @@ -44,8 +44,9 @@ if [ "$REALTIME" = "1" ] ; then elif [ "$1" = "-f" ] ; then while true; do cat /home/pi/CubeSatSim/frequency.txt - echo +# echo sleep 5 + echo "/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b" done else sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt @@ -69,8 +70,8 @@ else echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then sudo journalctl -a -u frequency > /home/pi/CubeSatSim/logr.txt - cat /home/pi/CubeSatSim/logr.txt - echo -e "\nrigtcld Log file also saved as /home/pi/CubeSatSim/logr.txt" + cat /home/pi/CubeSatSim/logf.txt + echo -e "\nFrequency Log file also saved as /home/pi/CubeSatSim/logf.txt" elif [ "$1" = "-f" ] ; then cat /home/pi/CubeSatSim/frequency.txt echo From ef8f654c4ea50d9874b14d95149a59195379c506 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:27:43 -0400 Subject: [PATCH 1142/1744] Update log backspace print --- log | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log b/log index 534432e9..a9886927 100755 --- a/log +++ b/log @@ -1,4 +1,4 @@ -#!/bin/bash +#!\bin\bash echo -e "\nLog file script for CubeSatSim\n" @@ -46,7 +46,7 @@ if [ "$REALTIME" = "1" ] ; then cat /home/pi/CubeSatSim/frequency.txt # echo sleep 5 - echo "/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b/b" + echo "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" done else sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt From 03223b348a26cfa6316dcd56548a9174e439ed14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:30:07 -0400 Subject: [PATCH 1143/1744] Update log fix bin bash --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index a9886927..bc35b63a 100755 --- a/log +++ b/log @@ -1,4 +1,4 @@ -#!\bin\bash +#!/bin/bash echo -e "\nLog file script for CubeSatSim\n" From 05e4e9ff4938f45f8f1723f3d9918719458887ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:31:13 -0400 Subject: [PATCH 1144/1744] Update log add -e --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index bc35b63a..eeca2ed1 100755 --- a/log +++ b/log @@ -46,7 +46,7 @@ if [ "$REALTIME" = "1" ] ; then cat /home/pi/CubeSatSim/frequency.txt # echo sleep 5 - echo "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" + echo -e "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" done else sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt From 439c9959f202560e6f5183b6a4bbe9ab455156f1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:33:45 -0400 Subject: [PATCH 1145/1744] Update log no newline on cat --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index eeca2ed1..b9f8817f 100755 --- a/log +++ b/log @@ -43,7 +43,7 @@ if [ "$REALTIME" = "1" ] ; then sudo journalctl -af -u frequency # > /home/pi/CubeSatSim/logr.txt elif [ "$1" = "-f" ] ; then while true; do - cat /home/pi/CubeSatSim/frequency.txt + cat /home/pi/CubeSatSim/frequency.txt | tr -d '\n' # echo sleep 5 echo -e "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" From be43adfe0dfa1bdca33562c2a7c2294bcf0d72a0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:36:07 -0400 Subject: [PATCH 1146/1744] Update log printf --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index b9f8817f..72f809ac 100755 --- a/log +++ b/log @@ -46,7 +46,7 @@ if [ "$REALTIME" = "1" ] ; then cat /home/pi/CubeSatSim/frequency.txt | tr -d '\n' # echo sleep 5 - echo -e "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" + printf "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" done else sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt From c2f4927fcd74fc5e40312183cadcc9ffc724bd4e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:39:56 -0400 Subject: [PATCH 1147/1744] Update transmit.py change to frequency.service --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 4f07ee2d..0d6f9ff5 100644 --- a/transmit.py +++ b/transmit.py @@ -829,10 +829,11 @@ if __name__ == "__main__": if len(config) > 13: if config[13] == 'sim': doppler_mode = True + system("sudo systemctl restart frequency") print("Simulated Doppler frequency shift is enabled.") - if config[13] == 'rig': + elif config[13] == 'rig': doppler_mode = True - system("sudo systemctl restart rigctld") + system("sudo systemctl restart frequency") print("rigctl Doppler frequency shift is enabled.") else: system("sudo systemctl stop rigctld") From b3d0805b0a49bf3cbd38f841a00c74495f2baaf3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 4 Jul 2026 07:41:54 -0400 Subject: [PATCH 1148/1744] Update frequency.py fix tab --- frequency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frequency.py b/frequency.py index ec18eea9..f75cb8fc 100644 --- a/frequency.py +++ b/frequency.py @@ -420,12 +420,12 @@ if (doppler_mode == 'rig'): system("socat -d -d PTY,raw,echo=0,link=/tmp/vttyA PTY,raw,echo=0,link=/tmp/vttyB &") - sleep(1.0) + sleep(1.0) print("Starting CubeSatSim FT857 emulation") system("/home/pi/FT857d/examples/FT857d/ft857d &") - sleep(1.0) + sleep(1.0) print("Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB") system("rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv") From 2f8313f9cd8a0bfe9a6b9278f06b217ed3f15f3e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 09:50:49 -0400 Subject: [PATCH 1149/1744] Update frequency.py fix doppler_mode off --- frequency.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frequency.py b/frequency.py index f75cb8fc..0d76b9ad 100644 --- a/frequency.py +++ b/frequency.py @@ -338,9 +338,11 @@ try: doppler_mode = 'rig' print("rigctl Doppler frequency shift is enabled.") else: - system("sudo systemctl stop rigctld") + doppler_mode = 'off' + print("Doppler frequency shift is disabled.") else: - system("sudo systemctl stop rigctld") + doppler_mode = 'off' + print("Doppler frequency shift is disabled.") print(config) print # print(callsign) From 1b63cfa816a4194154740e899dc03eae32918fb8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 09:52:31 -0400 Subject: [PATCH 1150/1744] Update log fix cat logr.txt --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index 72f809ac..472c8421 100755 --- a/log +++ b/log @@ -70,7 +70,7 @@ else echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then sudo journalctl -a -u frequency > /home/pi/CubeSatSim/logr.txt - cat /home/pi/CubeSatSim/logf.txt + cat /home/pi/CubeSatSim/logr.txt echo -e "\nFrequency Log file also saved as /home/pi/CubeSatSim/logf.txt" elif [ "$1" = "-f" ] ; then cat /home/pi/CubeSatSim/frequency.txt From d3c20c53a4538ec50fda2d425f2f48cb110ab18c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 09:55:29 -0400 Subject: [PATCH 1151/1744] Update frequency.py fix elseif --- frequency.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frequency.py b/frequency.py index 0d76b9ad..b5637557 100644 --- a/frequency.py +++ b/frequency.py @@ -334,7 +334,7 @@ try: if config[13] == 'sim': doppler_mode = 'sim' print("Simulated Doppler frequency shift is enabled.") - if config[13] == 'rig': + elif config[13] == 'rig': doppler_mode = 'rig' print("rigctl Doppler frequency shift is enabled.") else: @@ -364,7 +364,8 @@ except Exception as e: if (doppler_mode == 'off'): tx_freq_hz = txf * 1000 - rx_freq_hz = txf * 1000 + rx_freq_hz = rxf * 1000 + print("writing sim.cfg frequency to frequency.txt") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{tx_freq_hz:.0f} {rx_freq_hz:.0f}") while True: From 5697a6ae3570dc84507894460c18f094c6c76fe8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 09:58:41 -0400 Subject: [PATCH 1152/1744] Update frequency.service changed to run python directly --- systemd/frequency.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/frequency.service b/systemd/frequency.service index 00624d13..03ecb550 100644 --- a/systemd/frequency.service +++ b/systemd/frequency.service @@ -3,7 +3,7 @@ Description=frequency [Service] TimeoutStopSec=5 -ExecStart=/home/pi/CubeSatSim/frequency.sh +ExecStart=python3 -u /home/pi/CubeSatSim/frequency.py WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit From bdd58ad9ebd8807bca5a4e4cfb669ea4fd938d1e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:05:31 -0400 Subject: [PATCH 1153/1744] Update transmit.py always start frequency.service --- transmit.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index 0d6f9ff5..d54a1f89 100644 --- a/transmit.py +++ b/transmit.py @@ -624,6 +624,8 @@ def transmit_carrier(duration): print("CubeSatSim v2.2 transmit.py starting...") +system("sudo systemctl restart frequency") + pd = 21 ptt = 20 txc_pin = 7 @@ -829,14 +831,14 @@ if __name__ == "__main__": if len(config) > 13: if config[13] == 'sim': doppler_mode = True - system("sudo systemctl restart frequency") +# system("sudo systemctl restart frequency") print("Simulated Doppler frequency shift is enabled.") elif config[13] == 'rig': doppler_mode = True - system("sudo systemctl restart frequency") +# system("sudo systemctl restart frequency") print("rigctl Doppler frequency shift is enabled.") - else: - system("sudo systemctl stop rigctld") +# else: +# system("sudo systemctl stop rigctld") else: system("sudo systemctl stop rigctld") print(config) From 5a3dee5ad6947213c6216b4f27e7ee118ae66090 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:38:15 -0400 Subject: [PATCH 1154/1744] Update frequency.py change to MHz --- frequency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frequency.py b/frequency.py index b5637557..fdb96b88 100644 --- a/frequency.py +++ b/frequency.py @@ -363,8 +363,8 @@ except Exception as e: print(f"An error occurred: {e}") if (doppler_mode == 'off'): - tx_freq_hz = txf * 1000 - rx_freq_hz = rxf * 1000 + tx_freq_hz = txf * 1e6 + rx_freq_hz = rxf * 1e6 print("writing sim.cfg frequency to frequency.txt") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{tx_freq_hz:.0f} {rx_freq_hz:.0f}") From ffa94e0f1b9da33e5828a6cd5ca3291a92aa47a7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:41:30 -0400 Subject: [PATCH 1155/1744] Update transmit.py shorten morse timing --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d54a1f89..0dd6ef27 100644 --- a/transmit.py +++ b/transmit.py @@ -632,7 +632,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.15 +morse_timing = 0.6 command_tx = True From e65327013c6c6119c655d869a182d88005f370ad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:43:35 -0400 Subject: [PATCH 1156/1744] Update transmit.py shorten morse timing more --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 0dd6ef27..72a1ef02 100644 --- a/transmit.py +++ b/transmit.py @@ -632,7 +632,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.6 +morse_timing = 0.06 command_tx = True From 658807d2c04944e6e4339311adb32626ed8bf3df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:45:57 -0400 Subject: [PATCH 1157/1744] Update transmit.py fix morse_timing --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 72a1ef02..3e662eed 100644 --- a/transmit.py +++ b/transmit.py @@ -611,8 +611,8 @@ def cw_transmit_char(character): while (morse_table[(ord(character.upper()) - ord('0')) % 44][i] != 0): transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing); i=i+1 - sleep(morse_timing * 0.7); - sleep(morse_timing * 1.5); + sleep(morse_timing * 1.0); + sleep(morse_timing * 1.0); # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From a496d46ee581a163ca8ec6d7d3d2ff2fe95653c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:47:17 -0400 Subject: [PATCH 1158/1744] Update transmit.py slower morse --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 3e662eed..e04c034e 100644 --- a/transmit.py +++ b/transmit.py @@ -632,7 +632,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.06 +morse_timing = 0.1 command_tx = True From bb390cbcbb0f92d3fdf71b1850ae0de596d888d7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:52:12 -0400 Subject: [PATCH 1159/1744] Update transmit.py print duration --- transmit.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index e04c034e..3de3fd67 100644 --- a/transmit.py +++ b/transmit.py @@ -608,11 +608,14 @@ def cw_transmit_char(character): global morse_timing update_doppler("no") i = 0 - while (morse_table[(ord(character.upper()) - ord('0')) % 44][i] != 0): - transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing); + duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] + print(duration) + while (duration != 0): + transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing) + sleep(morse_timing * 1.0) i=i+1 - sleep(morse_timing * 1.0); - sleep(morse_timing * 1.0); # 1.5); + duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] + sleep(morse_timing * 0.7) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From 15b15219fa0a96b13a25b4c3107bb5862b098b57 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 10:54:45 -0400 Subject: [PATCH 1160/1744] Update transmit.py duration * morse_timing --- transmit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 3de3fd67..dcaf09e5 100644 --- a/transmit.py +++ b/transmit.py @@ -608,13 +608,13 @@ def cw_transmit_char(character): global morse_timing update_doppler("no") i = 0 - duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] + duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing print(duration) while (duration != 0): - transmit_carrier(morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing) + transmit_carrier(duration) sleep(morse_timing * 1.0) i=i+1 - duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] + duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing sleep(morse_timing * 0.7) # 1.5); def transmit_carrier(duration): From 21d057cb3f5626b115c48c9de8a3790ada2bc54c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:02:11 -0400 Subject: [PATCH 1161/1744] Update transmit.py fix timing --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index dcaf09e5..128caf8c 100644 --- a/transmit.py +++ b/transmit.py @@ -615,7 +615,7 @@ def cw_transmit_char(character): sleep(morse_timing * 1.0) i=i+1 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing - sleep(morse_timing * 0.7) # 1.5); + sleep(morse_timing * 1.0) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From a37396f96ecc50dd4d0d43d471aa758426cb38cf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:07:28 -0400 Subject: [PATCH 1162/1744] Update transmit.py shorten duration between --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 128caf8c..01586a64 100644 --- a/transmit.py +++ b/transmit.py @@ -615,7 +615,7 @@ def cw_transmit_char(character): sleep(morse_timing * 1.0) i=i+1 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing - sleep(morse_timing * 1.0) # 1.5); + sleep(morse_timing * 0.3) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From 3e237da6935a1d6d8c707b0f43fb78b6d8143efd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:10:26 -0400 Subject: [PATCH 1163/1744] Update transmit.py change carrier calc --- transmit.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 01586a64..2bb7f7b1 100644 --- a/transmit.py +++ b/transmit.py @@ -620,9 +620,13 @@ def cw_transmit_char(character): def transmit_carrier(duration): global tx_doppler_freq_hz global txLed - command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 +# command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + start = "sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + stop = "sudo killall -9 tune" output(txLed, 1) - system(command) + system(start) + sleep(duration) + system(stop) output(txLed, 0) print("CubeSatSim v2.2 transmit.py starting...") From 1d241c57bf00b0f30aa9f1118fd221246bd6a03e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:14:41 -0400 Subject: [PATCH 1164/1744] Update transmit.py add & --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 2bb7f7b1..4344c238 100644 --- a/transmit.py +++ b/transmit.py @@ -621,7 +621,7 @@ def transmit_carrier(duration): global tx_doppler_freq_hz global txLed # command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 - start = "sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + start = "sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1 &" # 434.9e6 stop = "sudo killall -9 tune" output(txLed, 1) system(start) From 26c9d36b76db64004b63b571bad7b5c1abea5a9c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:17:23 -0400 Subject: [PATCH 1165/1744] Update transmit.py move & --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 4344c238..c33d377f 100644 --- a/transmit.py +++ b/transmit.py @@ -621,7 +621,7 @@ def transmit_carrier(duration): global tx_doppler_freq_hz global txLed # command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 - start = "sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1 &" # 434.9e6 + start = "sudo tune -f " + str(tx_doppler_freq_hz) + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo killall -9 tune" output(txLed, 1) system(start) From 6d8c035a1a7ab9a6cf5ac4c3d2ab89e4ac1b812d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:22:27 -0400 Subject: [PATCH 1166/1744] Update transmit.py change start string --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c33d377f..61920bdd 100644 --- a/transmit.py +++ b/transmit.py @@ -621,7 +621,7 @@ def transmit_carrier(duration): global tx_doppler_freq_hz global txLed # command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 - start = "sudo tune -f " + str(tx_doppler_freq_hz) + " & > /dev/null 2>&1" # 434.9e6 + start = "sudo tune -f " + str(tx_doppler_freq_hz) # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo killall -9 tune" output(txLed, 1) system(start) From 4ff7ff3b7e3d00405000dbe860ea5394aa286049 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:24:06 -0400 Subject: [PATCH 1167/1744] Update transmit.py add back & --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 61920bdd..a08deafe 100644 --- a/transmit.py +++ b/transmit.py @@ -621,7 +621,7 @@ def transmit_carrier(duration): global tx_doppler_freq_hz global txLed # command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 - start = "sudo tune -f " + str(tx_doppler_freq_hz) # + " & > /dev/null 2>&1" # 434.9e6 + start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo killall -9 tune" output(txLed, 1) system(start) From 7ef0cf7b7efbd09cfd1db86d7d8ccad64c36b539 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:33:48 -0400 Subject: [PATCH 1168/1744] Update transmit.py change stop --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index a08deafe..59c8ef6d 100644 --- a/transmit.py +++ b/transmit.py @@ -622,7 +622,7 @@ def transmit_carrier(duration): global txLed # command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 - stop = "sudo killall -9 tune" + stop = "sudo rpitx -f 434.9e6 &" output(txLed, 1) system(start) sleep(duration) From bd14beb9d1fa125d61ad83ac51f3c9085cf406cf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:38:16 -0400 Subject: [PATCH 1169/1744] Update transmit.py change to 3.0 --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 59c8ef6d..2828cd06 100644 --- a/transmit.py +++ b/transmit.py @@ -612,10 +612,10 @@ def cw_transmit_char(character): print(duration) while (duration != 0): transmit_carrier(duration) - sleep(morse_timing * 1.0) + sleep(morse_timing) i=i+1 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing - sleep(morse_timing * 0.3) # 1.5); + sleep(morse_timing * 3.0) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From 3e4ae050fdbc98784b6b5f2517ababef6fa6d28e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 5 Jul 2026 11:41:58 -0400 Subject: [PATCH 1170/1744] Update transmit.py add kills --- transmit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transmit.py b/transmit.py index 2828cd06..48330c83 100644 --- a/transmit.py +++ b/transmit.py @@ -623,11 +623,15 @@ def transmit_carrier(duration): # command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" + killrpitx = "sudo killall -9 rpitx &" + killtune = "sudo killall -9 tune &" output(txLed, 1) system(start) sleep(duration) system(stop) output(txLed, 0) + system(killrpitx) + system(killtune) print("CubeSatSim v2.2 transmit.py starting...") From b57d9442d487364eef238b6affb9ee083db0deca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 11:20:33 -0400 Subject: [PATCH 1171/1744] Update frequency.py update table for 88 target pass --- frequency.py | 903 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 666 insertions(+), 237 deletions(-) diff --git a/frequency.py b/frequency.py index fdb96b88..68635640 100644 --- a/frequency.py +++ b/frequency.py @@ -9,239 +9,668 @@ from os import system iss_doppler_passes = { - 5: [ - {"time_sec": -180, "velocity_kms": -4.00, "doppler_434_khz": 5.79, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, - {"time_sec": -170, "velocity_kms": -3.89, "doppler_434_khz": 5.64, "obs_434_mhz": 434.9056, "doppler_144_khz": 1.88, "obs_144_mhz": 144.9019}, - {"time_sec": -160, "velocity_kms": -3.78, "doppler_434_khz": 5.48, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.83, "obs_144_mhz": 144.9018}, - {"time_sec": -150, "velocity_kms": -3.67, "doppler_434_khz": 5.32, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.77, "obs_144_mhz": 144.9018}, - {"time_sec": -140, "velocity_kms": -3.54, "doppler_434_khz": 5.14, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.71, "obs_144_mhz": 144.9017}, - {"time_sec": -130, "velocity_kms": -3.42, "doppler_434_khz": 4.96, "obs_434_mhz": 434.9050, "doppler_144_khz": 1.65, "obs_144_mhz": 144.9017}, - {"time_sec": -120, "velocity_kms": -3.28, "doppler_434_khz": 4.76, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.59, "obs_144_mhz": 144.9016}, - {"time_sec": -110, "velocity_kms": -3.14, "doppler_434_khz": 4.55, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.52, "obs_144_mhz": 144.9015}, - {"time_sec": -100, "velocity_kms": -2.99, "doppler_434_khz": 4.33, "obs_434_mhz": 434.9043, "doppler_144_khz": 1.44, "obs_144_mhz": 144.9014}, - {"time_sec": -90, "velocity_kms": -2.83, "doppler_434_khz": 4.10, "obs_434_mhz": 434.9041, "doppler_144_khz": 1.37, "obs_144_mhz": 144.9014}, - {"time_sec": -80, "velocity_kms": -2.66, "doppler_434_khz": 3.86, "obs_434_mhz": 434.9039, "doppler_144_khz": 1.29, "obs_144_mhz": 144.9013}, - {"time_sec": -70, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, - {"time_sec": -60, "velocity_kms": -2.29, "doppler_434_khz": 3.32, "obs_434_mhz": 434.9033, "doppler_144_khz": 1.11, "obs_144_mhz": 144.9011}, - {"time_sec": -50, "velocity_kms": -2.09, "doppler_434_khz": 3.03, "obs_434_mhz": 434.9030, "doppler_144_khz": 1.01, "obs_144_mhz": 144.9010}, - {"time_sec": -40, "velocity_kms": -1.87, "doppler_434_khz": 2.71, "obs_434_mhz": 434.9027, "doppler_144_khz": 0.90, "obs_144_mhz": 144.9009}, - {"time_sec": -30, "velocity_kms": -1.63, "doppler_434_khz": 2.37, "obs_434_mhz": 434.9024, "doppler_144_khz": 0.79, "obs_144_mhz": 144.9008}, - {"time_sec": -20, "velocity_kms": -1.33, "doppler_434_khz": 1.93, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, - {"time_sec": -10, "velocity_kms": -0.84, "doppler_434_khz": 1.22, "obs_434_mhz": 434.9012, "doppler_144_khz": 0.41, "obs_144_mhz": 144.9004}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 0.84, "doppler_434_khz": -1.22, "obs_434_mhz": 434.8988, "doppler_144_khz": -0.41, "obs_144_mhz": 144.8996}, - {"time_sec": 20, "velocity_kms": 1.33, "doppler_434_khz": -1.93, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, - {"time_sec": 30, "velocity_kms": 1.63, "doppler_434_khz": -2.37, "obs_434_mhz": 434.8976, "doppler_144_khz": -0.79, "obs_144_mhz": 144.8992}, - {"time_sec": 40, "velocity_kms": 1.87, "doppler_434_khz": -2.71, "obs_434_mhz": 434.8973, "doppler_144_khz": -0.90, "obs_144_mhz": 144.8991}, - {"time_sec": 50, "velocity_kms": 2.09, "doppler_434_khz": -3.03, "obs_434_mhz": 434.8970, "doppler_144_khz": -1.01, "obs_144_mhz": 144.8990}, - {"time_sec": 60, "velocity_kms": 2.29, "doppler_434_khz": -3.32, "obs_434_mhz": 434.8967, "doppler_144_khz": -1.11, "obs_144_mhz": 144.8989}, - {"time_sec": 70, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, - {"time_sec": 80, "velocity_kms": 2.66, "doppler_434_khz": -3.86, "obs_434_mhz": 434.8961, "doppler_144_khz": -1.29, "obs_144_mhz": 144.8987}, - {"time_sec": 90, "velocity_kms": 2.83, "doppler_434_khz": -4.10, "obs_434_mhz": 434.8959, "doppler_144_khz": -1.37, "obs_144_mhz": 144.8986}, - {"time_sec": 100, "velocity_kms": 2.99, "doppler_434_khz": -4.33, "obs_434_mhz": 434.8957, "doppler_144_khz": -1.44, "obs_144_mhz": 144.8986}, - {"time_sec": 110, "velocity_kms": 3.14, "doppler_434_khz": -4.55, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.52, "obs_144_mhz": 144.8985}, - {"time_sec": 120, "velocity_kms": 3.28, "doppler_434_khz": -4.76, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.59, "obs_144_mhz": 144.8984}, - {"time_sec": 130, "velocity_kms": 3.42, "doppler_434_khz": -4.96, "obs_434_mhz": 434.8950, "doppler_144_khz": -1.65, "obs_144_mhz": 144.8983}, - {"time_sec": 140, "velocity_kms": 3.54, "doppler_434_khz": -5.14, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.71, "obs_144_mhz": 144.8983}, - {"time_sec": 150, "velocity_kms": 3.67, "doppler_434_khz": -5.32, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.77, "obs_144_mhz": 144.8982}, - {"time_sec": 160, "velocity_kms": 3.78, "doppler_434_khz": -5.48, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.83, "obs_144_mhz": 144.8982}, - {"time_sec": 170, "velocity_kms": 3.89, "doppler_434_khz": -5.64, "obs_434_mhz": 434.8944, "doppler_144_khz": -1.88, "obs_144_mhz": 144.8981}, - {"time_sec": 180, "velocity_kms": 4.00, "doppler_434_khz": -5.79, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981} - ], - 20: [ - {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, - {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, - {"time_sec": -160, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, - {"time_sec": -150, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, - {"time_sec": -140, "velocity_kms": -5.22, "doppler_434_khz": 7.57, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.52, "obs_144_mhz": 144.9025}, - {"time_sec": -130, "velocity_kms": -5.02, "doppler_434_khz": 7.28, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.43, "obs_144_mhz": 144.9024}, - {"time_sec": -120, "velocity_kms": -4.81, "doppler_434_khz": 6.98, "obs_434_mhz": 434.9070, "doppler_144_khz": 2.32, "obs_144_mhz": 144.9023}, - {"time_sec": -110, "velocity_kms": -4.57, "doppler_434_khz": 6.63, "obs_434_mhz": 434.9066, "doppler_144_khz": 2.21, "obs_144_mhz": 144.9022}, - {"time_sec": -100, "velocity_kms": -4.30, "doppler_434_khz": 6.24, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.08, "obs_144_mhz": 144.9021}, - {"time_sec": -90, "velocity_kms": -4.00, "doppler_434_khz": 5.80, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, - {"time_sec": -80, "velocity_kms": -3.68, "doppler_434_khz": 5.34, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.78, "obs_144_mhz": 144.9018}, - {"time_sec": -70, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, - {"time_sec": -60, "velocity_kms": -2.92, "doppler_434_khz": 4.24, "obs_434_mhz": 434.9042, "doppler_144_khz": 1.41, "obs_144_mhz": 144.9014}, - {"time_sec": -50, "velocity_kms": -2.50, "doppler_434_khz": 3.63, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.21, "obs_144_mhz": 144.9012}, - {"time_sec": -40, "velocity_kms": -2.04, "doppler_434_khz": 2.96, "obs_434_mhz": 434.9030, "doppler_144_khz": 0.99, "obs_144_mhz": 144.9010}, - {"time_sec": -30, "velocity_kms": -1.56, "doppler_434_khz": 2.26, "obs_434_mhz": 434.9023, "doppler_144_khz": 0.75, "obs_144_mhz": 144.9008}, - {"time_sec": -20, "velocity_kms": -1.05, "doppler_434_khz": 1.52, "obs_434_mhz": 434.9015, "doppler_144_khz": 0.51, "obs_144_mhz": 144.9005}, - {"time_sec": -10, "velocity_kms": -0.53, "doppler_434_khz": 0.77, "obs_434_mhz": 434.9008, "doppler_144_khz": 0.26, "obs_144_mhz": 144.9003}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 0.53, "doppler_434_khz": -0.77, "obs_434_mhz": 434.8992, "doppler_144_khz": -0.26, "obs_144_mhz": 144.8997}, - {"time_sec": 20, "velocity_kms": 1.05, "doppler_434_khz": -1.52, "obs_434_mhz": 434.8985, "doppler_144_khz": -0.51, "obs_144_mhz": 144.8995}, - {"time_sec": 30, "velocity_kms": 1.56, "doppler_434_khz": -2.26, "obs_434_mhz": 434.8977, "doppler_144_khz": -0.75, "obs_144_mhz": 144.8992}, - {"time_sec": 40, "velocity_kms": 2.04, "doppler_434_khz": -2.96, "obs_434_mhz": 434.8970, "doppler_144_khz": -0.99, "obs_144_mhz": 144.8990}, - {"time_sec": 50, "velocity_kms": 2.50, "doppler_434_khz": -3.63, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.21, "obs_144_mhz": 144.8988}, - {"time_sec": 60, "velocity_kms": 2.92, "doppler_434_khz": -4.24, "obs_434_mhz": 434.8958, "doppler_144_khz": -1.41, "obs_144_mhz": 144.8986}, - {"time_sec": 70, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, - {"time_sec": 80, "velocity_kms": 3.68, "doppler_434_khz": -5.34, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.78, "obs_144_mhz": 144.8982}, - {"time_sec": 90, "velocity_kms": 4.00, "doppler_434_khz": -5.80, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981}, - {"time_sec": 100, "velocity_kms": 4.30, "doppler_434_khz": -6.24, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.08, "obs_144_mhz": 144.8979}, - {"time_sec": 110, "velocity_kms": 4.57, "doppler_434_khz": -6.63, "obs_434_mhz": 434.8934, "doppler_144_khz": -2.21, "obs_144_mhz": 144.8978}, - {"time_sec": 120, "velocity_kms": 4.81, "doppler_434_khz": -6.98, "obs_434_mhz": 434.8930, "doppler_144_khz": -2.32, "obs_144_mhz": 144.8977}, - {"time_sec": 130, "velocity_kms": 5.02, "doppler_434_khz": -7.28, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.43, "obs_144_mhz": 144.8976}, - {"time_sec": 140, "velocity_kms": 5.22, "doppler_434_khz": -7.57, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.52, "obs_144_mhz": 144.8975}, - {"time_sec": 150, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, - {"time_sec": 160, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, - {"time_sec": 170, "velocity_kms": 5.68, "doppler_434_khz": -8.24, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.75, "obs_144_mhz": 144.8973}, - {"time_sec": 180, "velocity_kms": 5.81, "doppler_434_khz": -8.43, "obs_434_mhz": 434.8916, "doppler_144_khz": -2.81, "obs_144_mhz": 144.8972} - ], - 40: [ - {"time_sec": -180, "velocity_kms": -6.67, "doppler_434_khz": 9.68, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.22, "obs_144_mhz": 144.9032}, - {"time_sec": -170, "velocity_kms": -6.60, "doppler_434_khz": 9.57, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.19, "obs_144_mhz": 144.9032}, - {"time_sec": -160, "velocity_kms": -6.52, "doppler_434_khz": 9.46, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.15, "obs_144_mhz": 144.9032}, - {"time_sec": -150, "velocity_kms": -6.43, "doppler_434_khz": 9.33, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.11, "obs_144_mhz": 144.9031}, - {"time_sec": -140, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, - {"time_sec": -130, "velocity_kms": -6.19, "doppler_434_khz": 8.98, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.99, "obs_144_mhz": 144.9030}, - {"time_sec": -120, "velocity_kms": -6.04, "doppler_434_khz": 8.76, "obs_434_mhz": 434.9088, "doppler_144_khz": 2.92, "obs_144_mhz": 144.9029}, - {"time_sec": -110, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, - {"time_sec": -100, "velocity_kms": -5.65, "doppler_434_khz": 8.20, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.73, "obs_144_mhz": 144.9027}, - {"time_sec": -90, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, - {"time_sec": -80, "velocity_kms": -5.08, "doppler_434_khz": 7.37, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.46, "obs_144_mhz": 144.9025}, - {"time_sec": -70, "velocity_kms": -4.72, "doppler_434_khz": 6.85, "obs_434_mhz": 434.9068, "doppler_144_khz": 2.28, "obs_144_mhz": 144.9023}, - {"time_sec": -60, "velocity_kms": -4.28, "doppler_434_khz": 6.21, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.07, "obs_144_mhz": 144.9021}, - {"time_sec": -50, "velocity_kms": -3.77, "doppler_434_khz": 5.47, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.82, "obs_144_mhz": 144.8993}, # manual note context adjustments active - {"time_sec": -40, "velocity_kms": -3.17, "doppler_434_khz": 4.60, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.53, "obs_144_mhz": 144.9015}, - {"time_sec": -30, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, - {"time_sec": -20, "velocity_kms": -1.70, "doppler_434_khz": 2.47, "obs_434_mhz": 434.9025, "doppler_144_khz": 0.82, "obs_144_mhz": 144.9008}, - {"time_sec": -10, "velocity_kms": -0.87, "doppler_434_khz": 1.26, "obs_434_mhz": 434.9013, "doppler_144_khz": 0.42, "obs_144_mhz": 144.9004}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 0.87, "doppler_434_khz": -1.26, "obs_434_mhz": 434.8987, "doppler_144_khz": -0.42, "obs_144_mhz": 144.8996}, - {"time_sec": 20, "velocity_kms": 1.70, "doppler_434_khz": -2.47, "obs_434_mhz": 434.8975, "doppler_144_khz": -0.82, "obs_144_mhz": 144.8992}, - {"time_sec": 30, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, - {"time_sec": 40, "velocity_kms": 3.17, "doppler_434_khz": -4.60, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.53, "obs_144_mhz": 144.8985}, - {"time_sec": 50, "velocity_kms": 3.77, "doppler_434_khz": -5.47, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.82, "obs_144_mhz": 144.8982}, - {"time_sec": 60, "velocity_kms": 4.28, "doppler_434_khz": -6.21, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.07, "obs_144_mhz": 144.8979}, - {"time_sec": 70, "velocity_kms": 4.72, "doppler_434_khz": -6.85, "obs_434_mhz": 434.8932, "doppler_144_khz": -2.28, "obs_144_mhz": 144.8977}, - {"time_sec": 80, "velocity_kms": 5.08, "doppler_434_khz": -7.37, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.46, "obs_144_mhz": 144.8975}, - {"time_sec": 90, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, - {"time_sec": 100, "velocity_kms": 0.87, "doppler_434_khz": -8.19, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.73, "obs_144_mhz": 144.8973}, - {"time_sec": 110, "velocity_kms": 1.70, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, - {"time_sec": 120, "velocity_kms": 2.48, "doppler_434_khz": -8.76, "obs_434_mhz": 434.8912, "doppler_144_khz": -2.92, "obs_144_mhz": 144.8971}, - {"time_sec": 130, "velocity_kms": 3.17, "doppler_434_khz": -8.98, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.99, "obs_144_mhz": 144.8970}, - {"time_sec": 140, "velocity_kms": 3.77, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, - {"time_sec": 150, "velocity_kms": 4.28, "doppler_434_khz": -9.33, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.11, "obs_144_mhz": 144.8969}, - {"time_sec": 160, "velocity_kms": 4.72, "doppler_434_khz": -9.46, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.15, "obs_144_mhz": 144.8968}, - {"time_sec": 170, "velocity_kms": 5.08, "doppler_434_khz": -9.58, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.19, "obs_144_mhz": 144.8968}, - {"time_sec": 180, "velocity_kms": 5.39, "doppler_434_khz": -9.68, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.22, "obs_144_mhz": 144.8968} - ], - 70: [ - {"time_sec": -180, "velocity_kms": -7.00, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, - {"time_sec": -170, "velocity_kms": -6.95, "doppler_434_khz": 10.09, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.36, "obs_144_mhz": 144.9034}, - {"time_sec": -160, "velocity_kms": -6.91, "doppler_434_khz": 10.02, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.34, "obs_144_mhz": 144.9033}, - {"time_sec": -150, "velocity_kms": -6.86, "doppler_434_khz": 9.95, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.32, "obs_144_mhz": 144.9033}, - {"time_sec": -140, "velocity_kms": -6.78, "doppler_434_khz": 9.84, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.28, "obs_144_mhz": 144.9033}, - {"time_sec": -130, "velocity_kms": -6.70, "doppler_434_khz": 9.72, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, - {"time_sec": -120, "velocity_kms": -6.62, "doppler_434_khz": 9.60, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, - {"time_sec": -110, "velocity_kms": -6.47, "doppler_434_khz": 9.39, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.13, "obs_144_mhz": 144.9031}, - {"time_sec": -100, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, - {"time_sec": -90, "velocity_kms": -6.17, "doppler_434_khz": 8.95, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.98, "obs_144_mhz": 144.9030}, - {"time_sec": -80, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, - {"time_sec": -70, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, - {"time_sec": -60, "velocity_kms": -5.24, "doppler_434_khz": 7.60, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.53, "obs_144_mhz": 144.9025}, - {"time_sec": -50, "velocity_kms": -4.60, "doppler_434_khz": 6.67, "obs_434_mhz": 434.9067, "doppler_144_khz": 2.22, "obs_144_mhz": 144.9022}, - {"time_sec": -40, "velocity_kms": -3.96, "doppler_434_khz": 5.74, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.91, "obs_144_mhz": 144.9019}, - {"time_sec": -30, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, - {"time_sec": -20, "velocity_kms": -2.21, "doppler_434_khz": 3.21, "obs_434_mhz": 434.9032, "doppler_144_khz": 1.07, "obs_144_mhz": 144.9011}, - {"time_sec": -10, "velocity_kms": -1.11, "doppler_434_khz": 1.61, "obs_434_mhz": 434.9016, "doppler_144_khz": 0.53, "obs_144_mhz": 144.9005}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 1.11, "doppler_434_khz": -1.61, "obs_434_mhz": 434.8984, "doppler_144_khz": -0.53, "obs_144_mhz": 144.8995}, - {"time_sec": 20, "velocity_kms": 2.21, "doppler_434_khz": -3.21, "obs_434_mhz": 434.8968, "doppler_144_khz": -1.07, "obs_144_mhz": 144.8989}, - {"time_sec": 30, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, - {"time_sec": 40, "velocity_kms": 3.96, "doppler_434_khz": -5.74, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.91, "obs_144_mhz": 144.8981}, - {"time_sec": 50, "velocity_kms": 4.60, "doppler_434_khz": -6.67, "obs_434_mhz": 434.8933, "doppler_144_khz": -2.22, "obs_144_mhz": 144.8978}, - {"time_sec": 60, "velocity_kms": 5.24, "doppler_434_khz": -7.60, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.53, "obs_144_mhz": 144.8975}, - {"time_sec": 70, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, - {"time_sec": 80, "velocity_kms": 5.86, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, - {"time_sec": 90, "velocity_kms": 6.17, "doppler_434_khz": -8.95, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.98, "obs_144_mhz": 144.8970}, - {"time_sec": 100, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, - {"time_sec": 110, "velocity_kms": 6.47, "doppler_434_khz": -9.39, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.13, "obs_144_mhz": 144.8969}, - {"time_sec": 120, "velocity_kms": 6.62, "doppler_434_khz": -9.60, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, - {"time_sec": 130, "velocity_kms": 6.70, "doppler_434_khz": -9.72, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, - {"time_sec": 140, "velocity_kms": 6.78, "doppler_434_khz": -9.84, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.28, "obs_144_mhz": 144.8967}, - {"time_sec": 150, "velocity_kms": 6.86, "doppler_434_khz": -9.95, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.32, "obs_144_mhz": 144.8967}, - {"time_sec": 160, "velocity_kms": 6.91, "doppler_434_khz": -10.02, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.34, "obs_144_mhz": 144.8967}, - {"time_sec": 170, "velocity_kms": 6.95, "doppler_434_khz": -10.09, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.36, "obs_144_mhz": 144.8966}, - {"time_sec": 180, "velocity_kms": 7.00, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966} - ], - 85: [ - {"time_sec": -180, "velocity_kms": -7.15, "doppler_434_khz": 10.37, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.46, "obs_144_mhz": 144.9035}, - {"time_sec": -170, "velocity_kms": -7.12, "doppler_434_khz": 10.32, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.44, "obs_144_mhz": 144.9034}, - {"time_sec": -160, "velocity_kms": -7.08, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.42, "obs_144_mhz": 144.9034}, - {"time_sec": -150, "velocity_kms": -7.05, "doppler_434_khz": 10.23, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.41, "obs_144_mhz": 144.9034}, - {"time_sec": -140, "velocity_kms": -6.99, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, - {"time_sec": -130, "velocity_kms": -6.94, "doppler_434_khz": 10.06, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.35, "obs_144_mhz": 144.9034}, - {"time_sec": -120, "velocity_kms": -6.88, "doppler_434_khz": 9.98, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, - {"time_sec": -110, "velocity_kms": -6.75, "doppler_434_khz": 9.80, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.26, "obs_144_mhz": 144.9033}, - {"time_sec": -100, "velocity_kms": -6.63, "doppler_434_khz": 9.61, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, - {"time_sec": -90, "velocity_kms": -6.50, "doppler_434_khz": 9.43, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.14, "obs_144_mhz": 144.9031}, - {"time_sec": -80, "velocity_kms": -6.23, "doppler_434_khz": 9.04, "obs_434_mhz": 434.9090, "doppler_144_khz": 3.01, "obs_144_mhz": 144.9030}, - {"time_sec": -70, "velocity_kms": -5.97, "doppler_434_khz": 8.66, "obs_434_mhz": 434.9087, "doppler_144_khz": 2.88, "obs_144_mhz": 144.9029}, - {"time_sec": -60, "velocity_kms": -5.70, "doppler_434_khz": 8.27, "obs_434_mhz": 434.9083, "doppler_144_khz": 2.76, "obs_144_mhz": 144.9028}, - {"time_sec": -50, "velocity_kms": -5.10, "doppler_434_khz": 7.40, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.47, "obs_144_mhz": 144.9025}, - {"time_sec": -40, "velocity_kms": -4.50, "doppler_434_khz": 6.53, "obs_434_mhz": 434.9065, "doppler_144_khz": 2.18, "obs_144_mhz": 144.9022}, - {"time_sec": -30, "velocity_kms": -3.90, "doppler_434_khz": 5.66, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.89, "obs_144_mhz": 144.9019}, - {"time_sec": -20 ,"velocity_kms": -2.60, "doppler_434_khz": 3.77, "obs_434_mhz": 434.9038, "doppler_144_khz": 1.26, "obs_144_mhz": 144.9013}, - {"time_sec": -10 ,"velocity_kms": -1.30, "doppler_434_khz": 1.89, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.63, "obs_144_mhz": 144.9006}, - {"time_sec": 0 ,"velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10 ,"velocity_kms": 1.30, "doppler_434_khz": -1.89, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.63, "obs_144_mhz": 144.8994}, - {"time_sec": 20 ,"velocity_kms": 2.60, "doppler_434_khz": -3.77, "obs_434_mhz": 434.8962, "doppler_144_khz": -1.26, "obs_144_mhz": 144.8987}, - {"time_sec": 30 ,"velocity_kms": 3.90, "doppler_434_khz": -5.66, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.89, "obs_144_mhz": 144.8981}, - {"time_sec": 40 ,"velocity_kms": 4.50, "doppler_434_khz": -6.53, "obs_434_mhz": 434.8935, "doppler_144_khz": -2.18, "obs_144_mhz": 144.8978}, - {"time_sec": 50 ,"velocity_kms": 5.10, "doppler_434_khz": -7.40, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.47, "obs_144_mhz": 144.8975}, - {"time_sec": 60 ,"velocity_kms": 5.70, "doppler_434_khz": -8.27, "obs_434_mhz": 434.8917, "doppler_144_khz": -2.76, "obs_144_mhz": 144.8972}, - {"time_sec": 70 ,"velocity_kms": 5.97, "doppler_434_khz": -8.66, "obs_434_mhz": 434.8913, "doppler_144_khz": -2.88, "obs_144_mhz": 144.8971}, - {"time_sec": 80 ,"velocity_kms": 6.23, "doppler_434_khz": -9.04, "obs_434_mhz": 434.8910, "doppler_144_khz": -3.01, "obs_144_mhz": 144.8970}, - {"time_sec": 90 ,"velocity_kms": 6.50, "doppler_434_khz": -9.43, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.14, "obs_144_mhz": 144.8969}, - {"time_sec": 100 ,"velocity_kms": 6.63, "doppler_434_khz": -9.61, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, - {"time_sec": 110 ,"velocity_kms": 6.75, "doppler_434_khz": -9.80, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.26, "obs_144_mhz": 144.8967}, - {"time_sec": 120 ,"velocity_kms": 6.88, "doppler_434_khz": -9.98, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, - {"time_sec": 130 ,"velocity_kms": 6.94, "doppler_434_khz": -10.06, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.35, "obs_144_mhz": 144.8966}, - {"time_sec": 140 ,"velocity_kms": 6.99, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966}, - {"time_sec": 150 ,"velocity_kms": 7.05, "doppler_434_khz": -10.23, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.41, "obs_144_mhz": 144.8966}, - {"time_sec": 160 ,"velocity_kms": 7.08, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8917, "doppler_144_khz": -3.42, "obs_144_mhz": 144.8966}, - {"time_sec": 170 ,"velocity_kms": 7.12, "doppler_434_khz": -10.32, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.44, "obs_144_mhz": 144.8966}, - {"time_sec": 180 ,"velocity_kms": 7.15, "doppler_434_khz": -10.37, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.46, "obs_144_mhz": 144.8965} - ], - 89: [ - {"time_sec": -180, "velocity_kms": -7.17, "doppler_434_khz": 10.40, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.47, "obs_144_mhz": 144.9035}, - {"time_sec": -170, "velocity_kms": -7.13, "doppler_434_khz": 10.35, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.45, "obs_144_mhz": 144.9034}, - {"time_sec": -160, "velocity_kms": -7.09, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.43, "obs_144_mhz": 144.9034}, - {"time_sec": -150, "velocity_kms": -7.04, "doppler_434_khz": 10.21, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.40, "obs_144_mhz": 144.9034}, - {"time_sec": -140, "velocity_kms": -6.97, "doppler_434_khz": 10.12, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.37, "obs_144_mhz": 144.9034}, - {"time_sec": -130, "velocity_kms": -6.90, "doppler_434_khz": 10.01, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, - {"time_sec": -120, "velocity_kms": -6.81, "doppler_434_khz": 9.87, "obs_434_mhz": 434.9099, "doppler_144_khz": 3.29, "obs_144_mhz": 144.9033}, - {"time_sec": -110, "velocity_kms": -6.69, "doppler_434_khz": 9.71, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, - {"time_sec": -100, "velocity_kms": -6.55, "doppler_434_khz": 9.51, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.17, "obs_144_mhz": 144.9032}, - {"time_sec": -90, "velocity_kms": -6.38, "doppler_434_khz": 9.25, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.08, "obs_144_mhz": 144.9031}, - {"time_sec": -80, "velocity_kms": -6.15, "doppler_434_khz": 8.93, "obs_434_mhz": 434.9089, "doppler_144_khz": 2.97, "obs_144_mhz": 144.9030}, - {"time_sec": -70, "velocity_kms": -5.87, "doppler_434_khz": 8.51, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.84, "obs_144_mhz": 144.9028}, - {"time_sec": -60, "velocity_kms": -5.49, "doppler_434_khz": 7.97, "obs_434_mhz": 434.9080, "doppler_144_khz": 2.66, "obs_144_mhz": 144.9027}, - {"time_sec": -50, "velocity_kms": -5.01, "doppler_434_khz": 7.26, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.42, "obs_144_mhz": 144.9024}, - {"time_sec": -40, "velocity_kms": -4.37, "doppler_434_khz": 6.34, "obs_434_mhz": 434.9063, "doppler_144_khz": 2.11, "obs_144_mhz": 144.9021}, - {"time_sec": -30, "velocity_kms": -3.55, "doppler_434_khz": 5.15, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.72, "obs_144_mhz": 144.9017}, - {"time_sec": -20, "velocity_kms": -2.53, "doppler_434_khz": 3.67, "obs_434_mhz": 434.9037, "doppler_144_khz": 1.22, "obs_144_mhz": 144.9012}, - {"time_sec": -10, "velocity_kms": -1.32, "doppler_434_khz": 1.92, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 1.32, "doppler_434_khz": -1.92, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, - {"time_sec": 20, "velocity_kms": 2.53, "doppler_434_khz": -3.67, "obs_434_mhz": 434.8963, "doppler_144_khz": -1.22, "obs_144_mhz": 144.8988}, - {"time_sec": 30, "velocity_kms": 3.55, "doppler_434_khz": -5.15, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.72, "obs_144_mhz": 144.8983}, - {"time_sec": 40, "velocity_kms": 4.37, "doppler_434_khz": -6.34, "obs_434_mhz": 434.8937, "doppler_144_khz": -2.11, "obs_144_mhz": 144.8979}, - {"time_sec": 50, "velocity_kms": 5.01, "doppler_434_khz": -7.26, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.42, "obs_144_mhz": 144.8976}, - {"time_sec": 60, "velocity_kms": 5.49, "doppler_434_khz": -7.97, "obs_434_mhz": 434.8920, "doppler_144_khz": -2.66, "obs_144_mhz": 144.8973}, - {"time_sec": 70, "velocity_kms": 5.87, "doppler_434_khz": -8.51, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.84, "obs_144_mhz": 144.8972}, - {"time_sec": 80, "velocity_kms": 6.15, "doppler_434_khz": -8.93, "obs_434_mhz": 434.8911, "doppler_144_khz": -2.97, "obs_144_mhz": 144.8970}, - {"time_sec": 90, "velocity_kms": 6.38, "doppler_434_khz": -9.25, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.08, "obs_144_mhz": 144.8969}, - {"time_sec": 100, "velocity_kms": 6.55, "doppler_434_khz": -9.51, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.17, "obs_144_mhz": 144.8968}, - {"time_sec": 110, "velocity_kms": 6.69, "doppler_434_khz": -9.71, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, - {"time_sec": 120, "velocity_kms": 6.81, "doppler_434_khz": -9.87, "obs_434_mhz": 434.8901, "doppler_144_khz": -3.29, "obs_144_mhz": 144.8967}, - {"time_sec": 130, "velocity_kms": 6.90, "doppler_434_khz": -10.01, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, - {"time_sec": 140, "velocity_kms": 6.97, "doppler_434_khz": -10.12, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.37, "obs_144_mhz": 144.8966}, - {"time_sec": 150, "velocity_kms": 7.04, "doppler_434_khz": -10.21, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.40, "obs_144_mhz": 144.8966}, - {"time_sec": 160, "velocity_kms": 7.09, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.43, "obs_144_mhz": 144.8966}, - {"time_sec": 170, "velocity_kms": 7.13, "doppler_434_khz": -10.35, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.45, "obs_144_mhz": 144.8966}, - {"time_sec": 180, "velocity_kms": 7.17, "doppler_434_khz": -10.40, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.47, "obs_144_mhz": 144.8965} + 88: [ + {"time_sec": 1, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 2, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 3, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 4, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 5, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 6, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 7, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 8, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 9, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 10, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 11, "doppler_434_khz": 9987, "doppler_144_khz": 3329}, + {"time_sec": 12, "doppler_434_khz": 9986, "doppler_144_khz": 3329}, + {"time_sec": 13, "doppler_434_khz": 9986, "doppler_144_khz": 3329}, + {"time_sec": 14, "doppler_434_khz": 9986, "doppler_144_khz": 3329}, + {"time_sec": 15, "doppler_434_khz": 9986, "doppler_144_khz": 3329}, + {"time_sec": 16, "doppler_434_khz": 9986, "doppler_144_khz": 3329}, + {"time_sec": 17, "doppler_434_khz": 9985, "doppler_144_khz": 3328}, + {"time_sec": 18, "doppler_434_khz": 9985, "doppler_144_khz": 3328}, + {"time_sec": 19, "doppler_434_khz": 9985, "doppler_144_khz": 3328}, + {"time_sec": 20, "doppler_434_khz": 9985, "doppler_144_khz": 3328}, + {"time_sec": 21, "doppler_434_khz": 9984, "doppler_144_khz": 3328}, + {"time_sec": 22, "doppler_434_khz": 9984, "doppler_144_khz": 3328}, + {"time_sec": 23, "doppler_434_khz": 9984, "doppler_144_khz": 3328}, + {"time_sec": 24, "doppler_434_khz": 9984, "doppler_144_khz": 3328}, + {"time_sec": 25, "doppler_434_khz": 9983, "doppler_144_khz": 3328}, + {"time_sec": 26, "doppler_434_khz": 9983, "doppler_144_khz": 3328}, + {"time_sec": 27, "doppler_434_khz": 9983, "doppler_144_khz": 3328}, + {"time_sec": 28, "doppler_434_khz": 9982, "doppler_144_khz": 3327}, + {"time_sec": 29, "doppler_434_khz": 9982, "doppler_144_khz": 3327}, + {"time_sec": 30, "doppler_434_khz": 9982, "doppler_144_khz": 3327}, + {"time_sec": 31, "doppler_434_khz": 9981, "doppler_144_khz": 3327}, + {"time_sec": 32, "doppler_434_khz": 9981, "doppler_144_khz": 3327}, + {"time_sec": 33, "doppler_434_khz": 9980, "doppler_144_khz": 3327}, + {"time_sec": 34, "doppler_434_khz": 9980, "doppler_144_khz": 3327}, + {"time_sec": 35, "doppler_434_khz": 9979, "doppler_144_khz": 3326}, + {"time_sec": 36, "doppler_434_khz": 9979, "doppler_144_khz": 3326}, + {"time_sec": 37, "doppler_434_khz": 9978, "doppler_144_khz": 3326}, + {"time_sec": 38, "doppler_434_khz": 9978, "doppler_144_khz": 3326}, + {"time_sec": 39, "doppler_434_khz": 9977, "doppler_144_khz": 3326}, + {"time_sec": 40, "doppler_434_khz": 9977, "doppler_144_khz": 3326}, + {"time_sec": 41, "doppler_434_khz": 9976, "doppler_144_khz": 3325}, + {"time_sec": 42, "doppler_434_khz": 9975, "doppler_144_khz": 3325}, + {"time_sec": 43, "doppler_434_khz": 9975, "doppler_144_khz": 3325}, + {"time_sec": 44, "doppler_434_khz": 9974, "doppler_144_khz": 3325}, + {"time_sec": 45, "doppler_434_khz": 9973, "doppler_144_khz": 3324}, + {"time_sec": 46, "doppler_434_khz": 9973, "doppler_144_khz": 3324}, + {"time_sec": 47, "doppler_434_khz": 9972, "doppler_144_khz": 3324}, + {"time_sec": 48, "doppler_434_khz": 9972, "doppler_144_khz": 3324}, + {"time_sec": 49, "doppler_434_khz": 9971, "doppler_144_khz": 3324}, + {"time_sec": 50, "doppler_434_khz": 9970, "doppler_144_khz": 3323}, + {"time_sec": 51, "doppler_434_khz": 9969, "doppler_144_khz": 3323}, + {"time_sec": 52, "doppler_434_khz": 9969, "doppler_144_khz": 3323}, + {"time_sec": 53, "doppler_434_khz": 9968, "doppler_144_khz": 3323}, + {"time_sec": 54, "doppler_434_khz": 9967, "doppler_144_khz": 3322}, + {"time_sec": 55, "doppler_434_khz": 9966, "doppler_144_khz": 3322}, + {"time_sec": 56, "doppler_434_khz": 9966, "doppler_144_khz": 3322}, + {"time_sec": 57, "doppler_434_khz": 9964, "doppler_144_khz": 3321}, + {"time_sec": 58, "doppler_434_khz": 9963, "doppler_144_khz": 3321}, + {"time_sec": 59, "doppler_434_khz": 9963, "doppler_144_khz": 3321}, + {"time_sec": 60, "doppler_434_khz": 9962, "doppler_144_khz": 3321}, + {"time_sec": 61, "doppler_434_khz": 9961, "doppler_144_khz": 3320}, + {"time_sec": 62, "doppler_434_khz": 9959, "doppler_144_khz": 3320}, + {"time_sec": 63, "doppler_434_khz": 9959, "doppler_144_khz": 3320}, + {"time_sec": 64, "doppler_434_khz": 9958, "doppler_144_khz": 3319}, + {"time_sec": 65, "doppler_434_khz": 9957, "doppler_144_khz": 3319}, + {"time_sec": 66, "doppler_434_khz": 9955, "doppler_144_khz": 3318}, + {"time_sec": 67, "doppler_434_khz": 9954, "doppler_144_khz": 3318}, + {"time_sec": 68, "doppler_434_khz": 9953, "doppler_144_khz": 3318}, + {"time_sec": 69, "doppler_434_khz": 9952, "doppler_144_khz": 3317}, + {"time_sec": 70, "doppler_434_khz": 9951, "doppler_144_khz": 3317}, + {"time_sec": 71, "doppler_434_khz": 9950, "doppler_144_khz": 3317}, + {"time_sec": 72, "doppler_434_khz": 9949, "doppler_144_khz": 3316}, + {"time_sec": 73, "doppler_434_khz": 9948, "doppler_144_khz": 3316}, + {"time_sec": 74, "doppler_434_khz": 9946, "doppler_144_khz": 3315}, + {"time_sec": 75, "doppler_434_khz": 9945, "doppler_144_khz": 3315}, + {"time_sec": 76, "doppler_434_khz": 9943, "doppler_144_khz": 3314}, + {"time_sec": 77, "doppler_434_khz": 9942, "doppler_144_khz": 3314}, + {"time_sec": 78, "doppler_434_khz": 9941, "doppler_144_khz": 3314}, + {"time_sec": 79, "doppler_434_khz": 9939, "doppler_144_khz": 3313}, + {"time_sec": 80, "doppler_434_khz": 9938, "doppler_144_khz": 3313}, + {"time_sec": 81, "doppler_434_khz": 9937, "doppler_144_khz": 3312}, + {"time_sec": 82, "doppler_434_khz": 9936, "doppler_144_khz": 3312}, + {"time_sec": 83, "doppler_434_khz": 9933, "doppler_144_khz": 3311}, + {"time_sec": 84, "doppler_434_khz": 9932, "doppler_144_khz": 3311}, + {"time_sec": 85, "doppler_434_khz": 9931, "doppler_144_khz": 3310}, + {"time_sec": 86, "doppler_434_khz": 9929, "doppler_144_khz": 3310}, + {"time_sec": 87, "doppler_434_khz": 9927, "doppler_144_khz": 3309}, + {"time_sec": 88, "doppler_434_khz": 9925, "doppler_144_khz": 3308}, + {"time_sec": 89, "doppler_434_khz": 9924, "doppler_144_khz": 3308}, + {"time_sec": 90, "doppler_434_khz": 9923, "doppler_144_khz": 3308}, + {"time_sec": 91, "doppler_434_khz": 9920, "doppler_144_khz": 3307}, + {"time_sec": 92, "doppler_434_khz": 9918, "doppler_144_khz": 3306}, + {"time_sec": 93, "doppler_434_khz": 9917, "doppler_144_khz": 3306}, + {"time_sec": 94, "doppler_434_khz": 9915, "doppler_144_khz": 3305}, + {"time_sec": 95, "doppler_434_khz": 9912, "doppler_144_khz": 3304}, + {"time_sec": 96, "doppler_434_khz": 9911, "doppler_144_khz": 3304}, + {"time_sec": 97, "doppler_434_khz": 9909, "doppler_144_khz": 3303}, + {"time_sec": 98, "doppler_434_khz": 9907, "doppler_144_khz": 3302}, + {"time_sec": 99, "doppler_434_khz": 9906, "doppler_144_khz": 3302}, + {"time_sec": 100, "doppler_434_khz": 9903, "doppler_144_khz": 3301}, + {"time_sec": 101, "doppler_434_khz": 9901, "doppler_144_khz": 3300}, + {"time_sec": 102, "doppler_434_khz": 9899, "doppler_144_khz": 3300}, + {"time_sec": 103, "doppler_434_khz": 9897, "doppler_144_khz": 3299}, + {"time_sec": 104, "doppler_434_khz": 9894, "doppler_144_khz": 3298}, + {"time_sec": 105, "doppler_434_khz": 9892, "doppler_144_khz": 3297}, + {"time_sec": 106, "doppler_434_khz": 9890, "doppler_144_khz": 3297}, + {"time_sec": 107, "doppler_434_khz": 9888, "doppler_144_khz": 3296}, + {"time_sec": 108, "doppler_434_khz": 9884, "doppler_144_khz": 3295}, + {"time_sec": 109, "doppler_434_khz": 9882, "doppler_144_khz": 3294}, + {"time_sec": 110, "doppler_434_khz": 9880, "doppler_144_khz": 3293}, + {"time_sec": 111, "doppler_434_khz": 9878, "doppler_144_khz": 3293}, + {"time_sec": 112, "doppler_434_khz": 9874, "doppler_144_khz": 3291}, + {"time_sec": 113, "doppler_434_khz": 9872, "doppler_144_khz": 3291}, + {"time_sec": 114, "doppler_434_khz": 9870, "doppler_144_khz": 3290}, + {"time_sec": 115, "doppler_434_khz": 9868, "doppler_144_khz": 3289}, + {"time_sec": 116, "doppler_434_khz": 9864, "doppler_144_khz": 3288}, + {"time_sec": 117, "doppler_434_khz": 9861, "doppler_144_khz": 3287}, + {"time_sec": 118, "doppler_434_khz": 9859, "doppler_144_khz": 3286}, + {"time_sec": 119, "doppler_434_khz": 9857, "doppler_144_khz": 3286}, + {"time_sec": 120, "doppler_434_khz": 9852, "doppler_144_khz": 3284}, + {"time_sec": 121, "doppler_434_khz": 9850, "doppler_144_khz": 3283}, + {"time_sec": 122, "doppler_434_khz": 9847, "doppler_144_khz": 3282}, + {"time_sec": 123, "doppler_434_khz": 9845, "doppler_144_khz": 3282}, + {"time_sec": 124, "doppler_434_khz": 9842, "doppler_144_khz": 3281}, + {"time_sec": 125, "doppler_434_khz": 9837, "doppler_144_khz": 3279}, + {"time_sec": 126, "doppler_434_khz": 9834, "doppler_144_khz": 3278}, + {"time_sec": 127, "doppler_434_khz": 9832, "doppler_144_khz": 3277}, + {"time_sec": 128, "doppler_434_khz": 9829, "doppler_144_khz": 3276}, + {"time_sec": 129, "doppler_434_khz": 9823, "doppler_144_khz": 3274}, + {"time_sec": 130, "doppler_434_khz": 9821, "doppler_144_khz": 3274}, + {"time_sec": 131, "doppler_434_khz": 9818, "doppler_144_khz": 3273}, + {"time_sec": 132, "doppler_434_khz": 9815, "doppler_144_khz": 3272}, + {"time_sec": 133, "doppler_434_khz": 9812, "doppler_144_khz": 3271}, + {"time_sec": 134, "doppler_434_khz": 9806, "doppler_144_khz": 3269}, + {"time_sec": 135, "doppler_434_khz": 9803, "doppler_144_khz": 3268}, + {"time_sec": 136, "doppler_434_khz": 9800, "doppler_144_khz": 3267}, + {"time_sec": 137, "doppler_434_khz": 9796, "doppler_144_khz": 3265}, + {"time_sec": 138, "doppler_434_khz": 9790, "doppler_144_khz": 3263}, + {"time_sec": 139, "doppler_434_khz": 9787, "doppler_144_khz": 3262}, + {"time_sec": 140, "doppler_434_khz": 9783, "doppler_144_khz": 3261}, + {"time_sec": 141, "doppler_434_khz": 9780, "doppler_144_khz": 3260}, + {"time_sec": 142, "doppler_434_khz": 9773, "doppler_144_khz": 3258}, + {"time_sec": 143, "doppler_434_khz": 9769, "doppler_144_khz": 3256}, + {"time_sec": 144, "doppler_434_khz": 9766, "doppler_144_khz": 3255}, + {"time_sec": 145, "doppler_434_khz": 9762, "doppler_144_khz": 3254}, + {"time_sec": 146, "doppler_434_khz": 9759, "doppler_144_khz": 3253}, + {"time_sec": 147, "doppler_434_khz": 9751, "doppler_144_khz": 3250}, + {"time_sec": 148, "doppler_434_khz": 9747, "doppler_144_khz": 3249}, + {"time_sec": 149, "doppler_434_khz": 9743, "doppler_144_khz": 3248}, + {"time_sec": 150, "doppler_434_khz": 9739, "doppler_144_khz": 3246}, + {"time_sec": 151, "doppler_434_khz": 9731, "doppler_144_khz": 3244}, + {"time_sec": 152, "doppler_434_khz": 9727, "doppler_144_khz": 3242}, + {"time_sec": 153, "doppler_434_khz": 9723, "doppler_144_khz": 3241}, + {"time_sec": 154, "doppler_434_khz": 9719, "doppler_144_khz": 3240}, + {"time_sec": 155, "doppler_434_khz": 9715, "doppler_144_khz": 3238}, + {"time_sec": 156, "doppler_434_khz": 9706, "doppler_144_khz": 3235}, + {"time_sec": 157, "doppler_434_khz": 9701, "doppler_144_khz": 3234}, + {"time_sec": 158, "doppler_434_khz": 9697, "doppler_144_khz": 3232}, + {"time_sec": 159, "doppler_434_khz": 9692, "doppler_144_khz": 3231}, + {"time_sec": 160, "doppler_434_khz": 9683, "doppler_144_khz": 3228}, + {"time_sec": 161, "doppler_434_khz": 9678, "doppler_144_khz": 3226}, + {"time_sec": 162, "doppler_434_khz": 9673, "doppler_144_khz": 3224}, + {"time_sec": 163, "doppler_434_khz": 9668, "doppler_144_khz": 3223}, + {"time_sec": 164, "doppler_434_khz": 9658, "doppler_144_khz": 3219}, + {"time_sec": 165, "doppler_434_khz": 9653, "doppler_144_khz": 3218}, + {"time_sec": 166, "doppler_434_khz": 9647, "doppler_144_khz": 3216}, + {"time_sec": 167, "doppler_434_khz": 9642, "doppler_144_khz": 3214}, + {"time_sec": 168, "doppler_434_khz": 9637, "doppler_144_khz": 3212}, + {"time_sec": 169, "doppler_434_khz": 9626, "doppler_144_khz": 3209}, + {"time_sec": 170, "doppler_434_khz": 9620, "doppler_144_khz": 3207}, + {"time_sec": 171, "doppler_434_khz": 9614, "doppler_144_khz": 3205}, + {"time_sec": 172, "doppler_434_khz": 9608, "doppler_144_khz": 3203}, + {"time_sec": 173, "doppler_434_khz": 9597, "doppler_144_khz": 3199}, + {"time_sec": 174, "doppler_434_khz": 9590, "doppler_144_khz": 3197}, + {"time_sec": 175, "doppler_434_khz": 9584, "doppler_144_khz": 3195}, + {"time_sec": 176, "doppler_434_khz": 9578, "doppler_144_khz": 3193}, + {"time_sec": 177, "doppler_434_khz": 9572, "doppler_144_khz": 3191}, + {"time_sec": 178, "doppler_434_khz": 9559, "doppler_144_khz": 3186}, + {"time_sec": 179, "doppler_434_khz": 9552, "doppler_144_khz": 3184}, + {"time_sec": 180, "doppler_434_khz": 9545, "doppler_144_khz": 3182}, + {"time_sec": 181, "doppler_434_khz": 9539, "doppler_144_khz": 3180}, + {"time_sec": 182, "doppler_434_khz": 9525, "doppler_144_khz": 3175}, + {"time_sec": 183, "doppler_434_khz": 9518, "doppler_144_khz": 3173}, + {"time_sec": 184, "doppler_434_khz": 9510, "doppler_144_khz": 3170}, + {"time_sec": 185, "doppler_434_khz": 9503, "doppler_144_khz": 3168}, + {"time_sec": 186, "doppler_434_khz": 9488, "doppler_144_khz": 3163}, + {"time_sec": 187, "doppler_434_khz": 9480, "doppler_144_khz": 3160}, + {"time_sec": 188, "doppler_434_khz": 9472, "doppler_144_khz": 3157}, + {"time_sec": 189, "doppler_434_khz": 9464, "doppler_144_khz": 3155}, + {"time_sec": 190, "doppler_434_khz": 9456, "doppler_144_khz": 3152}, + {"time_sec": 191, "doppler_434_khz": 9440, "doppler_144_khz": 3147}, + {"time_sec": 192, "doppler_434_khz": 9432, "doppler_144_khz": 3144}, + {"time_sec": 193, "doppler_434_khz": 9423, "doppler_144_khz": 3141}, + {"time_sec": 194, "doppler_434_khz": 9414, "doppler_144_khz": 3138}, + {"time_sec": 195, "doppler_434_khz": 9396, "doppler_144_khz": 3132}, + {"time_sec": 196, "doppler_434_khz": 9387, "doppler_144_khz": 3129}, + {"time_sec": 197, "doppler_434_khz": 9378, "doppler_144_khz": 3126}, + {"time_sec": 198, "doppler_434_khz": 9369, "doppler_144_khz": 3123}, + {"time_sec": 199, "doppler_434_khz": 9349, "doppler_144_khz": 3116}, + {"time_sec": 200, "doppler_434_khz": 9339, "doppler_144_khz": 3113}, + {"time_sec": 201, "doppler_434_khz": 9329, "doppler_144_khz": 3110}, + {"time_sec": 202, "doppler_434_khz": 9318, "doppler_144_khz": 3106}, + {"time_sec": 203, "doppler_434_khz": 9308, "doppler_144_khz": 3103}, + {"time_sec": 204, "doppler_434_khz": 9287, "doppler_144_khz": 3096}, + {"time_sec": 205, "doppler_434_khz": 9276, "doppler_144_khz": 3092}, + {"time_sec": 206, "doppler_434_khz": 9265, "doppler_144_khz": 3088}, + {"time_sec": 207, "doppler_434_khz": 9254, "doppler_144_khz": 3085}, + {"time_sec": 208, "doppler_434_khz": 9230, "doppler_144_khz": 3077}, + {"time_sec": 209, "doppler_434_khz": 9218, "doppler_144_khz": 3073}, + {"time_sec": 210, "doppler_434_khz": 9206, "doppler_144_khz": 3069}, + {"time_sec": 211, "doppler_434_khz": 9194, "doppler_144_khz": 3065}, + {"time_sec": 212, "doppler_434_khz": 9182, "doppler_144_khz": 3061}, + {"time_sec": 213, "doppler_434_khz": 9156, "doppler_144_khz": 3052}, + {"time_sec": 214, "doppler_434_khz": 9143, "doppler_144_khz": 3048}, + {"time_sec": 215, "doppler_434_khz": 9130, "doppler_144_khz": 3043}, + {"time_sec": 216, "doppler_434_khz": 9116, "doppler_144_khz": 3039}, + {"time_sec": 217, "doppler_434_khz": 9088, "doppler_144_khz": 3029}, + {"time_sec": 218, "doppler_434_khz": 9074, "doppler_144_khz": 3025}, + {"time_sec": 219, "doppler_434_khz": 9060, "doppler_144_khz": 3020}, + {"time_sec": 220, "doppler_434_khz": 9045, "doppler_144_khz": 3015}, + {"time_sec": 221, "doppler_434_khz": 9015, "doppler_144_khz": 3005}, + {"time_sec": 222, "doppler_434_khz": 8999, "doppler_144_khz": 3000}, + {"time_sec": 223, "doppler_434_khz": 8983, "doppler_144_khz": 2994}, + {"time_sec": 224, "doppler_434_khz": 8967, "doppler_144_khz": 2989}, + {"time_sec": 225, "doppler_434_khz": 8951, "doppler_144_khz": 2984}, + {"time_sec": 226, "doppler_434_khz": 8917, "doppler_144_khz": 2972}, + {"time_sec": 227, "doppler_434_khz": 8900, "doppler_144_khz": 2967}, + {"time_sec": 228, "doppler_434_khz": 8882, "doppler_144_khz": 2961}, + {"time_sec": 229, "doppler_434_khz": 8865, "doppler_144_khz": 2955}, + {"time_sec": 230, "doppler_434_khz": 8828, "doppler_144_khz": 2943}, + {"time_sec": 231, "doppler_434_khz": 8809, "doppler_144_khz": 2936}, + {"time_sec": 232, "doppler_434_khz": 8790, "doppler_144_khz": 2930}, + {"time_sec": 233, "doppler_434_khz": 8770, "doppler_144_khz": 2923}, + {"time_sec": 234, "doppler_434_khz": 8730, "doppler_144_khz": 2910}, + {"time_sec": 235, "doppler_434_khz": 8709, "doppler_144_khz": 2903}, + {"time_sec": 236, "doppler_434_khz": 8688, "doppler_144_khz": 2896}, + {"time_sec": 237, "doppler_434_khz": 8665, "doppler_144_khz": 2888}, + {"time_sec": 238, "doppler_434_khz": 8643, "doppler_144_khz": 2881}, + {"time_sec": 239, "doppler_434_khz": 8597, "doppler_144_khz": 2866}, + {"time_sec": 240, "doppler_434_khz": 8574, "doppler_144_khz": 2858}, + {"time_sec": 241, "doppler_434_khz": 8550, "doppler_144_khz": 2850}, + {"time_sec": 242, "doppler_434_khz": 8526, "doppler_144_khz": 2842}, + {"time_sec": 243, "doppler_434_khz": 8476, "doppler_144_khz": 2825}, + {"time_sec": 244, "doppler_434_khz": 8450, "doppler_144_khz": 2817}, + {"time_sec": 245, "doppler_434_khz": 8423, "doppler_144_khz": 2808}, + {"time_sec": 246, "doppler_434_khz": 8397, "doppler_144_khz": 2799}, + {"time_sec": 247, "doppler_434_khz": 8370, "doppler_144_khz": 2790}, + {"time_sec": 248, "doppler_434_khz": 8314, "doppler_144_khz": 2771}, + {"time_sec": 249, "doppler_434_khz": 8286, "doppler_144_khz": 2762}, + {"time_sec": 250, "doppler_434_khz": 8256, "doppler_144_khz": 2752}, + {"time_sec": 251, "doppler_434_khz": 8226, "doppler_144_khz": 2742}, + {"time_sec": 252, "doppler_434_khz": 8164, "doppler_144_khz": 2721}, + {"time_sec": 253, "doppler_434_khz": 8133, "doppler_144_khz": 2711}, + {"time_sec": 254, "doppler_434_khz": 8101, "doppler_144_khz": 2700}, + {"time_sec": 255, "doppler_434_khz": 8068, "doppler_144_khz": 2689}, + {"time_sec": 256, "doppler_434_khz": 8034, "doppler_144_khz": 2678}, + {"time_sec": 257, "doppler_434_khz": 7965, "doppler_144_khz": 2655}, + {"time_sec": 258, "doppler_434_khz": 7929, "doppler_144_khz": 2643}, + {"time_sec": 259, "doppler_434_khz": 7893, "doppler_144_khz": 2631}, + {"time_sec": 260, "doppler_434_khz": 7856, "doppler_144_khz": 2619}, + {"time_sec": 261, "doppler_434_khz": 7779, "doppler_144_khz": 2593}, + {"time_sec": 262, "doppler_434_khz": 7740, "doppler_144_khz": 2580}, + {"time_sec": 263, "doppler_434_khz": 7699, "doppler_144_khz": 2566}, + {"time_sec": 264, "doppler_434_khz": 7658, "doppler_144_khz": 2553}, + {"time_sec": 265, "doppler_434_khz": 7574, "doppler_144_khz": 2525}, + {"time_sec": 266, "doppler_434_khz": 7530, "doppler_144_khz": 2510}, + {"time_sec": 267, "doppler_434_khz": 7485, "doppler_144_khz": 2495}, + {"time_sec": 268, "doppler_434_khz": 7440, "doppler_144_khz": 2480}, + {"time_sec": 269, "doppler_434_khz": 7394, "doppler_144_khz": 2465}, + {"time_sec": 270, "doppler_434_khz": 7298, "doppler_144_khz": 2433}, + {"time_sec": 271, "doppler_434_khz": 7248, "doppler_144_khz": 2416}, + {"time_sec": 272, "doppler_434_khz": 7198, "doppler_144_khz": 2399}, + {"time_sec": 273, "doppler_434_khz": 7143, "doppler_144_khz": 2381}, + {"time_sec": 274, "doppler_434_khz": 7037, "doppler_144_khz": 2346}, + {"time_sec": 275, "doppler_434_khz": 6982, "doppler_144_khz": 2327}, + {"time_sec": 276, "doppler_434_khz": 6927, "doppler_144_khz": 2309}, + {"time_sec": 277, "doppler_434_khz": 6870, "doppler_144_khz": 2290}, + {"time_sec": 278, "doppler_434_khz": 6812, "doppler_144_khz": 2271}, + {"time_sec": 279, "doppler_434_khz": 6693, "doppler_144_khz": 2231}, + {"time_sec": 280, "doppler_434_khz": 6631, "doppler_144_khz": 2210}, + {"time_sec": 281, "doppler_434_khz": 6568, "doppler_144_khz": 2189}, + {"time_sec": 282, "doppler_434_khz": 6504, "doppler_144_khz": 2168}, + {"time_sec": 283, "doppler_434_khz": 6373, "doppler_144_khz": 2124}, + {"time_sec": 284, "doppler_434_khz": 6305, "doppler_144_khz": 2102}, + {"time_sec": 285, "doppler_434_khz": 6235, "doppler_144_khz": 2078}, + {"time_sec": 286, "doppler_434_khz": 6165, "doppler_144_khz": 2055}, + {"time_sec": 287, "doppler_434_khz": 6020, "doppler_144_khz": 2007}, + {"time_sec": 288, "doppler_434_khz": 5945, "doppler_144_khz": 1982}, + {"time_sec": 289, "doppler_434_khz": 5868, "doppler_144_khz": 1956}, + {"time_sec": 290, "doppler_434_khz": 5791, "doppler_144_khz": 1930}, + {"time_sec": 291, "doppler_434_khz": 5711, "doppler_144_khz": 1904}, + {"time_sec": 292, "doppler_434_khz": 5548, "doppler_144_khz": 1849}, + {"time_sec": 293, "doppler_434_khz": 5464, "doppler_144_khz": 1821}, + {"time_sec": 294, "doppler_434_khz": 5379, "doppler_144_khz": 1793}, + {"time_sec": 295, "doppler_434_khz": 5292, "doppler_144_khz": 1764}, + {"time_sec": 296, "doppler_434_khz": 5113, "doppler_144_khz": 1704}, + {"time_sec": 297, "doppler_434_khz": 5022, "doppler_144_khz": 1674}, + {"time_sec": 298, "doppler_434_khz": 4928, "doppler_144_khz": 1643}, + {"time_sec": 299, "doppler_434_khz": 4834, "doppler_144_khz": 1611}, + {"time_sec": 300, "doppler_434_khz": 4640, "doppler_144_khz": 1547}, + {"time_sec": 301, "doppler_434_khz": 4540, "doppler_144_khz": 1513}, + {"time_sec": 302, "doppler_434_khz": 4438, "doppler_144_khz": 1479}, + {"time_sec": 303, "doppler_434_khz": 4334, "doppler_144_khz": 1445}, + {"time_sec": 304, "doppler_434_khz": 4229, "doppler_144_khz": 1410}, + {"time_sec": 305, "doppler_434_khz": 4016, "doppler_144_khz": 1339}, + {"time_sec": 306, "doppler_434_khz": 3907, "doppler_144_khz": 1302}, + {"time_sec": 307, "doppler_434_khz": 3796, "doppler_144_khz": 1265}, + {"time_sec": 308, "doppler_434_khz": 3684, "doppler_144_khz": 1228}, + {"time_sec": 309, "doppler_434_khz": 3448, "doppler_144_khz": 1149}, + {"time_sec": 310, "doppler_434_khz": 3330, "doppler_144_khz": 1110}, + {"time_sec": 311, "doppler_434_khz": 3212, "doppler_144_khz": 1071}, + {"time_sec": 312, "doppler_434_khz": 3091, "doppler_144_khz": 1030}, + {"time_sec": 313, "doppler_434_khz": 2969, "doppler_144_khz": 990}, + {"time_sec": 314, "doppler_434_khz": 2722, "doppler_144_khz": 907}, + {"time_sec": 315, "doppler_434_khz": 2595, "doppler_144_khz": 865}, + {"time_sec": 316, "doppler_434_khz": 2466, "doppler_144_khz": 822}, + {"time_sec": 317, "doppler_434_khz": 2337, "doppler_144_khz": 779}, + {"time_sec": 318, "doppler_434_khz": 2206, "doppler_144_khz": 735}, + {"time_sec": 319, "doppler_434_khz": 1941, "doppler_144_khz": 647}, + {"time_sec": 320, "doppler_434_khz": 1807, "doppler_144_khz": 602}, + {"time_sec": 321, "doppler_434_khz": 1672, "doppler_144_khz": 557}, + {"time_sec": 322, "doppler_434_khz": 1536, "doppler_144_khz": 512}, + {"time_sec": 323, "doppler_434_khz": 1395, "doppler_144_khz": 465}, + {"time_sec": 324, "doppler_434_khz": 1119, "doppler_144_khz": 373}, + {"time_sec": 325, "doppler_434_khz": 979, "doppler_144_khz": 326}, + {"time_sec": 326, "doppler_434_khz": 839, "doppler_144_khz": 280}, + {"time_sec": 327, "doppler_434_khz": 699, "doppler_144_khz": 233}, + {"time_sec": 328, "doppler_434_khz": 418, "doppler_144_khz": 139}, + {"time_sec": 329, "doppler_434_khz": 277, "doppler_144_khz": 92}, + {"time_sec": 330, "doppler_434_khz": 137, "doppler_144_khz": 46}, + {"time_sec": 331, "doppler_434_khz": -2, "doppler_144_khz": 0}, + {"time_sec": 332, "doppler_434_khz": -143, "doppler_144_khz": -47}, + {"time_sec": 333, "doppler_434_khz": -427, "doppler_144_khz": -142}, + {"time_sec": 334, "doppler_434_khz": -569, "doppler_144_khz": -189}, + {"time_sec": 335, "doppler_434_khz": -709, "doppler_144_khz": -236}, + {"time_sec": 336, "doppler_434_khz": -848, "doppler_144_khz": -282}, + {"time_sec": 337, "doppler_434_khz": -987, "doppler_144_khz": -328}, + {"time_sec": 338, "doppler_434_khz": -1263, "doppler_144_khz": -420}, + {"time_sec": 339, "doppler_434_khz": -1400, "doppler_144_khz": -466}, + {"time_sec": 340, "doppler_434_khz": -1537, "doppler_144_khz": -512}, + {"time_sec": 341, "doppler_434_khz": -1672, "doppler_144_khz": -557}, + {"time_sec": 342, "doppler_434_khz": -1806, "doppler_144_khz": -601}, + {"time_sec": 343, "doppler_434_khz": -2072, "doppler_144_khz": -690}, + {"time_sec": 344, "doppler_434_khz": -2204, "doppler_144_khz": -734}, + {"time_sec": 345, "doppler_434_khz": -2335, "doppler_144_khz": -778}, + {"time_sec": 346, "doppler_434_khz": -2471, "doppler_144_khz": -823}, + {"time_sec": 347, "doppler_434_khz": -2599, "doppler_144_khz": -866}, + {"time_sec": 348, "doppler_434_khz": -2851, "doppler_144_khz": -950}, + {"time_sec": 349, "doppler_434_khz": -2975, "doppler_144_khz": -991}, + {"time_sec": 350, "doppler_434_khz": -3098, "doppler_144_khz": -1032}, + {"time_sec": 351, "doppler_434_khz": -3220, "doppler_144_khz": -1073}, + {"time_sec": 352, "doppler_434_khz": -3458, "doppler_144_khz": -1152}, + {"time_sec": 353, "doppler_434_khz": -3574, "doppler_144_khz": -1191}, + {"time_sec": 354, "doppler_434_khz": -3693, "doppler_144_khz": -1230}, + {"time_sec": 355, "doppler_434_khz": -3807, "doppler_144_khz": -1268}, + {"time_sec": 356, "doppler_434_khz": -3921, "doppler_144_khz": -1306}, + {"time_sec": 357, "doppler_434_khz": -4141, "doppler_144_khz": -1380}, + {"time_sec": 358, "doppler_434_khz": -4249, "doppler_144_khz": -1416}, + {"time_sec": 359, "doppler_434_khz": -4356, "doppler_144_khz": -1451}, + {"time_sec": 360, "doppler_434_khz": -4460, "doppler_144_khz": -1486}, + {"time_sec": 361, "doppler_434_khz": -4563, "doppler_144_khz": -1520}, + {"time_sec": 362, "doppler_434_khz": -4763, "doppler_144_khz": -1587}, + {"time_sec": 363, "doppler_434_khz": -4861, "doppler_144_khz": -1620}, + {"time_sec": 364, "doppler_434_khz": -4956, "doppler_144_khz": -1651}, + {"time_sec": 365, "doppler_434_khz": -5050, "doppler_144_khz": -1683}, + {"time_sec": 366, "doppler_434_khz": -5142, "doppler_144_khz": -1713}, + {"time_sec": 367, "doppler_434_khz": -5323, "doppler_144_khz": -1774}, + {"time_sec": 368, "doppler_434_khz": -5410, "doppler_144_khz": -1803}, + {"time_sec": 369, "doppler_434_khz": -5497, "doppler_144_khz": -1832}, + {"time_sec": 370, "doppler_434_khz": -5582, "doppler_144_khz": -1860}, + {"time_sec": 371, "doppler_434_khz": -5665, "doppler_144_khz": -1888}, + {"time_sec": 372, "doppler_434_khz": -5825, "doppler_144_khz": -1941}, + {"time_sec": 373, "doppler_434_khz": -5904, "doppler_144_khz": -1967}, + {"time_sec": 374, "doppler_434_khz": -5981, "doppler_144_khz": -1993}, + {"time_sec": 375, "doppler_434_khz": -6056, "doppler_144_khz": -2018}, + {"time_sec": 376, "doppler_434_khz": -6203, "doppler_144_khz": -2067}, + {"time_sec": 377, "doppler_434_khz": -6275, "doppler_144_khz": -2091}, + {"time_sec": 378, "doppler_434_khz": -6344, "doppler_144_khz": -2114}, + {"time_sec": 379, "doppler_434_khz": -6413, "doppler_144_khz": -2137}, + {"time_sec": 380, "doppler_434_khz": -6479, "doppler_144_khz": -2159}, + {"time_sec": 381, "doppler_434_khz": -6609, "doppler_144_khz": -2202}, + {"time_sec": 382, "doppler_434_khz": -6676, "doppler_144_khz": -2225}, + {"time_sec": 383, "doppler_434_khz": -6738, "doppler_144_khz": -2245}, + {"time_sec": 384, "doppler_434_khz": -6798, "doppler_144_khz": -2265}, + {"time_sec": 385, "doppler_434_khz": -6858, "doppler_144_khz": -2285}, + {"time_sec": 386, "doppler_434_khz": -6974, "doppler_144_khz": -2324}, + {"time_sec": 387, "doppler_434_khz": -7031, "doppler_144_khz": -2343}, + {"time_sec": 388, "doppler_434_khz": -7086, "doppler_144_khz": -2361}, + {"time_sec": 389, "doppler_434_khz": -7139, "doppler_144_khz": -2379}, + {"time_sec": 390, "doppler_434_khz": -7191, "doppler_144_khz": -2396}, + {"time_sec": 391, "doppler_434_khz": -7292, "doppler_144_khz": -2430}, + {"time_sec": 392, "doppler_434_khz": -7342, "doppler_144_khz": -2447}, + {"time_sec": 393, "doppler_434_khz": -7390, "doppler_144_khz": -2463}, + {"time_sec": 394, "doppler_434_khz": -7437, "doppler_144_khz": -2478}, + {"time_sec": 395, "doppler_434_khz": -7483, "doppler_144_khz": -2494}, + {"time_sec": 396, "doppler_434_khz": -7573, "doppler_144_khz": -2524}, + {"time_sec": 397, "doppler_434_khz": -7617, "doppler_144_khz": -2538}, + {"time_sec": 398, "doppler_434_khz": -7659, "doppler_144_khz": -2552}, + {"time_sec": 399, "doppler_434_khz": -7701, "doppler_144_khz": -2566}, + {"time_sec": 400, "doppler_434_khz": -7742, "doppler_144_khz": -2580}, + {"time_sec": 401, "doppler_434_khz": -7821, "doppler_144_khz": -2606}, + {"time_sec": 402, "doppler_434_khz": -7860, "doppler_144_khz": -2619}, + {"time_sec": 403, "doppler_434_khz": -7898, "doppler_144_khz": -2632}, + {"time_sec": 404, "doppler_434_khz": -7935, "doppler_144_khz": -2644}, + {"time_sec": 405, "doppler_434_khz": -7971, "doppler_144_khz": -2656}, + {"time_sec": 406, "doppler_434_khz": -8041, "doppler_144_khz": -2680}, + {"time_sec": 407, "doppler_434_khz": -8076, "doppler_144_khz": -2691}, + {"time_sec": 408, "doppler_434_khz": -8109, "doppler_144_khz": -2702}, + {"time_sec": 409, "doppler_434_khz": -8142, "doppler_144_khz": -2713}, + {"time_sec": 410, "doppler_434_khz": -8205, "doppler_144_khz": -2734}, + {"time_sec": 411, "doppler_434_khz": -8236, "doppler_144_khz": -2745}, + {"time_sec": 412, "doppler_434_khz": -8266, "doppler_144_khz": -2755}, + {"time_sec": 413, "doppler_434_khz": -8296, "doppler_144_khz": -2765}, + {"time_sec": 414, "doppler_434_khz": -8325, "doppler_144_khz": -2774}, + {"time_sec": 415, "doppler_434_khz": -8381, "doppler_144_khz": -2793}, + {"time_sec": 416, "doppler_434_khz": -8408, "doppler_144_khz": -2802}, + {"time_sec": 417, "doppler_434_khz": -8435, "doppler_144_khz": -2811}, + {"time_sec": 418, "doppler_434_khz": -8462, "doppler_144_khz": -2820}, + {"time_sec": 419, "doppler_434_khz": -8487, "doppler_144_khz": -2828}, + {"time_sec": 420, "doppler_434_khz": -8539, "doppler_144_khz": -2846}, + {"time_sec": 421, "doppler_434_khz": -8563, "doppler_144_khz": -2854}, + {"time_sec": 422, "doppler_434_khz": -8587, "doppler_144_khz": -2862}, + {"time_sec": 423, "doppler_434_khz": -8610, "doppler_144_khz": -2869}, + {"time_sec": 424, "doppler_434_khz": -8633, "doppler_144_khz": -2877}, + {"time_sec": 425, "doppler_434_khz": -8678, "doppler_144_khz": -2892}, + {"time_sec": 426, "doppler_434_khz": -8700, "doppler_144_khz": -2899}, + {"time_sec": 427, "doppler_434_khz": -8721, "doppler_144_khz": -2906}, + {"time_sec": 428, "doppler_434_khz": -8742, "doppler_144_khz": -2913}, + {"time_sec": 429, "doppler_434_khz": -8762, "doppler_144_khz": -2920}, + {"time_sec": 430, "doppler_434_khz": -8802, "doppler_144_khz": -2933}, + {"time_sec": 431, "doppler_434_khz": -8822, "doppler_144_khz": -2940}, + {"time_sec": 432, "doppler_434_khz": -8841, "doppler_144_khz": -2946}, + {"time_sec": 433, "doppler_434_khz": -8860, "doppler_144_khz": -2953}, + {"time_sec": 434, "doppler_434_khz": -8878, "doppler_144_khz": -2959}, + {"time_sec": 435, "doppler_434_khz": -8915, "doppler_144_khz": -2971}, + {"time_sec": 436, "doppler_434_khz": -8932, "doppler_144_khz": -2977}, + {"time_sec": 437, "doppler_434_khz": -8949, "doppler_144_khz": -2982}, + {"time_sec": 438, "doppler_434_khz": -8966, "doppler_144_khz": -2988}, + {"time_sec": 439, "doppler_434_khz": -8982, "doppler_144_khz": -2993}, + {"time_sec": 440, "doppler_434_khz": -9015, "doppler_144_khz": -3004}, + {"time_sec": 441, "doppler_434_khz": -9030, "doppler_144_khz": -3009}, + {"time_sec": 442, "doppler_434_khz": -9045, "doppler_144_khz": -3014}, + {"time_sec": 443, "doppler_434_khz": -9061, "doppler_144_khz": -3020}, + {"time_sec": 444, "doppler_434_khz": -9075, "doppler_144_khz": -3024}, + {"time_sec": 445, "doppler_434_khz": -9104, "doppler_144_khz": -3034}, + {"time_sec": 446, "doppler_434_khz": -9118, "doppler_144_khz": -3039}, + {"time_sec": 447, "doppler_434_khz": -9132, "doppler_144_khz": -3043}, + {"time_sec": 448, "doppler_434_khz": -9146, "doppler_144_khz": -3048}, + {"time_sec": 449, "doppler_434_khz": -9172, "doppler_144_khz": -3057}, + {"time_sec": 450, "doppler_434_khz": -9185, "doppler_144_khz": -3061}, + {"time_sec": 451, "doppler_434_khz": -9197, "doppler_144_khz": -3065}, + {"time_sec": 452, "doppler_434_khz": -9210, "doppler_144_khz": -3069}, + {"time_sec": 453, "doppler_434_khz": -9222, "doppler_144_khz": -3073}, + {"time_sec": 454, "doppler_434_khz": -9246, "doppler_144_khz": -3081}, + {"time_sec": 455, "doppler_434_khz": -9258, "doppler_144_khz": -3085}, + {"time_sec": 456, "doppler_434_khz": -9270, "doppler_144_khz": -3089}, + {"time_sec": 457, "doppler_434_khz": -9281, "doppler_144_khz": -3093}, + {"time_sec": 458, "doppler_434_khz": -9292, "doppler_144_khz": -3097}, + {"time_sec": 459, "doppler_434_khz": -9313, "doppler_144_khz": -3104}, + {"time_sec": 460, "doppler_434_khz": -9324, "doppler_144_khz": -3107}, + {"time_sec": 461, "doppler_434_khz": -9334, "doppler_144_khz": -3111}, + {"time_sec": 462, "doppler_434_khz": -9344, "doppler_144_khz": -3114}, + {"time_sec": 463, "doppler_434_khz": -9354, "doppler_144_khz": -3117}, + {"time_sec": 464, "doppler_434_khz": -9374, "doppler_144_khz": -3124}, + {"time_sec": 465, "doppler_434_khz": -9383, "doppler_144_khz": -3127}, + {"time_sec": 466, "doppler_434_khz": -9393, "doppler_144_khz": -3130}, + {"time_sec": 467, "doppler_434_khz": -9402, "doppler_144_khz": -3133}, + {"time_sec": 468, "doppler_434_khz": -9411, "doppler_144_khz": -3136}, + {"time_sec": 469, "doppler_434_khz": -9429, "doppler_144_khz": -3142}, + {"time_sec": 470, "doppler_434_khz": -9438, "doppler_144_khz": -3145}, + {"time_sec": 471, "doppler_434_khz": -9446, "doppler_144_khz": -3148}, + {"time_sec": 472, "doppler_434_khz": -9454, "doppler_144_khz": -3151}, + {"time_sec": 473, "doppler_434_khz": -9470, "doppler_144_khz": -3156}, + {"time_sec": 474, "doppler_434_khz": -9478, "doppler_144_khz": -3159}, + {"time_sec": 475, "doppler_434_khz": -9486, "doppler_144_khz": -3161}, + {"time_sec": 476, "doppler_434_khz": -9494, "doppler_144_khz": -3164}, + {"time_sec": 477, "doppler_434_khz": -9501, "doppler_144_khz": -3166}, + {"time_sec": 478, "doppler_434_khz": -9516, "doppler_144_khz": -3171}, + {"time_sec": 479, "doppler_434_khz": -9523, "doppler_144_khz": -3174}, + {"time_sec": 480, "doppler_434_khz": -9530, "doppler_144_khz": -3176}, + {"time_sec": 481, "doppler_434_khz": -9537, "doppler_144_khz": -3178}, + {"time_sec": 482, "doppler_434_khz": -9551, "doppler_144_khz": -3183}, + {"time_sec": 483, "doppler_434_khz": -9557, "doppler_144_khz": -3185}, + {"time_sec": 484, "doppler_434_khz": -9564, "doppler_144_khz": -3187}, + {"time_sec": 485, "doppler_434_khz": -9570, "doppler_144_khz": -3189}, + {"time_sec": 486, "doppler_434_khz": -9583, "doppler_144_khz": -3194}, + {"time_sec": 487, "doppler_434_khz": -9589, "doppler_144_khz": -3196}, + {"time_sec": 488, "doppler_434_khz": -9595, "doppler_144_khz": -3198}, + {"time_sec": 489, "doppler_434_khz": -9601, "doppler_144_khz": -3200}, + {"time_sec": 490, "doppler_434_khz": -9607, "doppler_144_khz": -3202}, + {"time_sec": 491, "doppler_434_khz": -9619, "doppler_144_khz": -3206}, + {"time_sec": 492, "doppler_434_khz": -9625, "doppler_144_khz": -3208}, + {"time_sec": 493, "doppler_434_khz": -9630, "doppler_144_khz": -3209}, + {"time_sec": 494, "doppler_434_khz": -9636, "doppler_144_khz": -3211}, + {"time_sec": 495, "doppler_434_khz": -9642, "doppler_144_khz": -3213}, + {"time_sec": 496, "doppler_434_khz": -9652, "doppler_144_khz": -3217}, + {"time_sec": 497, "doppler_434_khz": -9658, "doppler_144_khz": -3219}, + {"time_sec": 498, "doppler_434_khz": -9663, "doppler_144_khz": -3220}, + {"time_sec": 499, "doppler_434_khz": -9668, "doppler_144_khz": -3222}, + {"time_sec": 500, "doppler_434_khz": -9678, "doppler_144_khz": -3225}, + {"time_sec": 501, "doppler_434_khz": -9683, "doppler_144_khz": -3227}, + {"time_sec": 502, "doppler_434_khz": -9687, "doppler_144_khz": -3228}, + {"time_sec": 503, "doppler_434_khz": -9692, "doppler_144_khz": -3230}, + {"time_sec": 504, "doppler_434_khz": -9697, "doppler_144_khz": -3232}, + {"time_sec": 505, "doppler_434_khz": -9706, "doppler_144_khz": -3235}, + {"time_sec": 506, "doppler_434_khz": -9710, "doppler_144_khz": -3236}, + {"time_sec": 507, "doppler_434_khz": -9715, "doppler_144_khz": -3238}, + {"time_sec": 508, "doppler_434_khz": -9719, "doppler_144_khz": -3239}, + {"time_sec": 509, "doppler_434_khz": -9727, "doppler_144_khz": -3242}, + {"time_sec": 510, "doppler_434_khz": -9732, "doppler_144_khz": -3243}, + {"time_sec": 511, "doppler_434_khz": -9736, "doppler_144_khz": -3245}, + {"time_sec": 512, "doppler_434_khz": -9740, "doppler_144_khz": -3246}, + {"time_sec": 513, "doppler_434_khz": -9747, "doppler_144_khz": -3248}, + {"time_sec": 514, "doppler_434_khz": -9751, "doppler_144_khz": -3250}, + {"time_sec": 515, "doppler_434_khz": -9755, "doppler_144_khz": -3251}, + {"time_sec": 516, "doppler_434_khz": -9759, "doppler_144_khz": -3252}, + {"time_sec": 517, "doppler_434_khz": -9763, "doppler_144_khz": -3254}, + {"time_sec": 518, "doppler_434_khz": -9770, "doppler_144_khz": -3256}, + {"time_sec": 519, "doppler_434_khz": -9773, "doppler_144_khz": -3257}, + {"time_sec": 520, "doppler_434_khz": -9777, "doppler_144_khz": -3258}, + {"time_sec": 521, "doppler_434_khz": -9780, "doppler_144_khz": -3259}, + {"time_sec": 522, "doppler_434_khz": -9787, "doppler_144_khz": -3262}, + {"time_sec": 523, "doppler_434_khz": -9791, "doppler_144_khz": -3263}, + {"time_sec": 524, "doppler_434_khz": -9794, "doppler_144_khz": -3264}, + {"time_sec": 525, "doppler_434_khz": -9797, "doppler_144_khz": -3265}, + {"time_sec": 526, "doppler_434_khz": -9800, "doppler_144_khz": -3266}, + {"time_sec": 527, "doppler_434_khz": -9807, "doppler_144_khz": -3268}, + {"time_sec": 528, "doppler_434_khz": -9810, "doppler_144_khz": -3269}, + {"time_sec": 529, "doppler_434_khz": -9813, "doppler_144_khz": -3270}, + {"time_sec": 530, "doppler_434_khz": -9816, "doppler_144_khz": -3271}, + {"time_sec": 531, "doppler_434_khz": -9822, "doppler_144_khz": -3273}, + {"time_sec": 532, "doppler_434_khz": -9825, "doppler_144_khz": -3274}, + {"time_sec": 533, "doppler_434_khz": -9827, "doppler_144_khz": -3275}, + {"time_sec": 534, "doppler_434_khz": -9830, "doppler_144_khz": -3276}, + {"time_sec": 535, "doppler_434_khz": -9833, "doppler_144_khz": -3277}, + {"time_sec": 536, "doppler_434_khz": -9838, "doppler_144_khz": -3279}, + {"time_sec": 537, "doppler_434_khz": -9841, "doppler_144_khz": -3280}, + {"time_sec": 538, "doppler_434_khz": -9843, "doppler_144_khz": -3280}, + {"time_sec": 539, "doppler_434_khz": -9846, "doppler_144_khz": -3281}, + {"time_sec": 540, "doppler_434_khz": -9851, "doppler_144_khz": -3283}, + {"time_sec": 541, "doppler_434_khz": -9853, "doppler_144_khz": -3284}, + {"time_sec": 542, "doppler_434_khz": -9856, "doppler_144_khz": -3285}, + {"time_sec": 543, "doppler_434_khz": -9858, "doppler_144_khz": -3285}, + {"time_sec": 544, "doppler_434_khz": -9861, "doppler_144_khz": -3286}, + {"time_sec": 545, "doppler_434_khz": -9865, "doppler_144_khz": -3288}, + {"time_sec": 546, "doppler_434_khz": -9867, "doppler_144_khz": -3288}, + {"time_sec": 547, "doppler_434_khz": -9870, "doppler_144_khz": -3289}, + {"time_sec": 548, "doppler_434_khz": -9872, "doppler_144_khz": -3290}, + {"time_sec": 549, "doppler_434_khz": -9876, "doppler_144_khz": -3291}, + {"time_sec": 550, "doppler_434_khz": -9878, "doppler_144_khz": -3292}, + {"time_sec": 551, "doppler_434_khz": -9880, "doppler_144_khz": -3293}, + {"time_sec": 552, "doppler_434_khz": -9882, "doppler_144_khz": -3293}, + {"time_sec": 553, "doppler_434_khz": -9886, "doppler_144_khz": -3295}, + {"time_sec": 554, "doppler_434_khz": -9888, "doppler_144_khz": -3295}, + {"time_sec": 555, "doppler_434_khz": -9890, "doppler_144_khz": -3296}, + {"time_sec": 556, "doppler_434_khz": -9892, "doppler_144_khz": -3297}, + {"time_sec": 557, "doppler_434_khz": -9894, "doppler_144_khz": -3297}, + {"time_sec": 558, "doppler_434_khz": -9898, "doppler_144_khz": -3299}, + {"time_sec": 559, "doppler_434_khz": -9899, "doppler_144_khz": -3299}, + {"time_sec": 560, "doppler_434_khz": -9901, "doppler_144_khz": -3300}, + {"time_sec": 561, "doppler_434_khz": -9903, "doppler_144_khz": -3300}, + {"time_sec": 562, "doppler_434_khz": -9906, "doppler_144_khz": -3301}, + {"time_sec": 563, "doppler_434_khz": -9908, "doppler_144_khz": -3302}, + {"time_sec": 564, "doppler_434_khz": -9910, "doppler_144_khz": -3303}, + {"time_sec": 565, "doppler_434_khz": -9911, "doppler_144_khz": -3303}, + {"time_sec": 566, "doppler_434_khz": -9913, "doppler_144_khz": -3304}, + {"time_sec": 567, "doppler_434_khz": -9916, "doppler_144_khz": -3305}, + {"time_sec": 568, "doppler_434_khz": -9918, "doppler_144_khz": -3305}, + {"time_sec": 569, "doppler_434_khz": -9919, "doppler_144_khz": -3306}, + {"time_sec": 570, "doppler_434_khz": -9921, "doppler_144_khz": -3306}, + {"time_sec": 571, "doppler_434_khz": -9923, "doppler_144_khz": -3307}, + {"time_sec": 572, "doppler_434_khz": -9925, "doppler_144_khz": -3308}, + {"time_sec": 573, "doppler_434_khz": -9926, "doppler_144_khz": -3308}, + {"time_sec": 574, "doppler_434_khz": -9928, "doppler_144_khz": -3309}, + {"time_sec": 575, "doppler_434_khz": -9930, "doppler_144_khz": -3309}, + {"time_sec": 576, "doppler_434_khz": -9932, "doppler_144_khz": -3310}, + {"time_sec": 577, "doppler_434_khz": -9933, "doppler_144_khz": -3310}, + {"time_sec": 578, "doppler_434_khz": -9934, "doppler_144_khz": -3311}, + {"time_sec": 579, "doppler_434_khz": -9936, "doppler_144_khz": -3311}, + {"time_sec": 580, "doppler_434_khz": -9938, "doppler_144_khz": -3312}, + {"time_sec": 581, "doppler_434_khz": -9939, "doppler_144_khz": -3312}, + {"time_sec": 582, "doppler_434_khz": -9940, "doppler_144_khz": -3313}, + {"time_sec": 583, "doppler_434_khz": -9942, "doppler_144_khz": -3313}, + {"time_sec": 584, "doppler_434_khz": -9944, "doppler_144_khz": -3314}, + {"time_sec": 585, "doppler_434_khz": -9945, "doppler_144_khz": -3314}, + {"time_sec": 586, "doppler_434_khz": -9946, "doppler_144_khz": -3315}, + {"time_sec": 587, "doppler_434_khz": -9947, "doppler_144_khz": -3315}, + {"time_sec": 588, "doppler_434_khz": -9949, "doppler_144_khz": -3316}, + {"time_sec": 589, "doppler_434_khz": -9950, "doppler_144_khz": -3316}, + {"time_sec": 590, "doppler_434_khz": -9951, "doppler_144_khz": -3316}, + {"time_sec": 591, "doppler_434_khz": -9952, "doppler_144_khz": -3317}, + {"time_sec": 592, "doppler_434_khz": -9953, "doppler_144_khz": -3317}, + {"time_sec": 593, "doppler_434_khz": -9955, "doppler_144_khz": -3318}, + {"time_sec": 594, "doppler_434_khz": -9956, "doppler_144_khz": -3318}, + {"time_sec": 595, "doppler_434_khz": -9957, "doppler_144_khz": -3318}, + {"time_sec": 596, "doppler_434_khz": -9958, "doppler_144_khz": -3319}, + {"time_sec": 597, "doppler_434_khz": -9960, "doppler_144_khz": -3319}, + {"time_sec": 598, "doppler_434_khz": -9961, "doppler_144_khz": -3320}, + {"time_sec": 599, "doppler_434_khz": -9961, "doppler_144_khz": -3320}, + {"time_sec": 600, "doppler_434_khz": -9962, "doppler_144_khz": -3320}, + {"time_sec": 601, "doppler_434_khz": -9963, "doppler_144_khz": -3320}, + {"time_sec": 602, "doppler_434_khz": -9965, "doppler_144_khz": -3321}, + {"time_sec": 603, "doppler_434_khz": -9965, "doppler_144_khz": -3321}, + {"time_sec": 604, "doppler_434_khz": -9966, "doppler_144_khz": -3321}, + {"time_sec": 605, "doppler_434_khz": -9967, "doppler_144_khz": -3322}, + {"time_sec": 606, "doppler_434_khz": -9968, "doppler_144_khz": -3322}, + {"time_sec": 607, "doppler_434_khz": -9969, "doppler_144_khz": -3322}, + {"time_sec": 608, "doppler_434_khz": -9970, "doppler_144_khz": -3323}, + {"time_sec": 609, "doppler_434_khz": -9970, "doppler_144_khz": -3323}, + {"time_sec": 610, "doppler_434_khz": -9972, "doppler_144_khz": -3323}, + {"time_sec": 611, "doppler_434_khz": -9972, "doppler_144_khz": -3323}, + {"time_sec": 612, "doppler_434_khz": -9973, "doppler_144_khz": -3324}, + {"time_sec": 613, "doppler_434_khz": -9974, "doppler_144_khz": -3324}, + {"time_sec": 614, "doppler_434_khz": -9974, "doppler_144_khz": -3324}, + {"time_sec": 615, "doppler_434_khz": -9975, "doppler_144_khz": -3324}, + {"time_sec": 616, "doppler_434_khz": -9976, "doppler_144_khz": -3325}, + {"time_sec": 617, "doppler_434_khz": -9976, "doppler_144_khz": -3325}, + {"time_sec": 618, "doppler_434_khz": -9977, "doppler_144_khz": -3325}, + {"time_sec": 619, "doppler_434_khz": -9978, "doppler_144_khz": -3325}, + {"time_sec": 620, "doppler_434_khz": -9978, "doppler_144_khz": -3325}, + {"time_sec": 621, "doppler_434_khz": -9979, "doppler_144_khz": -3326}, + {"time_sec": 622, "doppler_434_khz": -9979, "doppler_144_khz": -3326}, + {"time_sec": 623, "doppler_434_khz": -9980, "doppler_144_khz": -3326}, + {"time_sec": 624, "doppler_434_khz": -9981, "doppler_144_khz": -3326}, + {"time_sec": 625, "doppler_434_khz": -9981, "doppler_144_khz": -3326}, + {"time_sec": 626, "doppler_434_khz": -9982, "doppler_144_khz": -3327}, + {"time_sec": 627, "doppler_434_khz": -9982, "doppler_144_khz": -3327}, + {"time_sec": 628, "doppler_434_khz": -9983, "doppler_144_khz": -3327}, + {"time_sec": 629, "doppler_434_khz": -9983, "doppler_144_khz": -3327}, + {"time_sec": 630, "doppler_434_khz": -9984, "doppler_144_khz": -3327}, + {"time_sec": 631, "doppler_434_khz": -9984, "doppler_144_khz": -3327}, + {"time_sec": 632, "doppler_434_khz": -9985, "doppler_144_khz": -3328}, + {"time_sec": 633, "doppler_434_khz": -9985, "doppler_144_khz": -3328}, + {"time_sec": 634, "doppler_434_khz": -9985, "doppler_144_khz": -3328}, + {"time_sec": 635, "doppler_434_khz": -9986, "doppler_144_khz": -3328}, + {"time_sec": 636, "doppler_434_khz": -9986, "doppler_144_khz": -3328}, + {"time_sec": 637, "doppler_434_khz": -9986, "doppler_144_khz": -3328}, + {"time_sec": 638, "doppler_434_khz": -9987, "doppler_144_khz": -3328}, + {"time_sec": 639, "doppler_434_khz": -9987, "doppler_144_khz": -3328}, + {"time_sec": 640, "doppler_434_khz": -9987, "doppler_144_khz": -3328}, + {"time_sec": 641, "doppler_434_khz": -9988, "doppler_144_khz": -3329}, + {"time_sec": 642, "doppler_434_khz": -9988, "doppler_144_khz": -3329}, + {"time_sec": 643, "doppler_434_khz": -9988, "doppler_144_khz": -3329}, + {"time_sec": 644, "doppler_434_khz": -9988, "doppler_144_khz": -3329}, + {"time_sec": 645, "doppler_434_khz": -9988, "doppler_144_khz": -3329}, + {"time_sec": 646, "doppler_434_khz": -9989, "doppler_144_khz": -3329}, + {"time_sec": 647, "doppler_434_khz": -9989, "doppler_144_khz": -3329}, + {"time_sec": 648, "doppler_434_khz": -9989, "doppler_144_khz": -3329}, + {"time_sec": 649, "doppler_434_khz": -9989, "doppler_144_khz": -3329}, + {"time_sec": 650, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 651, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 652, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 653, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 654, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 655, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 656, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 657, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 658, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 659, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 660, "doppler_434_khz": -9990, "doppler_144_khz": -3329}, + {"time_sec": 661, "doppler_434_khz": -9990, "doppler_144_khz": -3329} ] } @@ -259,10 +688,10 @@ def update_doppler(): global tx print("update_doppler") try: - relative_time = (time.perf_counter() - start_time) % 370 + relative_time = (time.perf_counter() - start_time) % 661 except: start_time = time.perf_counter() - relative_time = (time.perf_counter() - start_time) % 370 + relative_time = (time.perf_counter() - start_time) % 661 index = int(relative_time/10) print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") table_row = doppler_table[index] @@ -384,14 +813,14 @@ if (doppler_mode == 'sim'): rx_doppler_shift_hz = 0 print(f"Rx center frequency: {rx_doppler_start_hz}") - TARGET_PASS = 85 # Maximum elevation profile + TARGET_PASS = 88 # Maximum elevation profile doppler_table = iss_doppler_passes[TARGET_PASS] print(f"Pass Max Elevation: {TARGET_PASS}°") start_time = time.perf_counter() current_index = 0; while True: - relative_time = (time.perf_counter() - start_time) % 370 + relative_time = (time.perf_counter() - start_time) % 661 index = int(relative_time/10) % 37 if (index > current_index): current_index = index From b7edaabe94b444abb25dce235d97a4b4b7f87df8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 11:24:37 -0400 Subject: [PATCH 1172/1744] Update frequency.py not kHz anymore --- frequency.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frequency.py b/frequency.py index 68635640..5b035e55 100644 --- a/frequency.py +++ b/frequency.py @@ -826,9 +826,9 @@ if (doppler_mode == 'sim'): current_index = index print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + rx_doppler_shift_hz = table_row["doppler_434_khz"] # * 1000 if (mode == 'e'): - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + tx_doppler_shift_hz = table_row["doppler_144_khz"] # * 1000 else: tx_doppler_shift_hz = rx_doppler_shift_hz tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz From 7cfe468966a12aa8abb21770f943c1c147c47db5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:04:34 -0400 Subject: [PATCH 1173/1744] Update transmit.py switch back to timeout --- transmit.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/transmit.py b/transmit.py index 48330c83..c770e391 100644 --- a/transmit.py +++ b/transmit.py @@ -620,18 +620,19 @@ def cw_transmit_char(character): def transmit_carrier(duration): global tx_doppler_freq_hz global txLed -# command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" killrpitx = "sudo killall -9 rpitx &" killtune = "sudo killall -9 tune &" output(txLed, 1) - system(start) - sleep(duration) - system(stop) +# system(start) + system(command) +# sleep(duration) +# system(stop) output(txLed, 0) - system(killrpitx) - system(killtune) +# system(killrpitx) +# system(killtune) print("CubeSatSim v2.2 transmit.py starting...") From 0a6d518be0ad01a8572e38034a1c3d79106260b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:08:53 -0400 Subject: [PATCH 1174/1744] Update frequency.py fix index --- frequency.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index 5b035e55..53013e66 100644 --- a/frequency.py +++ b/frequency.py @@ -692,7 +692,8 @@ def update_doppler(): except: start_time = time.perf_counter() relative_time = (time.perf_counter() - start_time) % 661 - index = int(relative_time/10) +# index = int(relative_time/10) + index = int(relative_time) print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") table_row = doppler_table[index] rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 From f991f3c44d0273bcb0e7e349c2e7c532218ac906 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:18:43 -0400 Subject: [PATCH 1175/1744] Update frequency.py fix index and kHz --- frequency.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frequency.py b/frequency.py index 53013e66..ccf2793d 100644 --- a/frequency.py +++ b/frequency.py @@ -696,9 +696,9 @@ def update_doppler(): index = int(relative_time) print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] * 1000 + rx_doppler_shift_hz = table_row["doppler_434_khz"] # * 1000 if (mode == 'e'): - tx_doppler_shift_hz = table_row["doppler_144_khz"] * 1000 + tx_doppler_shift_hz = table_row["doppler_144_khz"] # * 1000 else: tx_doppler_shift_hz = rx_doppler_shift_hz tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz @@ -822,7 +822,8 @@ if (doppler_mode == 'sim'): current_index = 0; while True: relative_time = (time.perf_counter() - start_time) % 661 - index = int(relative_time/10) % 37 +# index = int(relative_time/10) % 37 + index = int(relative_time) % 661 if (index > current_index): current_index = index print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") From 1433bd09ceeb8cbc7cd7955a6f1f0d6229c89615 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:25:05 -0400 Subject: [PATCH 1176/1744] Update transmit.py update_doppler every dit --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c770e391..674ec094 100644 --- a/transmit.py +++ b/transmit.py @@ -606,7 +606,7 @@ def cw_transmit_string(string): def cw_transmit_char(character): global morse_timing - update_doppler("no") +# update_doppler("no") i = 0 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing print(duration) @@ -620,6 +620,7 @@ def cw_transmit_char(character): def transmit_carrier(duration): global tx_doppler_freq_hz global txLed + update_doppler("no") command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" From ef3460534674a953b454d47f7bb814edf5aaf601 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:37:42 -0400 Subject: [PATCH 1177/1744] Update transmit.py faster CW --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 674ec094..d864fe3c 100644 --- a/transmit.py +++ b/transmit.py @@ -645,7 +645,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.1 +morse_timing = 0.05 # 0.1 command_tx = True From 449ba2fc32710793b19b9f50fb194470777cc392 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:44:13 -0400 Subject: [PATCH 1178/1744] Update frequency.py fix % 661 --- frequency.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frequency.py b/frequency.py index ccf2793d..e87411d4 100644 --- a/frequency.py +++ b/frequency.py @@ -821,12 +821,13 @@ if (doppler_mode == 'sim'): start_time = time.perf_counter() current_index = 0; while True: - relative_time = (time.perf_counter() - start_time) % 661 + relative_time = (time.perf_counter() - start_time) # index = int(relative_time/10) % 37 - index = int(relative_time) % 661 + index = int(relative_time) if (index > current_index): current_index = index - print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") + index = index % 661 + print(f"relative time: {relative_time:.1f} seconds after start is AOS index: {index}") table_row = doppler_table[index] rx_doppler_shift_hz = table_row["doppler_434_khz"] # * 1000 if (mode == 'e'): From e3fc9c5e5b722950001dd8f694e2fd011a787ca8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:45:07 -0400 Subject: [PATCH 1179/1744] Update transmit.py try 0.8 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d864fe3c..b27e1746 100644 --- a/transmit.py +++ b/transmit.py @@ -645,7 +645,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.05 # 0.1 +morse_timing = 0.08 # 0.1 command_tx = True From f510cd7802e9e5a81cf794907e24064852884ace Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:49:01 -0400 Subject: [PATCH 1180/1744] Update transmit.py add 1.25 scale --- transmit.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index b27e1746..ec7cb4aa 100644 --- a/transmit.py +++ b/transmit.py @@ -608,14 +608,18 @@ def cw_transmit_char(character): global morse_timing # update_doppler("no") i = 0 - duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing + duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] + if duration == 1: + duration = 1.25 print(duration) while (duration != 0): - transmit_carrier(duration) + transmit_carrier(duration * morse_timing) sleep(morse_timing) i=i+1 - duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] * morse_timing - sleep(morse_timing * 3.0) # 1.5); + duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] + if duration == 1: + duration = 1.25 + sleep(morse_timing * 3) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From 0ef51abb1db09b9dc1c297aec2e208abce8c6b39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 16:58:45 -0400 Subject: [PATCH 1181/1744] Update transmit.py modify timing --- transmit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index ec7cb4aa..31c29ec8 100644 --- a/transmit.py +++ b/transmit.py @@ -610,15 +610,15 @@ def cw_transmit_char(character): i = 0 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: - duration = 1.25 + duration = 1.2 print(duration) while (duration != 0): transmit_carrier(duration * morse_timing) - sleep(morse_timing) + sleep(morse_timing * 0.9) i=i+1 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: - duration = 1.25 + duration = 1.2 sleep(morse_timing * 3) # 1.5); def transmit_carrier(duration): From 0bc345c2aa7577810a14fd345bd079a890194667 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 17:02:58 -0400 Subject: [PATCH 1182/1744] Update transmit.py reduce inter dit timing --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 31c29ec8..d6951d81 100644 --- a/transmit.py +++ b/transmit.py @@ -614,7 +614,7 @@ def cw_transmit_char(character): print(duration) while (duration != 0): transmit_carrier(duration * morse_timing) - sleep(morse_timing * 0.9) + sleep(morse_timing * 0.7) i=i+1 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: From ec9f50fd7551fe14d979d783d09fa25b4b17f3d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 6 Jul 2026 17:05:01 -0400 Subject: [PATCH 1183/1744] Update transmit.py slow CW and shorter inter dit timing --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index d6951d81..933518cd 100644 --- a/transmit.py +++ b/transmit.py @@ -614,7 +614,7 @@ def cw_transmit_char(character): print(duration) while (duration != 0): transmit_carrier(duration * morse_timing) - sleep(morse_timing * 0.7) + sleep(morse_timing * 0.6) i=i+1 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: @@ -649,7 +649,7 @@ txc_pin = 7 squelch = 6 green = 16 powerPin = 16 -morse_timing = 0.08 # 0.1 +morse_timing = 0.09 # 0.1 command_tx = True From acb2f1055cbe3eeec15b4bfe8a04b849e5031ed2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jul 2026 17:28:33 -0400 Subject: [PATCH 1184/1744] Update frequency.py add --vfo to rigctl --- frequency.py | 59 ++++++++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 37 deletions(-) diff --git a/frequency.py b/frequency.py index e87411d4..1784ffe9 100644 --- a/frequency.py +++ b/frequency.py @@ -7,6 +7,24 @@ from time import sleep import sys from os import system +def check_frequency(): + + global tx_doppler_freq_hz + global rx_doppler_freq_hz + + if tx_doppler_freq_hz > 450000000: + tx_doppler_freq_hz = 435200000 + elif (tx_doppler_freq_hz < 420000000) and (tx_doppler_freq_hz > 148000000): + tx_doppler_freq_hz = 434700000 + if (tx_doppler_freq_hz < 144000000): + tx_doppler_freq_hz = 434600000 + + if rx_doppler_freq_hz > 450000000: + rx_doppler_freq_hz = 435200000 + elif (rx_doppler_freq_hz < 420000000) and (rx_doppler_freq_hz > 148000000): + rx_doppler_freq_hz = 434700000 + if (rx_doppler_freq_hz < 144000000): + rx_doppler_freq_hz = 434600000 iss_doppler_passes = { 88: [ @@ -674,41 +692,6 @@ iss_doppler_passes = { ] } -def update_doppler(): - - try: - global start_time - global tx_doppler_freq_hz - global rx_doppler_freq_hz - global rxpl_value - global txpl_value - global sq - global doppler_table - global mode - global tx - print("update_doppler") - try: - relative_time = (time.perf_counter() - start_time) % 661 - except: - start_time = time.perf_counter() - relative_time = (time.perf_counter() - start_time) % 661 -# index = int(relative_time/10) - index = int(relative_time) - print(f"relative time: {relative_time:.1f} seconds after AOS is index: {index}") - table_row = doppler_table[index] - rx_doppler_shift_hz = table_row["doppler_434_khz"] # * 1000 - if (mode == 'e'): - tx_doppler_shift_hz = table_row["doppler_144_khz"] # * 1000 - else: - tx_doppler_shift_hz = rx_doppler_shift_hz - tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - - except: - print("update_doppler failed") - try: tx_value = '0' rx_value = '0' @@ -795,6 +778,7 @@ except Exception as e: if (doppler_mode == 'off'): tx_freq_hz = txf * 1e6 rx_freq_hz = rxf * 1e6 + check_frequency() print("writing sim.cfg frequency to frequency.txt") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{tx_freq_hz:.0f} {rx_freq_hz:.0f}") @@ -835,8 +819,9 @@ if (doppler_mode == 'sim'): else: tx_doppler_shift_hz = rx_doppler_shift_hz tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz + check_freuquency() + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: @@ -863,7 +848,7 @@ if (doppler_mode == 'rig'): sleep(1.0) print("Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB") - system("rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv") + system("rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv --vfo") print("rigctld ended") From caece4bce030f8d2330c34b8c7957b790c2a2cad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jul 2026 17:32:06 -0400 Subject: [PATCH 1185/1744] Update install fix FT857d update --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index d3b7a837..d6af501f 100755 --- a/install +++ b/install @@ -850,7 +850,7 @@ if [ ! -f "/home/pi/ssdv/ssdv" ]; then make fi -if [ ! -f "/home/pi/FT857d" ]; then +if [ ! -f "/home/pi/FT857d/examples/FT857d/ft857d" ]; then cd echo "Installing FT857d for Doppler rigctld control mode" git clone https://github.com/alanbjohnston/FT857d.git From b7ac72c715ed15f613105d7eb7fc236f091d60d6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jul 2026 17:32:37 -0400 Subject: [PATCH 1186/1744] Update frequency.py frequency typo --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index 1784ffe9..460220fc 100644 --- a/frequency.py +++ b/frequency.py @@ -820,7 +820,7 @@ if (doppler_mode == 'sim'): tx_doppler_shift_hz = rx_doppler_shift_hz tx_doppler_freq_hz = tx_doppler_start_hz + tx_doppler_shift_hz rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - check_freuquency() + check_frequency() print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") From 0d8c05d0fddd8a8653049dd834d2816b6c7fb139 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jul 2026 17:41:45 -0400 Subject: [PATCH 1187/1744] Update frequency.py add print if frequency out of range --- frequency.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/frequency.py b/frequency.py index 460220fc..efef4ca0 100644 --- a/frequency.py +++ b/frequency.py @@ -11,20 +11,29 @@ def check_frequency(): global tx_doppler_freq_hz global rx_doppler_freq_hz + tx_OK = False + rx_OK = False if tx_doppler_freq_hz > 450000000: tx_doppler_freq_hz = 435200000 elif (tx_doppler_freq_hz < 420000000) and (tx_doppler_freq_hz > 148000000): tx_doppler_freq_hz = 434700000 - if (tx_doppler_freq_hz < 144000000): + elif (tx_doppler_freq_hz < 144000000): tx_doppler_freq_hz = 434600000 + else: + tx_OK = True if rx_doppler_freq_hz > 450000000: rx_doppler_freq_hz = 435200000 elif (rx_doppler_freq_hz < 420000000) and (rx_doppler_freq_hz > 148000000): rx_doppler_freq_hz = 434700000 - if (rx_doppler_freq_hz < 144000000): + elif (rx_doppler_freq_hz < 144000000): rx_doppler_freq_hz = 434600000 + else: + rx_OK == True + + if (tx_OK != True) or (rx_OK != True): + print("Error - frequency out of range!") iss_doppler_passes = { 88: [ From 7dbfb005170e2d4c25fcd8f536285ab97826db23 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jul 2026 17:42:44 -0400 Subject: [PATCH 1188/1744] Update frequency.py fix indent --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index efef4ca0..1f6960f3 100644 --- a/frequency.py +++ b/frequency.py @@ -32,7 +32,7 @@ def check_frequency(): else: rx_OK == True - if (tx_OK != True) or (rx_OK != True): + if (tx_OK != True) or (rx_OK != True): print("Error - frequency out of range!") iss_doppler_passes = { From 9a76ea51eee76a3bb82fa05f3d48ed2ad0888769 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jul 2026 18:11:28 -0400 Subject: [PATCH 1189/1744] Update frequency.py fix rx_OK test --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index 1f6960f3..c38034a4 100644 --- a/frequency.py +++ b/frequency.py @@ -30,7 +30,7 @@ def check_frequency(): elif (rx_doppler_freq_hz < 144000000): rx_doppler_freq_hz = 434600000 else: - rx_OK == True + rx_OK = True if (tx_OK != True) or (rx_OK != True): print("Error - frequency out of range!") From 6af4e0aeaaaf5fd61b7fd9b8e2fa8ba485d19f11 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 8 Jul 2026 18:12:06 -0400 Subject: [PATCH 1190/1744] Update log with sleep 1 --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index 472c8421..c4017153 100755 --- a/log +++ b/log @@ -45,7 +45,7 @@ if [ "$REALTIME" = "1" ] ; then while true; do cat /home/pi/CubeSatSim/frequency.txt | tr -d '\n' # echo - sleep 5 + sleep 1 printf "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" done else From 9411c1ec29a0fe87330f128d3f38f39bc3bd1622 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jul 2026 12:39:10 -0400 Subject: [PATCH 1191/1744] Update config write to frequency.txt --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 2811fdcd..a80ae4f2 100755 --- a/config +++ b/config @@ -1168,6 +1168,8 @@ elif [ "$1" = "-F" ]; then 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 ${7} ${8} > /home/pi/CubeSatSim/frequency.txt + echo echo "Restarting CubeSatSim with new configuration file" From 07dccfc9195084c9dd67bc07b1098200c08ce677 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jul 2026 12:41:17 -0400 Subject: [PATCH 1192/1744] Update config print rxf txf --- config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config b/config index a80ae4f2..5069e17c 100755 --- a/config +++ b/config @@ -1168,6 +1168,9 @@ elif [ "$1" = "-F" ]; then 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 + txf = ${7} * 1e6 + rxf = ${8} * 1e6 + echo $txf $rxf echo ${7} ${8} > /home/pi/CubeSatSim/frequency.txt echo From fefeb33b940b55a5705e8f02a2959d00bb1ddcfc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 10 Jul 2026 12:46:32 -0400 Subject: [PATCH 1193/1744] Update config fix txf --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 5069e17c..b6e1398b 100755 --- a/config +++ b/config @@ -1168,10 +1168,10 @@ elif [ "$1" = "-F" ]; then 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 - txf = ${7} * 1e6 - rxf = ${8} * 1e6 + rxf=$(echo "$8 * 1000000" | bc) + txf=$(echo "$7 * 1000000" | bc) echo $txf $rxf - echo ${7} ${8} > /home/pi/CubeSatSim/frequency.txt + echo $txf $rxf > /home/pi/CubeSatSim/frequency.txt echo echo "Restarting CubeSatSim with new configuration file" From ffc5f3af505ddfd56a052c29ff8192f3cc4eba6b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jul 2026 15:49:11 -0400 Subject: [PATCH 1194/1744] Update transmit.py print mode m error --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 933518cd..84d1124a 100644 --- a/transmit.py +++ b/transmit.py @@ -1084,7 +1084,8 @@ if __name__ == "__main__": sleep(0.5) - except: + except Exception as e: + print(f"An error occurred: {e}") # command_control_check() sleep(1) elif (mode == 'm'): From 6f7453ed83b02065202b7827a9e394a0aa622b71 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jul 2026 15:52:00 -0400 Subject: [PATCH 1195/1744] Update transmit.py make update_doppler fm parameter optional --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 84d1124a..d4d6163f 100644 --- a/transmit.py +++ b/transmit.py @@ -510,7 +510,7 @@ iss_doppler_passes = { ] } -def update_doppler(fm): +def update_doppler(fm="yes"): try: global start_time From 26e735a4534256ba4f7939afd915f9ba91ac96ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 11 Jul 2026 15:53:24 -0400 Subject: [PATCH 1196/1744] Update transmit.py --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d4d6163f..213b542e 100644 --- a/transmit.py +++ b/transmit.py @@ -1085,7 +1085,7 @@ if __name__ == "__main__": sleep(0.5) except Exception as e: - print(f"An error occurred: {e}") +# print(f"An error occurred: {e}") # command_control_check() sleep(1) elif (mode == 'm'): From c1697c344054b0751d3897dfc69f934decc329dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 12 Jul 2026 13:22:55 -0400 Subject: [PATCH 1197/1744] Update transmit.py shorten inter dit spacing --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 213b542e..ca10a2f6 100644 --- a/transmit.py +++ b/transmit.py @@ -614,7 +614,7 @@ def cw_transmit_char(character): print(duration) while (duration != 0): transmit_carrier(duration * morse_timing) - sleep(morse_timing * 0.6) + sleep(morse_timing * 0.4) # 6) i=i+1 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: From d992f21186fa51eca68910861cd046be86f280dc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 12 Jul 2026 13:26:38 -0400 Subject: [PATCH 1198/1744] Update transmit.py change spacing --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index ca10a2f6..61f28734 100644 --- a/transmit.py +++ b/transmit.py @@ -602,7 +602,7 @@ def cw_transmit_string(string): if (character != ' '): cw_transmit_char(character); else: - sleep(6.0 * morse_timing); + sleep(7.0 * morse_timing); def cw_transmit_char(character): global morse_timing @@ -619,7 +619,7 @@ def cw_transmit_char(character): duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: duration = 1.2 - sleep(morse_timing * 3) # 1.5); + sleep(morse_timing * 2.5) # 3) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From b4bc336165d81dcdd5449af313ba2b545a0e6fef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 12 Jul 2026 13:33:19 -0400 Subject: [PATCH 1199/1744] Update transmit.py shorten inter char spacing --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 61f28734..6c7dd890 100644 --- a/transmit.py +++ b/transmit.py @@ -619,7 +619,7 @@ def cw_transmit_char(character): duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: duration = 1.2 - sleep(morse_timing * 2.5) # 3) # 1.5); + sleep(morse_timing * 1.5) # 3) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From e3bc0048d4ac1bf3cc96ea4f449fa18a4bc5f251 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 12 Jul 2026 13:41:28 -0400 Subject: [PATCH 1200/1744] Update transmit.py middle --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6c7dd890..28ed2909 100644 --- a/transmit.py +++ b/transmit.py @@ -619,7 +619,7 @@ def cw_transmit_char(character): duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: duration = 1.2 - sleep(morse_timing * 1.5) # 3) # 1.5); + sleep(morse_timing * 2.0) # 3) # 1.5); def transmit_carrier(duration): global tx_doppler_freq_hz From 7ce89e04c7615934cf3cded7d708b1132c0a99a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 13 Jul 2026 12:16:26 -0400 Subject: [PATCH 1201/1744] Update transmit.py add -k 0.5 to timeout for tune --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 28ed2909..f9b2fc2b 100644 --- a/transmit.py +++ b/transmit.py @@ -625,7 +625,7 @@ def transmit_carrier(duration): global tx_doppler_freq_hz global txLed update_doppler("no") - command = "timeout " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" killrpitx = "sudo killall -9 rpitx &" From 80e97a6bd5270a068700ba8ec3094a330c254dab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 13 Jul 2026 13:25:54 -0400 Subject: [PATCH 1202/1744] Update .gitignore add frequency.txt --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 041e454e..a63f7b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -50,4 +50,4 @@ sim_mode_auto direwolf-pacsatsim-tmp.conf groundstation/direwolf-pacsat-tmp.conf tlm.bin -doppler.txt +frequency.txt From 28357f2c5a08cd4a2282a7f3a600efcba5343f8a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 13 Jul 2026 13:27:37 -0400 Subject: [PATCH 1203/1744] Update transmit.py add 10 seconds sleep for doppler_mode --- transmit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transmit.py b/transmit.py index f9b2fc2b..460457f6 100644 --- a/transmit.py +++ b/transmit.py @@ -947,6 +947,9 @@ if __name__ == "__main__": doppler_table = iss_doppler_passes[TARGET_PASS] print(f"Pass Max Elevation: {TARGET_PASS}°") + + print("Sleeping 10 seconds") + sleep(10) # avoid jumping around at start sim_failure_check() if (hab_mode == True) and (mode == 'a'): From 685a996406bccf0e644b6fa4b1d37e78f68f076a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 13 Jul 2026 13:29:40 -0400 Subject: [PATCH 1204/1744] Update transmit.py sleep 15 --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 460457f6..6f7fbb4b 100644 --- a/transmit.py +++ b/transmit.py @@ -948,8 +948,8 @@ if __name__ == "__main__": doppler_table = iss_doppler_passes[TARGET_PASS] print(f"Pass Max Elevation: {TARGET_PASS}°") - print("Sleeping 10 seconds") - sleep(10) # avoid jumping around at start + print("Sleeping 15 seconds") + sleep(15) # avoid jumping around at start sim_failure_check() if (hab_mode == True) and (mode == 'a'): From 313ffd6575307231f593beef7e995fb0307f2b8b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 13 Jul 2026 13:46:44 -0400 Subject: [PATCH 1205/1744] Update install remove packagekit --- install | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install b/install index d6af501f..c0da5400 100755 --- a/install +++ b/install @@ -672,6 +672,14 @@ if [ -f "$FILE" ]; then sudo rm /etc/systemd/system/rpitx.service fi +FILE=/etc/systemd/system/packagekit.service +if [ -f "$FILE" ]; then + echo "Removing packagekit so won't auto check for updates on boot" + sudo systemctl stop packagekit + sudo systemctl disable packagekit + sudo apt-get remove -y packagekit +fi + FILE=/etc/systemd/system/transmit.service if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/systemd/transmit.service /etc/systemd/system/transmit.service) ]]; then From f00a226d76e37380ceb2c6641d4bf45af3035366 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 13 Jul 2026 14:00:09 -0400 Subject: [PATCH 1206/1744] Update install fix remove packagekit --- install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install b/install index c0da5400..c2110176 100755 --- a/install +++ b/install @@ -672,8 +672,7 @@ if [ -f "$FILE" ]; then sudo rm /etc/systemd/system/rpitx.service fi -FILE=/etc/systemd/system/packagekit.service -if [ -f "$FILE" ]; then +if [[ -z $(sudo systemctl is-active packagekit | grep inactive) ]]; then echo "Removing packagekit so won't auto check for updates on boot" sudo systemctl stop packagekit sudo systemctl disable packagekit From 9d9e85cc9b865231aa2fb89060b2dced42a1c2a9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 14 Jul 2026 12:19:02 -0400 Subject: [PATCH 1207/1744] Update transmit.py doppler shift first sstv image --- transmit.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index 6f7fbb4b..96e99557 100644 --- a/transmit.py +++ b/transmit.py @@ -546,8 +546,8 @@ def update_doppler(fm="yes"): program_fm(rx,tx,rxpl_value,sq,txpl_value) else: print("No frequency changes!") - - except: + except Exception as e: + print(f"An error occurred: {e}") print("update_doppler failed") morse_table = [ # 0-9, A-Z only by (ASCII - 48) @@ -606,7 +606,7 @@ def cw_transmit_string(string): def cw_transmit_char(character): global morse_timing -# update_doppler("no") +# ("no") i = 0 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: @@ -624,7 +624,7 @@ def cw_transmit_char(character): def transmit_carrier(duration): global tx_doppler_freq_hz global txLed - update_doppler("no") + ("no") command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" @@ -1188,6 +1188,10 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") + if (doppler_mode): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) output(txLed, 1) # battery_saver_check() @@ -1217,7 +1221,7 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") - if (doppler_mode == True): + if (doppler_mode): update_doppler() txf = tx_doppler_freq_hz / 1000 tx = "{:.4f}".format(txf) @@ -1258,6 +1262,10 @@ if __name__ == "__main__": if (command_tx == True): print ("Sending SSTV image") + if (doppler_mode): + update_doppler() + txf = tx_doppler_freq_hz / 1000 + tx = "{:.4f}".format(txf) output(txLed, 1) # battery_saver_check() @@ -1291,7 +1299,7 @@ if __name__ == "__main__": while 1: if (command_tx == True): print ("Sending SSTV image") - if (doppler_mode == True): + if (doppler_mode): update_doppler() txf = tx_doppler_freq_hz / 1000 tx = "{:.4f}".format(txf) @@ -1323,7 +1331,7 @@ if __name__ == "__main__": system("(while true; do (sleep 10 && cat /home/pi/CubeSatSim/wav/sstv.wav); done) | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 &") while 1: if (command_tx == True): - if (doppler_mode == True): + if (doppler_mode): update_doppler() txf = tx_doppler_freq_hz / 1000 tx = "{:.4f}".format(txf) @@ -1347,9 +1355,11 @@ if __name__ == "__main__": elif (mode == 'b') or (mode == 'j'): # command_control_check() if (mode == 'b'): - print("BPSK") + print("BPSK") else: print("FUNcube") + if (doppler_mode): + print("No doppler shift in this mode") print("turn on FM rx") output(pd, 1) output(ptt, 1) @@ -1419,7 +1429,7 @@ if __name__ == "__main__": while True: if (input(squelch) == False) and (command_tx == True): print("Carrier detected") - if (doppler_mode == True): + if (doppler_mode): update_doppler() start_repeater(tx_doppler_freq_hz) else: @@ -1430,6 +1440,8 @@ if __name__ == "__main__": stop_repeater() else: print("FSK") + if (doppler_mode): + print("No doppler shift in this mode") print("turn on FM rx") output(pd, 1) output(ptt, 1) From 2ca2993cec1f08d704ab14acdc62a10521a00bae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 14 Jul 2026 18:06:35 -0400 Subject: [PATCH 1208/1744] Update transmit.py missing update_doppler --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 96e99557..b673e446 100644 --- a/transmit.py +++ b/transmit.py @@ -606,7 +606,7 @@ def cw_transmit_string(string): def cw_transmit_char(character): global morse_timing -# ("no") +# update_doppler("no") i = 0 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: @@ -624,7 +624,7 @@ def cw_transmit_char(character): def transmit_carrier(duration): global tx_doppler_freq_hz global txLed - ("no") + update_doppler("no") command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" From a974c91746250b5741e642fe36e9e7fef801ca88 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 01:35:38 -0400 Subject: [PATCH 1209/1744] Update transmit.py add doppler to pacsatsim --- transmit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/transmit.py b/transmit.py index b673e446..7b0571ce 100644 --- a/transmit.py +++ b/transmit.py @@ -1020,6 +1020,8 @@ if __name__ == "__main__": while (input(ptt) != 1): sleep(0.2) output(txLed, 0) + if (mode == 'p') and (doppler_mode): + update_doppler() # print("0") else: # sleep(0.1) @@ -1032,6 +1034,8 @@ if __name__ == "__main__": sleep(0.05) ## system(stop_rpitx) output(txLed, 0) + if (mode == 'p') and (doppler_mode): + update_doppler("no") # print("0") # sleep(10) From d7967603d11aa1678af018cd5d049501cc36587e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 01:54:45 -0400 Subject: [PATCH 1210/1744] Update transmit.py pacsatsim no doppler in safe mode --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 7b0571ce..c3a55910 100644 --- a/transmit.py +++ b/transmit.py @@ -1034,8 +1034,8 @@ if __name__ == "__main__": sleep(0.05) ## system(stop_rpitx) output(txLed, 0) - if (mode == 'p') and (doppler_mode): - update_doppler("no") +# if (mode == 'p') and (doppler_mode): +# update_doppler("no") # print("0") # sleep(10) From fe2bc2d797104e148545a0b3b0a30ba1246c0977 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 11:37:45 -0400 Subject: [PATCH 1211/1744] Update config add doppler frequency print --- config | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/config b/config index b6e1398b..c0003e15 100755 --- a/config +++ b/config @@ -260,22 +260,33 @@ if [ "$1" = "" ]; then echo "Random Failure Mode is OFF" fi +HAB=$9 +SQUELCH=$6 +RXPL=${10} +TXPL=${11} + # echo ${14} if [ "${14}" = "sim" ] ; then echo "Simulated Doppler frequency shift enabled" + echo -n "Current TX and RX Frequency (Hz) is: " + cat /home/pi/CubeSatSim/frequency.txt +# echo -n ${7} +# echo -n " MHz, RX Frequency is: " +# echo -n ${8} +# echo " MHz" elif [ "${14}" = "rig" ] ; then echo "rigctld Doppler frequency shift enabled" else echo "Doppler frequency shift is OFF" - fi + echo -n "TX Frequency is: " + echo -n ${7} + echo -n " MHz, RX Frequency is: " + echo -n ${8} + echo " MHz" - echo -n "TX Frequency is: " - echo -n ${7} - echo -n " MHz, RX Frequency is: " - echo -n ${8} - echo " MHz" + fi - if [ "$9" = "yes" ] || [ "$9" = "y" ]; then + if [ "$HAB" = "yes" ] || [ "$HAB" = "y" ]; then echo "Balloon mode is ON" else echo "Balloon mode is OFF" @@ -295,7 +306,7 @@ if [ "$1" = "" ]; then echo "Squelch is off since PacSat or PacSat Ground Station mode" else echo -n "Squelch level is: " - echo $6 + echo $SQUELCH fi # echo @@ -327,10 +338,10 @@ if [ "$1" = "" ]; then # echo echo -n "RX PL code is: " - echo -n ${10} + echo -n $RXPL # echo echo -n " TX PL code is: " - echo ${11} + echo $TXPL # echo FILE=/home/pi/CubeSatSim/battery_saver @@ -377,7 +388,8 @@ 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} ${14} +# echo $1 $2 $3 $4 $5 $SQUELCH $7 $8 $HAB $RXPL $TXPL ${12} ${13} ${14} + cat /home/pi/CubeSatSim/sim.cfg echo echo "To change, include an OPTION" From 4c0bcec947fb49d9510800e2b23db6fcea924f0e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 11:38:51 -0400 Subject: [PATCH 1212/1744] Update config add newline after frequency --- config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config b/config index c0003e15..717addf6 100755 --- a/config +++ b/config @@ -270,12 +270,16 @@ TXPL=${11} echo "Simulated Doppler frequency shift enabled" echo -n "Current TX and RX Frequency (Hz) is: " cat /home/pi/CubeSatSim/frequency.txt + echo # echo -n ${7} # echo -n " MHz, RX Frequency is: " # echo -n ${8} # echo " MHz" elif [ "${14}" = "rig" ] ; then echo "rigctld Doppler frequency shift enabled" + echo -n "Current TX and RX Frequency (Hz) is: " + cat /home/pi/CubeSatSim/frequency.txt + echo else echo "Doppler frequency shift is OFF" echo -n "TX Frequency is: " From 0d9472c0f762bf4e2b563c9509fbf9e183f5dbd8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 11:52:35 -0400 Subject: [PATCH 1213/1744] Update config to reboot if mode m and Doppler --- config | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/config b/config index 717addf6..ca47ed23 100755 --- a/config +++ b/config @@ -94,11 +94,21 @@ function check_restart { value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value + MODE=$1 -# if [ "$1" = "p" ] || [ "$1" = "P" ] ; then + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + if [ "${14}" = "sim" ] || [ "${14}" = "rig" ] ; then + DOPPLER=1 + else + DOPPLER=0 + fi + +# if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then # reboot=1 #el - if [ "$1" == "f" ] || [ "$1" == "b" ] || [ "$1" == "e" ] || [ "$1" == "j" ] ; then + if [ "$MODE" == "f" ] || [ "$MODE" == "b" ] || [ "$MODE" == "e" ] || [ "$MODE" == "j" ] ; then FILE=/home/pi/CubeSatSim/battery_saver if [ -f "$FILE" ]; then restart=1 @@ -107,6 +117,8 @@ function check_restart { reboot=1 # echo "Need to reboot" fi + elif [ "$MODE" == "m" ] || [ "$DOPPLER" == "1" ] ; then + reboot=1 else restart=1 # echo "Need to restart" @@ -122,11 +134,11 @@ echo sudo modprobe snd-aloop -# if [ "$2" = "n" ] ; then +# if [ "$2" = "-n" ] ; then if [ -z "$2" ] ; then noreboot=0 else - if [ "$2" = "n" ] ; then + if [ "$2" = "-n" ] ; then echo "Reboot disabled" noreboot=1 else @@ -1135,7 +1147,7 @@ elif [ "$1" = "-P" ]; then ## echo "Rebooting CubeSatSim with new configuration file" ## echo - reboot=1 + restart=1 ## sudo reboot now # sudo systemctl restart cubesatsim From ab50a56ad77a9cd9510273989dd019d3ca326f36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 12:02:42 -0400 Subject: [PATCH 1214/1744] Update config restart for mode m if Doppler mode --- config | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/config b/config index ca47ed23..7400c4a8 100755 --- a/config +++ b/config @@ -450,7 +450,21 @@ elif [ "$1" = "-m" ]; then else echo "changing CubeSatSim to CW mode" - check_restart + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + if [ "${14}" = "sim" ] || [ "${14}" = "rig" ] ; then + DOPPLER=1 + else + DOPPLER=0 + + if [ "$DOPPLER" = "1" ] ; then + restart=1 + else + check_restart + fi + sudo echo "m" > /home/pi/CubeSatSim/.mode fi From 6e593581332e8d6e88f7165f173235edf2df9a6e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 12:03:36 -0400 Subject: [PATCH 1215/1744] Update config missing fi --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 7400c4a8..f1acfefb 100755 --- a/config +++ b/config @@ -458,6 +458,7 @@ elif [ "$1" = "-m" ]; then DOPPLER=1 else DOPPLER=0 + fi if [ "$DOPPLER" = "1" ] ; then restart=1 From 3cd280dacddfee9e581254ae2ee26fed77331cd5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 13:27:52 -0400 Subject: [PATCH 1216/1744] Update transmit.py fix new frequency print --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c3a55910..c3acd740 100644 --- a/transmit.py +++ b/transmit.py @@ -530,7 +530,7 @@ def update_doppler(fm="yes"): new_tx_frequency = int(frequencies[0]) new_rx_frequency = int(frequencies[1]) - print(f"New frequencies: {new_tx_frequency}, Second number: {new_tx_frequency}") + print(f"New frequencies: {new_tx_frequency}, Second number: {new_rx_frequency}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency From eac148dcf99d5409239c6212c6b46b4fe2d0232f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 15 Jul 2026 13:30:59 -0400 Subject: [PATCH 1217/1744] Update transmit.py fix rx doppler shift --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c3acd740..5d5c31f3 100644 --- a/transmit.py +++ b/transmit.py @@ -536,7 +536,7 @@ def update_doppler(fm="yes"): tx_doppler_freq_hz = new_tx_frequency rx_doppler_freq_hz = new_rx_frequency print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz +# rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") if (fm != "no"): rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) From 339ed5d186ebcd99c8c8bec7deb8505a1f56a895 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 16:59:34 -0400 Subject: [PATCH 1218/1744] Update transmit.py fix sstv tx 1e6 --- transmit.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/transmit.py b/transmit.py index 5d5c31f3..05bf3623 100644 --- a/transmit.py +++ b/transmit.py @@ -541,7 +541,7 @@ def update_doppler(fm="yes"): if (fm != "no"): rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) if (mode != 'e'): - tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) + "{:.4f}".format(tx_doppler_freq_hz/1e6) print(tx) program_fm(rx,tx,rxpl_value,sq,txpl_value) else: @@ -628,7 +628,7 @@ def transmit_carrier(duration): command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" - killrpitx = "sudo killall -9 rpitx &" + killrpi"sudo killall -9 rpitx &" killtune = "sudo killall -9 tune &" output(txLed, 1) # system(start) @@ -651,7 +651,7 @@ green = 16 powerPin = 16 morse_timing = 0.09 # 0.1 -command_tx = True +command_True setup(13, "up") setup(12, "up") @@ -756,9 +756,9 @@ if __name__ == "__main__": try: file = open("/home/pi/CubeSatSim/beacon_off") file.close() - command_tx = False + command_False except: - command_tx = True + command_True if (debug_mode == 1): print("Can't open beacon_off file, defaulting to False") print("Command_tx: ") @@ -785,7 +785,7 @@ if __name__ == "__main__": tx_value = '0' rx_value = '0' sq = '0' - tx = '434.9000' + '434.9000' rx = '435.0000' txr = '144.9000' sim_mode = False @@ -1060,7 +1060,7 @@ if __name__ == "__main__": output(txLed, 1) if (doppler_mode == True): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1e6 tx = "{:.4f}".format(txf) if (txc): sim_failure_check() @@ -1129,7 +1129,7 @@ if __name__ == "__main__": output(txLed, 1) if (doppler_mode == True): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1e6 tx = "{:.4f}".format(txf) if (txc): sim_failure_check() @@ -1194,7 +1194,7 @@ if __name__ == "__main__": print ("Sending SSTV image") if (doppler_mode): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1e6 tx = "{:.4f}".format(txf) output(txLed, 1) # battery_saver_check() @@ -1227,7 +1227,7 @@ if __name__ == "__main__": print ("Sending SSTV image") if (doppler_mode): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1e6 tx = "{:.4f}".format(txf) output(txLed, 1) @@ -1268,7 +1268,7 @@ if __name__ == "__main__": print ("Sending SSTV image") if (doppler_mode): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1e6 tx = "{:.4f}".format(txf) output(txLed, 1) @@ -1305,7 +1305,7 @@ if __name__ == "__main__": print ("Sending SSTV image") if (doppler_mode): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1e6 tx = "{:.4f}".format(txf) output(txLed, 1) @@ -1337,7 +1337,7 @@ if __name__ == "__main__": if (command_tx == True): if (doppler_mode): update_doppler() - txf = tx_doppler_freq_hz / 1000 + txf = tx_doppler_freq_hz / 1e6 tx = "{:.4f}".format(txf) output(txLed, 1) From b885791c599e7275e8593b309285ab274b63bc8b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:05:26 -0400 Subject: [PATCH 1219/1744] Update transmit.py fix tx mistake --- transmit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/transmit.py b/transmit.py index 05bf3623..6177e89c 100644 --- a/transmit.py +++ b/transmit.py @@ -541,7 +541,7 @@ def update_doppler(fm="yes"): if (fm != "no"): rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) if (mode != 'e'): - "{:.4f}".format(tx_doppler_freq_hz/1e6) + tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) print(tx) program_fm(rx,tx,rxpl_value,sq,txpl_value) else: @@ -628,7 +628,7 @@ def transmit_carrier(duration): command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" - killrpi"sudo killall -9 rpitx &" + killrpitx = "sudo killall -9 rpitx &" killtune = "sudo killall -9 tune &" output(txLed, 1) # system(start) @@ -651,7 +651,7 @@ green = 16 powerPin = 16 morse_timing = 0.09 # 0.1 -command_True +command_tx = True setup(13, "up") setup(12, "up") @@ -756,9 +756,9 @@ if __name__ == "__main__": try: file = open("/home/pi/CubeSatSim/beacon_off") file.close() - command_False + command_tx = False except: - command_True + command_tx = True if (debug_mode == 1): print("Can't open beacon_off file, defaulting to False") print("Command_tx: ") @@ -785,7 +785,7 @@ if __name__ == "__main__": tx_value = '0' rx_value = '0' sq = '0' - '434.9000' + tx = '434.9000' rx = '435.0000' txr = '144.9000' sim_mode = False From 8aec47fe7457e592a51c9170ede3dfe0e3d14d10 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:06:33 -0400 Subject: [PATCH 1220/1744] Update transmit.py only sleep 15 if CW mode --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 6177e89c..ea401413 100644 --- a/transmit.py +++ b/transmit.py @@ -948,8 +948,9 @@ if __name__ == "__main__": doppler_table = iss_doppler_passes[TARGET_PASS] print(f"Pass Max Elevation: {TARGET_PASS}°") - print("Sleeping 15 seconds") - sleep(15) # avoid jumping around at start + if (mode == 'm'): + print("Sleeping 15 seconds") + sleep(15) # avoid CW jumping around at start sim_failure_check() if (hab_mode == True) and (mode == 'a'): From 11b364558046e771cbbcb4d9d2c4632748a95896 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:11:01 -0400 Subject: [PATCH 1221/1744] Update transmit.py print mode --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index ea401413..b1e1dae2 100644 --- a/transmit.py +++ b/transmit.py @@ -948,6 +948,8 @@ if __name__ == "__main__": doppler_table = iss_doppler_passes[TARGET_PASS] print(f"Pass Max Elevation: {TARGET_PASS}°") + print("MODE: ") + print(mode) if (mode == 'm'): print("Sleeping 15 seconds") sleep(15) # avoid CW jumping around at start From 42683a9dbf443bbadcbb695fd146af4c59f1f1ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:34:06 -0400 Subject: [PATCH 1222/1744] Update config add mode check to Doppler mode print --- config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config b/config index f1acfefb..fc7a1783 100755 --- a/config +++ b/config @@ -278,7 +278,14 @@ RXPL=${10} TXPL=${11} # echo ${14} - if [ "${14}" = "sim" ] ; then + if [ ( "${14}" = "sim" || "${14}" = "rig" ) && ( "$MODE" = "f" || "$MODE" = "b" || "$MODE" = "j") ] ; then + echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, and Repeater modes)" + echo -n "TX Frequency is: " + echo -n ${7} + echo -n " MHz, RX Frequency is: " + echo -n ${8} + echo " MHz" + elif [ "${14}" = "sim" ] ; then echo "Simulated Doppler frequency shift enabled" echo -n "Current TX and RX Frequency (Hz) is: " cat /home/pi/CubeSatSim/frequency.txt From b036d4b8b0460cf02423f299c7979bd2689396ba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:35:51 -0400 Subject: [PATCH 1223/1744] Update config try == --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index fc7a1783..22cf6b0e 100755 --- a/config +++ b/config @@ -278,7 +278,7 @@ RXPL=${10} TXPL=${11} # echo ${14} - if [ ( "${14}" = "sim" || "${14}" = "rig" ) && ( "$MODE" = "f" || "$MODE" = "b" || "$MODE" = "j") ] ; then + if [ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ] ; then echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, and Repeater modes)" echo -n "TX Frequency is: " echo -n ${7} From 464f1500568188589505704dc2033ba6f0d191fd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:36:46 -0400 Subject: [PATCH 1224/1744] Update config try [[ --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 22cf6b0e..e2e08d12 100755 --- a/config +++ b/config @@ -278,7 +278,7 @@ RXPL=${10} TXPL=${11} # echo ${14} - if [ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ] ; then + if [[ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, and Repeater modes)" echo -n "TX Frequency is: " echo -n ${7} From 8a22c8788d05eb71b1b56e544c594d761a89b16f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:39:10 -0400 Subject: [PATCH 1225/1744] Update config add approximately for rpitx modes --- config | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/config b/config index e2e08d12..4d8c580f 100755 --- a/config +++ b/config @@ -280,7 +280,7 @@ TXPL=${11} # echo ${14} if [[ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, and Repeater modes)" - echo -n "TX Frequency is: " + echo -n "TX Frequency is approximately: " echo -n ${7} echo -n " MHz, RX Frequency is: " echo -n ${8} @@ -299,6 +299,13 @@ TXPL=${11} echo -n "Current TX and RX Frequency (Hz) is: " cat /home/pi/CubeSatSim/frequency.txt echo + elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then + echo "Doppler frequency shift is OFF" + echo -n "TX Frequency is approximately: " + echo -n ${7} + echo -n " MHz, RX Frequency is: " + echo -n ${8} + echo " MHz" else echo "Doppler frequency shift is OFF" echo -n "TX Frequency is: " From d5440172be5fcabfeba1a82e05e14bc6d3d94337 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 17:49:39 -0400 Subject: [PATCH 1226/1744] Update config reboot if turning Doppler off in CW mode --- config | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config b/config index 4d8c580f..4c9e188b 100755 --- a/config +++ b/config @@ -2011,7 +2011,15 @@ elif [ "$1" = "-K" ]; then echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} $doppler > /home/pi/CubeSatSim/sim.cfg echo - restart=1 + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [[ ( "$sim" == "y" || "$sim" == "yes" ) && ( "$1" == "m" ) && ( "$doppler" == "no" ) ]] ; then + reboot=1 + else + restart=1 + fi elif [ "$1" = "-h" ]; then From 5fd5ec7560a64d25219aae2a9cd48fffa539283f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Jul 2026 18:00:51 -0400 Subject: [PATCH 1227/1744] Update config always restart when changing Doppler mode --- config | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/config b/config index 4c9e188b..5ae66550 100755 --- a/config +++ b/config @@ -1969,6 +1969,7 @@ elif [ "$1" = "-K" ]; then value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value + doppler="${14}" if [ "${14}" = "sim" ] ; then echo "Simulated Doppler frequency shift mode enabled" @@ -2015,11 +2016,11 @@ elif [ "$1" = "-K" ]; then echo "$value" > /dev/null set -- $value - if [[ ( "$sim" == "y" || "$sim" == "yes" ) && ( "$1" == "m" ) && ( "$doppler" == "no" ) ]] ; then - reboot=1 - else +# if [[ ( "$doppler" == "y" || "$doppler" == "yes" ) && ( "$1" == "m" ) && ( "$doppler" == "no" ) ]] ; then +# reboot=1 +# else restart=1 - fi +# fi elif [ "$1" = "-h" ]; then From 70e9699d012858f778b2749ed9cded89ac329502 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 17 Jul 2026 00:19:42 -0400 Subject: [PATCH 1228/1744] Update transmit.py initialize tx_doppler_start for repeater --- transmit.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/transmit.py b/transmit.py index b1e1dae2..ce1d3529 100644 --- a/transmit.py +++ b/transmit.py @@ -932,17 +932,17 @@ if __name__ == "__main__": # if (mode != 'e'): program_fm(rx,tx,rxpl_value,sq,txpl_value) - if (doppler_mode == True): - if (mode == 'e'): - tx_doppler_start_hz = txrf * 1e6 - else: - tx_doppler_start_hz = txf * 1e6 - tx_doppler_shift_hz = 0 - print(f"Tx center frequency: {tx_doppler_start_hz}") - rx_doppler_start_hz = rxf * 1e6 - rx_doppler_shift_hz = 0 - print(f"Rx center frequency: {rx_doppler_start_hz}") - + if (mode == 'e'): + tx_doppler_start_hz = txrf * 1e6 + else: + tx_doppler_start_hz = txf * 1e6 + tx_doppler_shift_hz = 0 + print(f"Tx center frequency: {tx_doppler_start_hz}") + rx_doppler_start_hz = rxf * 1e6 + rx_doppler_shift_hz = 0 + print(f"Rx center frequency: {rx_doppler_start_hz}") + + if (doppler_mode == True): TARGET_PASS = 85 # Maximum elevation profile doppler_table = iss_doppler_passes[TARGET_PASS] From cd0f26621f7e0b9e272cd81fd3c37a1dbf3edd67 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 17 Jul 2026 00:24:46 -0400 Subject: [PATCH 1229/1744] Update transmit.py txrf instead of txr --- transmit.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/transmit.py b/transmit.py index ce1d3529..d03d130f 100644 --- a/transmit.py +++ b/transmit.py @@ -932,17 +932,18 @@ if __name__ == "__main__": # if (mode != 'e'): program_fm(rx,tx,rxpl_value,sq,txpl_value) - if (mode == 'e'): - tx_doppler_start_hz = txrf * 1e6 - else: - tx_doppler_start_hz = txf * 1e6 - tx_doppler_shift_hz = 0 - print(f"Tx center frequency: {tx_doppler_start_hz}") - rx_doppler_start_hz = rxf * 1e6 - rx_doppler_shift_hz = 0 - print(f"Rx center frequency: {rx_doppler_start_hz}") - if (doppler_mode == True): + + if (mode == 'e'): + tx_doppler_start_hz = txrf * 1e6 + else: + tx_doppler_start_hz = txf * 1e6 + tx_doppler_shift_hz = 0 + print(f"Tx center frequency: {tx_doppler_start_hz}") + rx_doppler_start_hz = rxf * 1e6 + rx_doppler_shift_hz = 0 + print(f"Rx center frequency: {rx_doppler_start_hz}") + TARGET_PASS = 85 # Maximum elevation profile doppler_table = iss_doppler_passes[TARGET_PASS] @@ -1440,7 +1441,7 @@ if __name__ == "__main__": update_doppler() start_repeater(tx_doppler_freq_hz) else: - start_repeater(txr) + start_repeater(txrf * 1e6) while (input(squelch) == False): sleep(1) print("No carrier detected") From e7b151f5aa2ec9ba0f0fe61f50c8fd83ea72aed0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 18 Jul 2026 11:47:02 -0400 Subject: [PATCH 1230/1744] Update transmit.py PacSat battery saver carrier on/off --- transmit.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index d03d130f..22a81b4b 100644 --- a/transmit.py +++ b/transmit.py @@ -1007,7 +1007,7 @@ if __name__ == "__main__": output(txLed, 0) print("0") rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" - stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" + stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" if not txc: print("txc is:") print(txc) @@ -1026,20 +1026,21 @@ if __name__ == "__main__": output(txLed, 0) if (mode == 'p') and (doppler_mode): update_doppler() + rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" # print("0") else: # sleep(0.1) while (input(17) == 0): sleep(0.05) -## system(rpitx) + system(rpitx) output(txLed, 1) # print("1") while (input(17) == 1): sleep(0.05) -## system(stop_rpitx) + system(stop_rpitx) output(txLed, 0) -# if (mode == 'p') and (doppler_mode): -# update_doppler("no") + if (mode == 'p') and (doppler_mode): + update_doppler("no") # print("0") # sleep(10) From 2185f9fcd6ee33070c7a1b429de984832cc5f7d9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 18 Jul 2026 11:53:48 -0400 Subject: [PATCH 1231/1744] Update transmit.py change stop_rpitx --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 22a81b4b..fc0f5303 100644 --- a/transmit.py +++ b/transmit.py @@ -1007,7 +1007,8 @@ if __name__ == "__main__": output(txLed, 0) print("0") rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" - stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" +# stop_rpitx = "sudo killall -9 rpitx && sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" + stop_rpitx = "sudo killall -9 arecord && sudo rpitx -m RF -f 434.9e3 > /dev/null 2>&1" if not txc: print("txc is:") print(txc) From a3fe4c39e3a16fc2710f5272335ad322db7a915b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 18 Jul 2026 12:12:35 -0400 Subject: [PATCH 1232/1744] Update transmit.py update fm in Pacsat battery saver --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index fc0f5303..a37c0914 100644 --- a/transmit.py +++ b/transmit.py @@ -1027,7 +1027,6 @@ if __name__ == "__main__": output(txLed, 0) if (mode == 'p') and (doppler_mode): update_doppler() - rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" # print("0") else: # sleep(0.1) @@ -1041,7 +1040,9 @@ if __name__ == "__main__": system(stop_rpitx) output(txLed, 0) if (mode == 'p') and (doppler_mode): - update_doppler("no") + update_doppler() # "no") + rpitx = "arecord -D plughw:CARD=Loopback,DEV=1 -f S16_LE -r 48000 -c 1 | csdr convert_s16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1 &" + # print("0") # sleep(10) From c5b968a427dab2374f84e7d5726b4b1c910b83d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 18 Jul 2026 14:48:24 -0400 Subject: [PATCH 1233/1744] Update transmit.py Pacsat safe mode don't start rpitx --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index a37c0914..7513cb7b 100644 --- a/transmit.py +++ b/transmit.py @@ -1013,7 +1013,7 @@ if __name__ == "__main__": print("txc is:") print(txc) system(stop_rpitx) - system(rpitx) +# system(rpitx) print("Safe Mode!!") while (True): if (txc): From 1dc32da88384696cb3aa201756f529814ff51a63 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 01:09:21 -0400 Subject: [PATCH 1234/1744] Update transmit.py for rigctl add offset to tx to get rx --- transmit.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 7513cb7b..6656cffc 100644 --- a/transmit.py +++ b/transmit.py @@ -522,6 +522,7 @@ def update_doppler(fm="yes"): global doppler_table global mode global tx + global rigctl print("update_doppler") with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: @@ -529,9 +530,13 @@ def update_doppler(fm="yes"): new_tx_frequency = int(frequencies[0]) new_rx_frequency = int(frequencies[1]) - + print(f"New frequencies: {new_tx_frequency}, Second number: {new_rx_frequency}") + if rigctl: + new_rx_frequency = new_tx_frequency + 289169117 # AO-73 U/V cross band repeater offset + print("Calcualting RX frequency using offset from TX frequency" + if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency rx_doppler_freq_hz = new_rx_frequency @@ -792,6 +797,7 @@ if __name__ == "__main__": sim_config = False hab_mode = False doppler_mode = False + rigctl = False try: file = open("/home/pi/CubeSatSim/sim.cfg") @@ -852,6 +858,7 @@ if __name__ == "__main__": print("Simulated Doppler frequency shift is enabled.") elif config[13] == 'rig': doppler_mode = True + rigctl = True # system("sudo systemctl restart frequency") print("rigctl Doppler frequency shift is enabled.") # else: From b4758d6e7f8f94d09de75a2584565534513f9777 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 01:19:16 -0400 Subject: [PATCH 1235/1744] Update transmit.py missing ) --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6656cffc..fa64c04c 100644 --- a/transmit.py +++ b/transmit.py @@ -535,7 +535,7 @@ def update_doppler(fm="yes"): if rigctl: new_rx_frequency = new_tx_frequency + 289169117 # AO-73 U/V cross band repeater offset - print("Calcualting RX frequency using offset from TX frequency" + print("Calculating RX frequency using offset from TX frequency") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency From 6244ee4cbfef4c28eda1e1d456eda2cdfdb996c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 01:37:24 -0400 Subject: [PATCH 1236/1744] Update transmit.py change to vfo B --- transmit.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index fa64c04c..4637bf50 100644 --- a/transmit.py +++ b/transmit.py @@ -528,13 +528,14 @@ def update_doppler(fm="yes"): with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: frequencies = file.read().split() - new_tx_frequency = int(frequencies[0]) - new_rx_frequency = int(frequencies[1]) + vfoA_frequency = int(frequencies[0]) + vfoB_frequency = int(frequencies[1]) - print(f"New frequencies: {new_tx_frequency}, Second number: {new_rx_frequency}") + print(f"New vfoA: {new_tx_frequency}, new vfoB: {new_rx_frequency}") if rigctl: - new_rx_frequency = new_tx_frequency + 289169117 # AO-73 U/V cross band repeater offset + new_tx_frequency = vfoB_frequency + new_rx_frequency = vfoB_frequency + 289169117 # AO-73 U/V cross band repeater offset print("Calculating RX frequency using offset from TX frequency") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): From 75e0044eeae93c2117970d070bf8497c3047828b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 01:43:30 -0400 Subject: [PATCH 1237/1744] Update transmit.py print tx and rx --- transmit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 4637bf50..7b8c6e02 100644 --- a/transmit.py +++ b/transmit.py @@ -537,13 +537,15 @@ def update_doppler(fm="yes"): new_tx_frequency = vfoB_frequency new_rx_frequency = vfoB_frequency + 289169117 # AO-73 U/V cross band repeater offset print("Calculating RX frequency using offset from TX frequency") + print(f"Tx Frequency: {new_tx_frequency:.0f}") + print(f"Rx Frequency: {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency rx_doppler_freq_hz = new_rx_frequency print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") # rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") + print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") if (fm != "no"): rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) if (mode != 'e'): From 4317d8af3dc0ccbecc059bd3ece9c7560baeb790 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 01:54:34 -0400 Subject: [PATCH 1238/1744] Update transmit.py add ! --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 7b8c6e02..f15a713c 100644 --- a/transmit.py +++ b/transmit.py @@ -536,7 +536,7 @@ def update_doppler(fm="yes"): if rigctl: new_tx_frequency = vfoB_frequency new_rx_frequency = vfoB_frequency + 289169117 # AO-73 U/V cross band repeater offset - print("Calculating RX frequency using offset from TX frequency") + print("Calculating RX frequency using offset from TX frequency!") print(f"Tx Frequency: {new_tx_frequency:.0f}") print(f"Rx Frequency: {new_rx_frequency:.0f}") From d4f0a69ae67a949687b030250bfc47f97f5af10f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 01:57:55 -0400 Subject: [PATCH 1239/1744] Update transmit.py fix variable --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index f15a713c..0b12b5fb 100644 --- a/transmit.py +++ b/transmit.py @@ -531,7 +531,7 @@ def update_doppler(fm="yes"): vfoA_frequency = int(frequencies[0]) vfoB_frequency = int(frequencies[1]) - print(f"New vfoA: {new_tx_frequency}, new vfoB: {new_rx_frequency}") + print(f"New vfoA: {vfoA_frequency}, new vfoB: {vfoB_frequency}") if rigctl: new_tx_frequency = vfoB_frequency From 29aec6a3227ef1be49ce6348bc579e0202b8345f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 09:01:27 -0400 Subject: [PATCH 1240/1744] Update transmit.py fix Doppler shift calc --- transmit.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 0b12b5fb..976828b2 100644 --- a/transmit.py +++ b/transmit.py @@ -534,11 +534,15 @@ def update_doppler(fm="yes"): print(f"New vfoA: {vfoA_frequency}, new vfoB: {vfoB_frequency}") if rigctl: + tx_center = 145960000 # AO-73 + rx_center = 435140000 + tx_doppler_shift = vfoB_frequency - tx_center + rx_doppler_shift = (rx_center/tx_center) * tx_doppler_shift new_tx_frequency = vfoB_frequency - new_rx_frequency = vfoB_frequency + 289169117 # AO-73 U/V cross band repeater offset + new_rx_frequency = tx_center + rx_doppler_shift print("Calculating RX frequency using offset from TX frequency!") - print(f"Tx Frequency: {new_tx_frequency:.0f}") - print(f"Rx Frequency: {new_rx_frequency:.0f}") + print(f"Tx Doppler Shift: {tx_doppler_shift :.0f}") + print(f"Rx Doppler Shift: {rx_doppler_shift :.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency From 27ba9793a00222c1104b93e79b2050d408437739 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 09:15:14 -0400 Subject: [PATCH 1241/1744] Update transmit.py fix doppler calc --- transmit.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/transmit.py b/transmit.py index 976828b2..3fe57f08 100644 --- a/transmit.py +++ b/transmit.py @@ -539,25 +539,26 @@ def update_doppler(fm="yes"): tx_doppler_shift = vfoB_frequency - tx_center rx_doppler_shift = (rx_center/tx_center) * tx_doppler_shift new_tx_frequency = vfoB_frequency - new_rx_frequency = tx_center + rx_doppler_shift + new_rx_frequency = rx_center + rx_doppler_shift print("Calculating RX frequency using offset from TX frequency!") - print(f"Tx Doppler Shift: {tx_doppler_shift :.0f}") - print(f"Rx Doppler Shift: {rx_doppler_shift :.0f}") + print(f"Tx Doppler Shift: {tx_doppler_shift:.0f} Frequency: {new_tx_frequency:.0f}") + print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency rx_doppler_freq_hz = new_rx_frequency - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") + print("Applying Doppler shift!") +# print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") # rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz - print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") +# print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") if (fm != "no"): rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) if (mode != 'e'): tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) - print(tx) +# print(tx) program_fm(rx,tx,rxpl_value,sq,txpl_value) else: - print("No frequency changes!") + print("Not applying Doppler shift!") except Exception as e: print(f"An error occurred: {e}") print("update_doppler failed") From e4d78b36014ba858108d7e0d2ac8747706ec9e42 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 09:17:16 -0400 Subject: [PATCH 1242/1744] Update transmit.py change sign of 70cm doppler --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 3fe57f08..e79db1fe 100644 --- a/transmit.py +++ b/transmit.py @@ -537,7 +537,7 @@ def update_doppler(fm="yes"): tx_center = 145960000 # AO-73 rx_center = 435140000 tx_doppler_shift = vfoB_frequency - tx_center - rx_doppler_shift = (rx_center/tx_center) * tx_doppler_shift + rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift new_tx_frequency = vfoB_frequency new_rx_frequency = rx_center + rx_doppler_shift print("Calculating RX frequency using offset from TX frequency!") From 2966b6e4493248fa970de124c4721f826fd2e9a9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 09:29:51 -0400 Subject: [PATCH 1243/1744] Update transmit.py add ISS frequencies --- transmit.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index e79db1fe..0b6cb060 100644 --- a/transmit.py +++ b/transmit.py @@ -534,8 +534,12 @@ def update_doppler(fm="yes"): print(f"New vfoA: {vfoA_frequency}, new vfoB: {vfoB_frequency}") if rigctl: - tx_center = 145960000 # AO-73 - rx_center = 435140000 + if (vfoB_frequency > 145880000): + tx_center = 145960000 # AO-91 + rx_center = 435250000 # AO-73 is same tx_center but 435140000 + else: + tx_center = 145800000 # ISS U/V Repeater + rx_center = 437800000 tx_doppler_shift = vfoB_frequency - tx_center rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift new_tx_frequency = vfoB_frequency From 2066707e63dbaf94d7a7860382649ead1651c046 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 10:07:38 -0400 Subject: [PATCH 1244/1744] Update transmit.py update repeater doppler every 10 sec --- transmit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transmit.py b/transmit.py index 0b6cb060..15d04a4d 100644 --- a/transmit.py +++ b/transmit.py @@ -1468,6 +1468,9 @@ if __name__ == "__main__": sleep(1) print("No carrier detected") stop_repeater() + if ((time.perf_counter() - start_time) > 10) and doppler_mode: + update_doppler() + start_time = time.perf_counter() else: print("FSK") if (doppler_mode): From 98be0b1260c65fbc93628063ec115eab71d67a31 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 10:23:47 -0400 Subject: [PATCH 1245/1744] Update transmit.py transmit frequency is always first --- transmit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index 15d04a4d..1b91ec49 100644 --- a/transmit.py +++ b/transmit.py @@ -528,19 +528,19 @@ def update_doppler(fm="yes"): with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: frequencies = file.read().split() - vfoA_frequency = int(frequencies[0]) - vfoB_frequency = int(frequencies[1]) + tx_frequency = int(frequencies[0]) + rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency print(f"New vfoA: {vfoA_frequency}, new vfoB: {vfoB_frequency}") if rigctl: - if (vfoB_frequency > 145880000): + if (tx_frequency > 145880000): tx_center = 145960000 # AO-91 rx_center = 435250000 # AO-73 is same tx_center but 435140000 else: tx_center = 145800000 # ISS U/V Repeater rx_center = 437800000 - tx_doppler_shift = vfoB_frequency - tx_center + tx_doppler_shift = tx_frequency - tx_center rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift new_tx_frequency = vfoB_frequency new_rx_frequency = rx_center + rx_doppler_shift From c51dfdf3066c307043d97a851c15e0ab5cbb9cb8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 10:39:16 -0400 Subject: [PATCH 1246/1744] Update transmit.py fix frequency variable names --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 1b91ec49..b8ce4c4d 100644 --- a/transmit.py +++ b/transmit.py @@ -531,7 +531,7 @@ def update_doppler(fm="yes"): tx_frequency = int(frequencies[0]) rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency - print(f"New vfoA: {vfoA_frequency}, new vfoB: {vfoB_frequency}") + print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") if rigctl: if (tx_frequency > 145880000): From 2e2e1ac15ea9ded3b106e9ea8be6280a2139f2be Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 10:40:56 -0400 Subject: [PATCH 1247/1744] Update transmit.py fix vfo variable name --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index b8ce4c4d..5b3bc411 100644 --- a/transmit.py +++ b/transmit.py @@ -542,7 +542,7 @@ def update_doppler(fm="yes"): rx_center = 437800000 tx_doppler_shift = tx_frequency - tx_center rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift - new_tx_frequency = vfoB_frequency + new_tx_frequency = tx_frequency new_rx_frequency = rx_center + rx_doppler_shift print("Calculating RX frequency using offset from TX frequency!") print(f"Tx Doppler Shift: {tx_doppler_shift:.0f} Frequency: {new_tx_frequency:.0f}") From 0b37e44232e745d6f7d4e06e49c1929f4ee28c24 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 10:43:08 -0400 Subject: [PATCH 1248/1744] Update transmit.py update doppler at start of repeater --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 5b3bc411..0f0745ea 100644 --- a/transmit.py +++ b/transmit.py @@ -1454,6 +1454,8 @@ if __name__ == "__main__": print("Beacon mode off so no repeater transmission") print("Ready to detect carrier") + if (doppler_mode): + update_doppler() start_time = time.perf_counter() while True: From 0cdd1edc8060c23d3effedc0ebf27a14d6067b06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 10:52:06 -0400 Subject: [PATCH 1249/1744] Update transmit.py transmit_cw_id_fm at start of repeater --- transmit.py | 73 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 54 insertions(+), 19 deletions(-) diff --git a/transmit.py b/transmit.py index 0f0745ea..42583573 100644 --- a/transmit.py +++ b/transmit.py @@ -613,6 +613,39 @@ morse_table = [ # 0-9, A-Z only by (ASCII - 48) [ 3, 3, 1, 1, 0, 0 ] # Z ] +def cw_transmit_id_fm(): + global txLed + global no_command + global debug_mode + global sim_mode + global callsign + global tx + global txr + + try: + output(txLed, 1) + print("Transmit CW ID") + status = "" + if not no_command: + status = status + " C" + if sim_mode: + status = status + " S" + if (mode != 'e'): + if (debug_mode == 1): + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + else: + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + else: + if (debug_mode == 1): + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3") + else: + system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1") + + output(txLed, 0) + except Exception as e: + print(f"An error occurred: {e}") + print("cw_transmit_id_fm failed") + def cw_transmit_string(string): global morse_timing for character in string: @@ -979,25 +1012,26 @@ if __name__ == "__main__": print("Don't transmit CW ID since APRS HAB mode is active") else: if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode - output(txLed, 1) - print("Transmit CW ID") - status = "" - if not no_command: - status = status + " C" - if sim_mode: - status = status + " S" - if (mode != 'e'): - if (debug_mode == 1): - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") - else: - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - else: - if (debug_mode == 1): - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3") - else: - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1") - - output(txLed, 0) + cw_transmit_id_fm() +# output(txLed, 1) +# print("Transmit CW ID") +# status = "" +# if not no_command: +# status = status + " C" +# if sim_mode: +# status = status + " S" +# if (mode != 'e'): +# if (debug_mode == 1): +# system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") +# else: +# system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") +# else: +# if (debug_mode == 1): +# system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3") +# else: +# system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1") +# +# output(txLed, 0) sleep(1) else: @@ -1456,6 +1490,7 @@ if __name__ == "__main__": print("Ready to detect carrier") if (doppler_mode): update_doppler() + cw_transmit_id_fm() start_time = time.perf_counter() while True: From 801417ae199452445c6ae9f6480df6e222159cd8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 11:02:16 -0400 Subject: [PATCH 1250/1744] Update transmit.py txr always in MHz --- transmit.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 42583573..44b38102 100644 --- a/transmit.py +++ b/transmit.py @@ -254,8 +254,8 @@ def start_repeater(tx_doppler_freq_hz): global txLed print("Starting repeater") output(txLed, 1) - txr = "{:.3f}".format(tx_doppler_freq_hz/1000) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") + txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") @@ -522,6 +522,7 @@ def update_doppler(fm="yes"): global doppler_table global mode global tx + global txr global rigctl print("update_doppler") @@ -560,6 +561,8 @@ def update_doppler(fm="yes"): if (mode != 'e'): tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) # print(tx) + else: + txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) program_fm(rx,tx,rxpl_value,sq,txpl_value) else: print("Not applying Doppler shift!") @@ -1490,6 +1493,7 @@ if __name__ == "__main__": print("Ready to detect carrier") if (doppler_mode): update_doppler() + txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) cw_transmit_id_fm() start_time = time.perf_counter() From 8b583607cc07bfc610f2621f079b75a263141127 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 11:25:30 -0400 Subject: [PATCH 1251/1744] Update transmit.py change cw_transmit_id to cw_transmit_fm --- transmit.py | 62 +++++++++++++++++++++++++++-------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/transmit.py b/transmit.py index 44b38102..c9adb049 100644 --- a/transmit.py +++ b/transmit.py @@ -616,38 +616,38 @@ morse_table = [ # 0-9, A-Z only by (ASCII - 48) [ 3, 3, 1, 1, 0, 0 ] # Z ] -def cw_transmit_id_fm(): +def cw_transmit_fm(morse, tx): global txLed - global no_command +# global no_command global debug_mode - global sim_mode - global callsign - global tx - global txr +# global sim_mode +# global callsign +# global tx +# global txr try: output(txLed, 1) - print("Transmit CW ID") - status = "" - if not no_command: - status = status + " C" - if sim_mode: - status = status + " S" - if (mode != 'e'): - if (debug_mode == 1): - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") - else: - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + print("Transmit FM CW " + morse) +# status = "" +# if not no_command: +# status = status + " C" +# if sim_mode: +# status = status + " S" +# if (mode != 'e'): + if (debug_mode == 1): + system("echo 'hi hi de " + morse + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: - if (debug_mode == 1): - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3") - else: - system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1") + system("echo 'hi hi de " + morse + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") +# else: +# if (debug_mode == 1): +# system("echo 'hi hi de " + morse + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3") +# else: +# system("echo 'hi hi de " + morse + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1") output(txLed, 0) except Exception as e: print(f"An error occurred: {e}") - print("cw_transmit_id_fm failed") + print("cw_transmit_fm failed") def cw_transmit_string(string): global morse_timing @@ -1015,20 +1015,22 @@ if __name__ == "__main__": print("Don't transmit CW ID since APRS HAB mode is active") else: if (((mode == 'a') or (mode == 'b') or (mode == 'f') or (mode == 's') or (mode == 'j') or (mode == 'p') or (mode == 'P')) and (command_tx == True) and (skip == False)) or ((mode == 'e') and (command_tx == True)): # battery_saver_mode - cw_transmit_id_fm() + # output(txLed, 1) # print("Transmit CW ID") -# status = "" -# if not no_command: -# status = status + " C" -# if sim_mode: -# status = status + " S" -# if (mode != 'e'): + status = "" + if not no_command: + status = status + " C" + if sim_mode: + status = status + " S" + if (mode != 'e'): + cw_transmit_fm(callsign + status, tx) # if (debug_mode == 1): # system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") # else: # system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") -# else: + else: + cw_transmit_fm(callsign + status, txr) # if (debug_mode == 1): # system("echo 'hi hi de " + callsign + status + "' > id.txt && gen_packets -M 20 /home/pi/CubeSatSim/id.txt -o /home/pi/CubeSatSim/morse.wav -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + txr + "e3") # else: From baff64ff1acdbd8ed09cbf76324ee9b2c9fbd0d5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 11:38:47 -0400 Subject: [PATCH 1252/1744] Update transmit.py fix mode e cw id --- transmit.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/transmit.py b/transmit.py index c9adb049..3fe40982 100644 --- a/transmit.py +++ b/transmit.py @@ -1011,6 +1011,13 @@ if __name__ == "__main__": sleep(15) # avoid CW jumping around at start sim_failure_check() + + status = "" + if not no_command: + status = status + " C" + if sim_mode: + status = status + " S" + if (hab_mode == True) and (mode == 'a'): print("Don't transmit CW ID since APRS HAB mode is active") else: @@ -1018,11 +1025,7 @@ if __name__ == "__main__": # output(txLed, 1) # print("Transmit CW ID") - status = "" - if not no_command: - status = status + " C" - if sim_mode: - status = status + " S" + if (mode != 'e'): cw_transmit_fm(callsign + status, tx) # if (debug_mode == 1): @@ -1496,7 +1499,7 @@ if __name__ == "__main__": if (doppler_mode): update_doppler() txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) - cw_transmit_id_fm() + cw_transmit_fm(callsign + status) start_time = time.perf_counter() while True: From 947e98a146af2143b4a5f0099368f981a43045d9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 11:44:13 -0400 Subject: [PATCH 1253/1744] Update transmit.py repeater transmit cw id on 2m --- transmit.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/transmit.py b/transmit.py index 3fe40982..ea120182 100644 --- a/transmit.py +++ b/transmit.py @@ -556,13 +556,13 @@ def update_doppler(fm="yes"): # print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") # rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz # print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") - if (fm != "no"): - rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) - if (mode != 'e'): - tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) + rx = "{:.4f}".format(rx_doppler_freq_hz/1e6) + if (mode != 'e'): + tx = "{:.4f}".format(tx_doppler_freq_hz/1e6) # print(tx) - else: - txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) + else: + txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) + if (fm != "no"): program_fm(rx,tx,rxpl_value,sq,txpl_value) else: print("Not applying Doppler shift!") @@ -1499,7 +1499,7 @@ if __name__ == "__main__": if (doppler_mode): update_doppler() txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) - cw_transmit_fm(callsign + status) + cw_transmit_fm(callsign + status, txr) start_time = time.perf_counter() while True: From 74ed1d74d089b888a7388657d7113d4709625008 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 11:55:51 -0400 Subject: [PATCH 1254/1744] Update transmit.py add QSY if doppler --- transmit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index ea120182..8fc473ef 100644 --- a/transmit.py +++ b/transmit.py @@ -988,7 +988,8 @@ if __name__ == "__main__": program_fm(rx,tx,rxpl_value,sq,txpl_value) if (doppler_mode == True): - + + cw_transmit_fm("QSY", tx) if (mode == 'e'): tx_doppler_start_hz = txrf * 1e6 else: @@ -1006,6 +1007,8 @@ if __name__ == "__main__": print("MODE: ") print(mode) + + update_doppler() if (mode == 'm'): print("Sleeping 15 seconds") sleep(15) # avoid CW jumping around at start @@ -1017,7 +1020,7 @@ if __name__ == "__main__": status = status + " C" if sim_mode: status = status + " S" - + if ( if (hab_mode == True) and (mode == 'a'): print("Don't transmit CW ID since APRS HAB mode is active") else: From 41c0b867b370586bfb23430332beeadf53ad46b2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 11:57:05 -0400 Subject: [PATCH 1255/1744] Update transmit.py remove stray if --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 8fc473ef..9d2d28f2 100644 --- a/transmit.py +++ b/transmit.py @@ -1020,7 +1020,7 @@ if __name__ == "__main__": status = status + " C" if sim_mode: status = status + " S" - if ( + if (hab_mode == True) and (mode == 'a'): print("Don't transmit CW ID since APRS HAB mode is active") else: From 2318f5c9505f3437b28543c1139fa6dc53341709 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 12:02:33 -0400 Subject: [PATCH 1256/1744] Update transmit.py remove extra cw id repeater --- transmit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index 9d2d28f2..2cbd02a2 100644 --- a/transmit.py +++ b/transmit.py @@ -1499,10 +1499,10 @@ if __name__ == "__main__": print("Beacon mode off so no repeater transmission") print("Ready to detect carrier") - if (doppler_mode): - update_doppler() - txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) - cw_transmit_fm(callsign + status, txr) +# if (doppler_mode): +# update_doppler() +# txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) +# cw_transmit_fm(callsign + status, txr) start_time = time.perf_counter() while True: From 734dae3f02f0221955c6ea76c2fad58110d5700b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 12:16:45 -0400 Subject: [PATCH 1257/1744] Update transmit.py only shift frequency for U/V --- transmit.py | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/transmit.py b/transmit.py index 2cbd02a2..df60f308 100644 --- a/transmit.py +++ b/transmit.py @@ -535,19 +535,25 @@ def update_doppler(fm="yes"): print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") if rigctl: - if (tx_frequency > 145880000): - tx_center = 145960000 # AO-91 - rx_center = 435250000 # AO-73 is same tx_center but 435140000 + if (tx_frequency < 148000000): + if (tx_frequency > 145880000): + tx_center = 145960000 # AO-91 + rx_center = 435250000 # AO-73 is same tx_center but 435140000 + else: + tx_center = 145800000 # ISS U/V Repeater + rx_center = 437800000 + tx_doppler_shift = tx_frequency - tx_center + rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift + new_tx_frequency = tx_frequency + new_rx_frequency = rx_center + rx_doppler_shift + print("Calculating RX frequency using offset from TX frequency!") + print(f"Tx Doppler Shift: {tx_doppler_shift:.0f} Frequency: {new_tx_frequency:.0f}") + print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") else: - tx_center = 145800000 # ISS U/V Repeater - rx_center = 437800000 - tx_doppler_shift = tx_frequency - tx_center - rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift - new_tx_frequency = tx_frequency - new_rx_frequency = rx_center + rx_doppler_shift - print("Calculating RX frequency using offset from TX frequency!") - print(f"Tx Doppler Shift: {tx_doppler_shift:.0f} Frequency: {new_tx_frequency:.0f}") - print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") + new_tx_frequency = tx_frequency + new_rx_frequency = tx_frequency + print(f"Tx Frequency: {new_tx_frequency:.0f}") + print(f"Rx Frequency: {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency From 573eb5b53b9ea100996d44455820652a0e51978b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 12:49:47 -0400 Subject: [PATCH 1258/1744] Update transmit.py update FM once per cw string --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index df60f308..a14685f5 100644 --- a/transmit.py +++ b/transmit.py @@ -658,7 +658,8 @@ def cw_transmit_fm(morse, tx): def cw_transmit_string(string): global morse_timing for character in string: - if (character != ' '): + if (character != ' '): + update_doppler() cw_transmit_char(character); else: sleep(7.0 * morse_timing); @@ -1515,7 +1516,7 @@ if __name__ == "__main__": if (input(squelch) == False) and (command_tx == True): print("Carrier detected") if (doppler_mode): - update_doppler() + update_doppler() start_repeater(tx_doppler_freq_hz) else: start_repeater(txrf * 1e6) From 5e385b850bddd533754f4483be28b18d0aa64ebb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 19 Jul 2026 12:55:36 -0400 Subject: [PATCH 1259/1744] Update transmit.py program fm out of bands to default --- transmit.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index a14685f5..67771e18 100644 --- a/transmit.py +++ b/transmit.py @@ -226,7 +226,15 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): if (gpsd_status == "active"): print("Stopping gpsd.socket") system("sudo systemctl stop gpsd.socket") - print("Programming FM module!\n"); + print("Programming FM module!\n"); + txf = float(tx) + rxf = float(rx) + if (txf > 450.0) or (txf < 420.0): + tx = "434.9000" + print("Transmit frequency out of FM bounds") + if (rxf > 450.0) or (rxf < 420.0): + rx = "435.0000" + print("Receive frequency out of FM bounds") output(pd, 1) output (ptt, 1) try: From 7515fe6b09d5f31b90b14be02d5705c9dfa892b9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 00:21:00 -0400 Subject: [PATCH 1260/1744] Update transmit.py add two_meter_rpitx transmit --- transmit.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 67771e18..b38de02f 100644 --- a/transmit.py +++ b/transmit.py @@ -223,15 +223,34 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): global gpsd_status global pd global ptt + global force_rpitx + global txc + global restore_txc + if (gpsd_status == "active"): print("Stopping gpsd.socket") system("sudo systemctl stop gpsd.socket") print("Programming FM module!\n"); txf = float(tx) rxf = float(rx) - if (txf > 450.0) or (txf < 420.0): + + if (txf > 144.0) and (txf < 148.0): + two_meter_rpitx = True + if (txc): + restore_txc = True + txc = False + tx = "434.9000" + elif (two_meter_rpitx): + two_meter_rpitx = False + if (restore_txc): + txc = True + restore_txc = False + + if (txf > 450.0) or (txf < 420.0) and not two_meter_rpitx: tx = "434.9000" print("Transmit frequency out of FM bounds") + + if (rxf > 450.0) or (rxf < 420.0): rx = "435.0000" print("Receive frequency out of FM bounds") @@ -718,6 +737,8 @@ squelch = 6 green = 16 powerPin = 16 morse_timing = 0.09 # 0.1 +two_meter_rpitx = False +restore_txc = False command_tx = True From c3b9f59206287b616a97a9b36ad278ab3a8b91ad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 00:32:46 -0400 Subject: [PATCH 1261/1744] Update transmit.py add log messages --- transmit.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index b38de02f..d5667e2f 100644 --- a/transmit.py +++ b/transmit.py @@ -223,7 +223,7 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): global gpsd_status global pd global ptt - global force_rpitx + global two_meter_rpitx global txc global restore_txc @@ -236,20 +236,23 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): if (txf > 144.0) and (txf < 148.0): two_meter_rpitx = True + print("Transmitting in 2m band using rptix") if (txc): restore_txc = True + print("Restore FM with 70cm band") txc = False tx = "434.9000" elif (two_meter_rpitx): two_meter_rpitx = False + print("Stop transmitting in 2m bacnd using rptix") if (restore_txc): txc = True restore_txc = False + print("Restore FM with 70cm band") if (txf > 450.0) or (txf < 420.0) and not two_meter_rpitx: tx = "434.9000" - print("Transmit frequency out of FM bounds") - + print("Transmit frequency out of 70cm band") if (rxf > 450.0) or (rxf < 420.0): rx = "435.0000" @@ -268,13 +271,15 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): sleep(0.1) ser.close() ser = serial.Serial("/dev/ttyAMA0", 115200) # reset back to 115200 for cubesatsim code for payload sensor data - except: + except Exception as e: + print(f"An error occurred: {e}") print("Error in serial write") # output(pd, 0) # Don't turn off receiver if (gpsd_status == "active"): print("Restarting gpsd.socket") system("sudo systemctl restart gpsd.socket") - except: + except Exception as e: + print(f"An error occurred: {e}") print("program_fm failed") def start_repeater(tx_doppler_freq_hz): From b1db42250c37a2eb372268d5e2271a8b63dcf74b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 00:39:55 -0400 Subject: [PATCH 1262/1744] Update transmit.py prints --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d5667e2f..187b7cb8 100644 --- a/transmit.py +++ b/transmit.py @@ -248,7 +248,7 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): if (restore_txc): txc = True restore_txc = False - print("Restore FM with 70cm band") + print("Restoring FM with 70cm band") if (txf > 450.0) or (txf < 420.0) and not two_meter_rpitx: tx = "434.9000" From da9efd852e72f86a0b6028a1ed92b5f975b09ba4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 00:58:26 -0400 Subject: [PATCH 1263/1744] Update transmit.py sudo rm t.txt --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index 187b7cb8..6e982d59 100644 --- a/transmit.py +++ b/transmit.py @@ -1166,6 +1166,7 @@ if __name__ == "__main__": f.close() if (debug_mode == 1): print("Packet ready!") + system("sudo rm home/pi/CubeSatSim/t.txt") system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): From beb2d07720be993076892e2240d66b14eea639db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 00:59:50 -0400 Subject: [PATCH 1264/1744] Update transmit.py fix sudo rm --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6e982d59..36685878 100644 --- a/transmit.py +++ b/transmit.py @@ -1166,7 +1166,7 @@ if __name__ == "__main__": f.close() if (debug_mode == 1): print("Packet ready!") - system("sudo rm home/pi/CubeSatSim/t.txt") + system("sudo rm /home/pi/CubeSatSim/t.txt") system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): From 9f640225d385d27eb9e1833470a0bcd161ff09ff Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 01:10:41 -0400 Subject: [PATCH 1265/1744] Update transmit.py reboot when going two_meter to FM --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 36685878..e2a568c7 100644 --- a/transmit.py +++ b/transmit.py @@ -249,6 +249,8 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): txc = True restore_txc = False print("Restoring FM with 70cm band") + print("Rebooting") + system("sudo reboot now") if (txf > 450.0) or (txf < 420.0) and not two_meter_rpitx: tx = "434.9000" From 780bdb55eaf8a45b7fb63917a7edfccf23ba9f36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 17:40:31 -0400 Subject: [PATCH 1266/1744] Update transmit.py remove rm t.txt --- transmit.py | 1 - 1 file changed, 1 deletion(-) diff --git a/transmit.py b/transmit.py index e2a568c7..c047c1b8 100644 --- a/transmit.py +++ b/transmit.py @@ -1168,7 +1168,6 @@ if __name__ == "__main__": f.close() if (debug_mode == 1): print("Packet ready!") - system("sudo rm /home/pi/CubeSatSim/t.txt") system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1") system("cat /home/pi/CubeSatSim/t.txt") if (command_tx == True): From 048689f2257a1780f3aa1b8a7909b272a70d37e8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 18:10:44 -0400 Subject: [PATCH 1267/1744] Update transmit.py fix new_tx_frequency --- transmit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c047c1b8..8f488067 100644 --- a/transmit.py +++ b/transmit.py @@ -587,7 +587,12 @@ def update_doppler(fm="yes"): new_tx_frequency = tx_frequency new_rx_frequency = tx_frequency print(f"Tx Frequency: {new_tx_frequency:.0f}") - print(f"Rx Frequency: {new_rx_frequency:.0f}") + print(f"Rx Frequency: {new_rx_frequency:.0f}") + else: + new_tx_frequency = tx_frequency + new_rx_frequency = tx_frequency + print(f"Tx Frequency: {new_tx_frequency:.0f}") + print(f"Rx Frequency: {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency From 810cef9613096279ea1986cc85b8062b2de879b6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 18:15:16 -0400 Subject: [PATCH 1268/1744] Update transmit.py fix new_rx_frequency for sim --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 8f488067..d108237f 100644 --- a/transmit.py +++ b/transmit.py @@ -585,7 +585,7 @@ def update_doppler(fm="yes"): print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") else: new_tx_frequency = tx_frequency - new_rx_frequency = tx_frequency + new_rx_frequency = rx_frequency print(f"Tx Frequency: {new_tx_frequency:.0f}") print(f"Rx Frequency: {new_rx_frequency:.0f}") else: From cb385f4bf997418d24334523762aa62aaa7fd0e3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 18:58:45 -0400 Subject: [PATCH 1269/1744] Update frequency.py remove vfo from rigctl --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index c38034a4..ea08b0e2 100644 --- a/frequency.py +++ b/frequency.py @@ -857,7 +857,7 @@ if (doppler_mode == 'rig'): sleep(1.0) print("Starting rigctl emulating FT857 rig using virtual serial port /tmp/vttyB") - system("rigctld -m 1022 -r /tmp/vttyB -t 4532 -vv --vfo") + system("rigctld -m 1022 -r /tmp/vttyB -t 4532 -vvv") print("rigctld ended") From 88f5ffbcd1d428cf8d590f582f082db2cb3c956e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 19:51:43 -0400 Subject: [PATCH 1270/1744] Update transmit.py don't restore 70cm after 2m in rigctl --- transmit.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/transmit.py b/transmit.py index d108237f..e6ab89b8 100644 --- a/transmit.py +++ b/transmit.py @@ -237,24 +237,24 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): if (txf > 144.0) and (txf < 148.0): two_meter_rpitx = True print("Transmitting in 2m band using rptix") - if (txc): - restore_txc = True - print("Restore FM with 70cm band") +# if (txc): +# restore_txc = True +# print("Restore FM with 70cm band") txc = False tx = "434.9000" - elif (two_meter_rpitx): - two_meter_rpitx = False - print("Stop transmitting in 2m bacnd using rptix") - if (restore_txc): - txc = True - restore_txc = False - print("Restoring FM with 70cm band") - print("Rebooting") - system("sudo reboot now") +# elif (two_meter_rpitx): +# two_meter_rpitx = False +# print("Stop transmitting in 2m bacnd using rptix") +# if (restore_txc): +# txc = True +# restore_txc = False +# print("Restoring FM with 70cm band") +# print("Rebooting") +# system("sudo reboot now") - if (txf > 450.0) or (txf < 420.0) and not two_meter_rpitx: + if (txf > 450.0) or ((txf < 420.0) and (txf > 148.0)) or (txf < 144.0) : tx = "434.9000" - print("Transmit frequency out of 70cm band") + print("Transmit frequency out of amateur bands") if (rxf > 450.0) or (rxf < 420.0): rx = "435.0000" From 08404169eedee877ccd3f4ab820b77fc3f5d56d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 19:59:34 -0400 Subject: [PATCH 1271/1744] Update transmit.py use tee instead of echo --- transmit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index e6ab89b8..d8d1b418 100644 --- a/transmit.py +++ b/transmit.py @@ -1192,7 +1192,9 @@ if __name__ == "__main__": output (ptt, 1) # output(pd, 0) else: - system("echo 'AMSAT-11>APCSS:010101/hi hi ' >> t.txt") +# system("echo 'AMSAT-11>APCSS:010101/hi hi ' >> t.txt") + system("echo 'AMSAT-11>APCSS:010101/hi hi ' | sudo tee -a /home/pi/CubeSatSim/t.txt") + if (debug_mode == 1): system("gen_packets -o /home/pi/CubeSatSim/telem.wav /home/pi/CubeSatSim/t.txt -r 48000 > /dev/null 2>&1 && cat /home/pi/CubeSatSim/telem.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") else: From bc02cab00aa4026152d90cdd42d7e5120c9ae689 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 20 Jul 2026 22:54:37 -0400 Subject: [PATCH 1272/1744] Update transmit.py remove all killall -rpitx --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index d8d1b418..6dfe1206 100644 --- a/transmit.py +++ b/transmit.py @@ -300,7 +300,7 @@ def stop_repeater(): system("sudo rpitx -i null > /dev/null 2>&1") system("sudo killall -9 arecord > /dev/null 2>&1") system("sudo killall -9 nc > /dev/null 2>&1") - system("sudo killall -9 rpitx > /dev/null 2>&1") +# system("sudo killall -9 rpitx > /dev/null 2>&1") print("Resetting audio") system("sudo /etc/init.d/alsa-utils stop") system("sudo /etc/init.d/alsa-utils start") @@ -727,7 +727,7 @@ def transmit_carrier(duration): command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 stop = "sudo rpitx -f 434.9e6 &" - killrpitx = "sudo killall -9 rpitx &" +# killrpitx = "sudo killall -9 rpitx &" killtune = "sudo killall -9 tune &" output(txLed, 1) # system(start) From 6e8eaa112b2881b32d36e46066fe5659c2ad851c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 10:30:52 -0400 Subject: [PATCH 1273/1744] Update transmit.py 10 Hz updates on repeater mode doppler --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 6dfe1206..daceae22 100644 --- a/transmit.py +++ b/transmit.py @@ -288,7 +288,7 @@ def start_repeater(tx_doppler_freq_hz): global txLed print("Starting repeater") output(txLed, 1) - txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) + txr = "{:.6f}".format(tx_doppler_freq_hz/1e6) system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") From afb606cd40df404f69a4cbf9bcdb1302a4937278 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 10:35:27 -0400 Subject: [PATCH 1274/1744] Update transmit.py change start_repeater to kHz --- transmit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index daceae22..d80c871e 100644 --- a/transmit.py +++ b/transmit.py @@ -288,8 +288,9 @@ def start_repeater(tx_doppler_freq_hz): global txLed print("Starting repeater") output(txLed, 1) - txr = "{:.6f}".format(tx_doppler_freq_hz/1e6) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + "e3 > /dev/null 2>&1 &") + txr = "{:.3f}".format(tx_doppler_freq_hz/1e3) + print(txr) + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") From c76471a895251024bbc4f84b596e6d57d99a7fa3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 13:38:28 -0400 Subject: [PATCH 1275/1744] Update transmit.py add AO-7 and AO-73 --- transmit.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/transmit.py b/transmit.py index d80c871e..5aa436a5 100644 --- a/transmit.py +++ b/transmit.py @@ -570,13 +570,23 @@ def update_doppler(fm="yes"): print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") if rigctl: - if (tx_frequency < 148000000): - if (tx_frequency > 145880000): - tx_center = 145960000 # AO-91 - rx_center = 435250000 # AO-73 is same tx_center but 435140000 - else: - tx_center = 145800000 # ISS U/V Repeater - rx_center = 437800000 + if (tx_frequency > 145955000) and (tx_frequency <= 145965000): + tx_center = 145960000 # AO-91 + rx_center = 435250000 + elif (tx_frequency > 145965000) and (tx_frequency < 145975000): + tx_center = 145970000 # AO-73 center is shifted up 10kHz to avoid overlap with AO-91 + rx_center = 435150000 + elif (tx_frequency > 145795000) and (tx_frequency < 145805000): + tx_center = 145800000 # ISS U/V Repeater + rx_center = 437800000 + elif (tx_frequency > 145945000) and (tx_frequency <= 145955000): + tx_center = 145950000 # AO-7 + rx_center = 432150000 + else: + tx_center = tx_frequency + rx_center = 435000000 # default RX requency + + if (rx_center != 435000000): # don't Doppler shift default RX frequency since don't know the shift tx_doppler_shift = tx_frequency - tx_center rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift new_tx_frequency = tx_frequency From fa33857285de9c962cb01f4817c1050e7ca35175 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 13:44:14 -0400 Subject: [PATCH 1276/1744] Update transmit.py add satellite prints --- transmit.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/transmit.py b/transmit.py index 5aa436a5..f9f0b00f 100644 --- a/transmit.py +++ b/transmit.py @@ -573,18 +573,23 @@ def update_doppler(fm="yes"): if (tx_frequency > 145955000) and (tx_frequency <= 145965000): tx_center = 145960000 # AO-91 rx_center = 435250000 + print("AO-91 detected!") elif (tx_frequency > 145965000) and (tx_frequency < 145975000): tx_center = 145970000 # AO-73 center is shifted up 10kHz to avoid overlap with AO-91 rx_center = 435150000 + print("AO-73 detected!") elif (tx_frequency > 145795000) and (tx_frequency < 145805000): tx_center = 145800000 # ISS U/V Repeater rx_center = 437800000 + print("ISS U/V detected!") elif (tx_frequency > 145945000) and (tx_frequency <= 145955000): tx_center = 145950000 # AO-7 rx_center = 432150000 + print("AO-7 detected!") else: tx_center = tx_frequency rx_center = 435000000 # default RX requency + print("No Satellite detected. Using default RX frequency with no doppler shift") if (rx_center != 435000000): # don't Doppler shift default RX frequency since don't know the shift tx_doppler_shift = tx_frequency - tx_center From 2c226e0c8dfa7be4edee93638ace6cbdc79b325c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 13:55:01 -0400 Subject: [PATCH 1277/1744] Update transmit.py use default RX frequency if no satellite detected --- transmit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index f9f0b00f..b10a931f 100644 --- a/transmit.py +++ b/transmit.py @@ -557,6 +557,7 @@ def update_doppler(fm="yes"): global doppler_table global mode global tx + global rxf global txr global rigctl print("update_doppler") @@ -588,10 +589,10 @@ def update_doppler(fm="yes"): print("AO-7 detected!") else: tx_center = tx_frequency - rx_center = 435000000 # default RX requency + rx_center = rxf * 1e6 # default RX requency print("No Satellite detected. Using default RX frequency with no doppler shift") - if (rx_center != 435000000): # don't Doppler shift default RX frequency since don't know the shift + if (rx_center != rxf * 1e6): # don't Doppler shift default RX frequency since don't know the shift tx_doppler_shift = tx_frequency - tx_center rx_doppler_shift = -1 * (rx_center/tx_center) * tx_doppler_shift new_tx_frequency = tx_frequency @@ -601,7 +602,7 @@ def update_doppler(fm="yes"): print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") else: new_tx_frequency = tx_frequency - new_rx_frequency = rx_frequency + new_rx_frequency = rxf * 1e6 # default RX frequency or should we use same as tx frequency with doppler shift? print(f"Tx Frequency: {new_tx_frequency:.0f}") print(f"Rx Frequency: {new_rx_frequency:.0f}") else: From 609fd96e5cf4fa1b38f37d5907a1c55feeb1a7d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 13:59:46 -0400 Subject: [PATCH 1278/1744] Update transmit.py fix AO-73 doppler --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index b10a931f..044b86b4 100644 --- a/transmit.py +++ b/transmit.py @@ -576,8 +576,8 @@ def update_doppler(fm="yes"): rx_center = 435250000 print("AO-91 detected!") elif (tx_frequency > 145965000) and (tx_frequency < 145975000): - tx_center = 145970000 # AO-73 center is shifted up 10kHz to avoid overlap with AO-91 - rx_center = 435150000 + tx_center = 145960000 # AO-73 detection is shifted up 10kHz to avoid overlap with AO-91 + rx_center = 435140000 print("AO-73 detected!") elif (tx_frequency > 145795000) and (tx_frequency < 145805000): tx_center = 145800000 # ISS U/V Repeater From 18884dede3a97fe8edfcfa956ecffe1b29d53375 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 14:03:24 -0400 Subject: [PATCH 1279/1744] Update transmit.py fix AO-73 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 044b86b4..22c6f838 100644 --- a/transmit.py +++ b/transmit.py @@ -577,7 +577,7 @@ def update_doppler(fm="yes"): print("AO-91 detected!") elif (tx_frequency > 145965000) and (tx_frequency < 145975000): tx_center = 145960000 # AO-73 detection is shifted up 10kHz to avoid overlap with AO-91 - rx_center = 435140000 + rx_center = 435150000 print("AO-73 detected!") elif (tx_frequency > 145795000) and (tx_frequency < 145805000): tx_center = 145800000 # ISS U/V Repeater From e7f6125d3ddec7be29cdacc82c68c4a6dff8bbc3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 14:09:26 -0400 Subject: [PATCH 1281/1744] Update transmit.py AO-73 shifted up 10 --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 22c6f838..2889153d 100644 --- a/transmit.py +++ b/transmit.py @@ -576,8 +576,8 @@ def update_doppler(fm="yes"): rx_center = 435250000 print("AO-91 detected!") elif (tx_frequency > 145965000) and (tx_frequency < 145975000): - tx_center = 145960000 # AO-73 detection is shifted up 10kHz to avoid overlap with AO-91 - rx_center = 435150000 + tx_center = 145970000 # AO-73 is shifted up 10kHz to avoid overlap with AO-91 + rx_center = 435140000 print("AO-73 detected!") elif (tx_frequency > 145795000) and (tx_frequency < 145805000): tx_center = 145800000 # ISS U/V Repeater From 32c0d47758fed8949906213a45850ddacb6ad992 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 17:18:47 -0400 Subject: [PATCH 1282/1744] Update transmit.py only sleep 15 seconds cw on boot --- transmit.py | 48 +++++++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/transmit.py b/transmit.py index 2889153d..b6339162 100644 --- a/transmit.py +++ b/transmit.py @@ -17,6 +17,20 @@ def output(pin, value): system(command) print(command) +def uptime_seconds() + try: + system("sudo cat /proc/uptime > /home/pi/CubeSatSim/uptime") + file = open("/home/pi/CubeSatSim/uptime") + up = file.read().split(" ")[0] + print(up) + uptime = float(up) + print(uptime) + file.close() + return(uptime) + except Exception as e: + print(f"An error occurred: {e}") + print("uptime_seconds failed") + def input(pin): # command = "gpio -g read " + str(pin) query = ["gpio", "-g", "read", str(pin)] # Read GPIO pin @@ -842,22 +856,22 @@ if __name__ == "__main__": except: print("Pi Zero 2 not detected") - try: - system("sudo cat /proc/uptime > /home/pi/CubeSatSim/uptime") - file = open("/home/pi/CubeSatSim/uptime") - up = file.read().split(" ")[0] - print(up) - uptime = float(up) - print(uptime) - if (uptime < uptime_time): - print("Uptime < threshold seconds") - else: - print("Uptime > threshold seconds") - print("Skip CW ID") - skip = True - file.close() - except: - print("Can't open /proc/uptime") +# try: +# system("sudo cat /proc/uptime > /home/pi/CubeSatSim/uptime") +# file = open("/home/pi/CubeSatSim/uptime") +# up = file.read().split(" ")[0] +# print(up) +# uptime = float(up) +# print(uptime) + if (uptime_seconds() < uptime_time): + print("Uptime < threshold seconds") + else: + print("Uptime > threshold seconds") + print("Skip CW ID") + skip = True +# file.close() +# except: +# print("Can't open /proc/uptime") print(skip) if ( mode == "y"): @@ -1074,7 +1088,7 @@ if __name__ == "__main__": print(mode) update_doppler() - if (mode == 'm'): + if (mode == 'm') and (uptime_seconds() < (uptime_time + 5)): print("Sleeping 15 seconds") sleep(15) # avoid CW jumping around at start From 1182c993b54525d476ab4f7c82970d85d2294b72 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 17:20:45 -0400 Subject: [PATCH 1283/1744] Update transmit.py fix def --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index b6339162..c278f148 100644 --- a/transmit.py +++ b/transmit.py @@ -17,7 +17,7 @@ def output(pin, value): system(command) print(command) -def uptime_seconds() +def uptime_seconds(): try: system("sudo cat /proc/uptime > /home/pi/CubeSatSim/uptime") file = open("/home/pi/CubeSatSim/uptime") @@ -26,7 +26,7 @@ def uptime_seconds() uptime = float(up) print(uptime) file.close() - return(uptime) + return uptime except Exception as e: print(f"An error occurred: {e}") print("uptime_seconds failed") From cd9daa55f2571cbe63e71941e54d951877c9da44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 17:29:10 -0400 Subject: [PATCH 1284/1744] Update transmit.py only transmit CW QSY on boot --- transmit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c278f148..e8fc260c 100644 --- a/transmit.py +++ b/transmit.py @@ -1068,7 +1068,9 @@ if __name__ == "__main__": if (doppler_mode == True): - cw_transmit_fm("QSY", tx) + if (command_tx == True) and (skip == False): + cw_transmit_fm("QSY", tx) + if (mode == 'e'): tx_doppler_start_hz = txrf * 1e6 else: From dacf276cfc99cf46a6795175233a6228f4c66ea6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 17:37:23 -0400 Subject: [PATCH 1285/1744] Update transmit.py use skip to determine 15 seconds of sleep for cw mode --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index e8fc260c..6a469d0e 100644 --- a/transmit.py +++ b/transmit.py @@ -29,7 +29,7 @@ def uptime_seconds(): return uptime except Exception as e: print(f"An error occurred: {e}") - print("uptime_seconds failed") + print(" failed") def input(pin): # command = "gpio -g read " + str(pin) @@ -1090,7 +1090,7 @@ if __name__ == "__main__": print(mode) update_doppler() - if (mode == 'm') and (uptime_seconds() < (uptime_time + 5)): + if (mode == 'm') and (skip == False): print("Sleeping 15 seconds") sleep(15) # avoid CW jumping around at start From 3ff6802fd70f7f6de31898fe9f5f6b8b6c948b18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 21:16:54 -0400 Subject: [PATCH 1286/1744] Update transmit.py check for gui and sleep 30 more --- transmit.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/transmit.py b/transmit.py index 6a469d0e..ad1c4cd5 100644 --- a/transmit.py +++ b/transmit.py @@ -1093,6 +1093,22 @@ if __name__ == "__main__": if (mode == 'm') and (skip == False): print("Sleeping 15 seconds") sleep(15) # avoid CW jumping around at start + + query = ["systemctl", "get-default", "|", "grep graphical.target"] + try: + result = subprocess.run(query, capture_output=True, text=True, check=True) + print(f"Command run was: {query}") + gui_status = result.stdout.strip() + print(f"Output of the command (stdout): {gui_status}") + except subprocess.CalledProcessError as e: + # print(f"Command failed with return code: {e.returncode}") + print(f"Command run was: {e.cmd}") + gui_status = e.stdout.strip() + print(f"Output of the command (stdout): {e.stdout}") + # print(f"Error output of the command (stderr): {e.stderr}") + if gui_status = "graphical.target": + sleep(30) # sleep another 30 seconds for cpu to settle down + print (gui_status) sim_failure_check() From d1544dc9bb46f792438d1aa17200678e22bee82a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 21:18:28 -0400 Subject: [PATCH 1287/1744] Update transmit.py fix == --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index ad1c4cd5..a4fe9de8 100644 --- a/transmit.py +++ b/transmit.py @@ -1106,7 +1106,7 @@ if __name__ == "__main__": gui_status = e.stdout.strip() print(f"Output of the command (stdout): {e.stdout}") # print(f"Error output of the command (stderr): {e.stderr}") - if gui_status = "graphical.target": + if gui_status == "graphical.target": sleep(30) # sleep another 30 seconds for cpu to settle down print (gui_status) From 0691732c9cc06b7929b9443f5b57e76df0fea090 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 21:23:40 -0400 Subject: [PATCH 1288/1744] Update transmit.py print command result --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index a4fe9de8..241572af 100644 --- a/transmit.py +++ b/transmit.py @@ -1098,6 +1098,7 @@ if __name__ == "__main__": try: result = subprocess.run(query, capture_output=True, text=True, check=True) print(f"Command run was: {query}") + print(result) gui_status = result.stdout.strip() print(f"Output of the command (stdout): {gui_status}") except subprocess.CalledProcessError as e: @@ -1107,6 +1108,7 @@ if __name__ == "__main__": print(f"Output of the command (stdout): {e.stdout}") # print(f"Error output of the command (stderr): {e.stderr}") if gui_status == "graphical.target": + print("Sleep another 30 seconds") sleep(30) # sleep another 30 seconds for cpu to settle down print (gui_status) From 24d437863b52b768e6f32a52ddff82ebfa15bf2f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 21:29:57 -0400 Subject: [PATCH 1289/1744] Update transmit.py gui_result --- transmit.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/transmit.py b/transmit.py index 241572af..6d20aadc 100644 --- a/transmit.py +++ b/transmit.py @@ -1093,24 +1093,13 @@ if __name__ == "__main__": if (mode == 'm') and (skip == False): print("Sleeping 15 seconds") sleep(15) # avoid CW jumping around at start - - query = ["systemctl", "get-default", "|", "grep graphical.target"] - try: - result = subprocess.run(query, capture_output=True, text=True, check=True) - print(f"Command run was: {query}") - print(result) - gui_status = result.stdout.strip() - print(f"Output of the command (stdout): {gui_status}") - except subprocess.CalledProcessError as e: - # print(f"Command failed with return code: {e.returncode}") - print(f"Command run was: {e.cmd}") - gui_status = e.stdout.strip() - print(f"Output of the command (stdout): {e.stdout}") - # print(f"Error output of the command (stderr): {e.stderr}") - if gui_status == "graphical.target": + + result = subprocess.run("systemctl get-default | grep graphical.target", shell=True, capture_output=True, text=True) + gui_result = result.stdout.strip() + print(gui_result) + if gui_result == "graphical.target": print("Sleep another 30 seconds") sleep(30) # sleep another 30 seconds for cpu to settle down - print (gui_status) sim_failure_check() From 6010d791fea3b3a8b1895af687247e339e238396 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 21:54:53 -0400 Subject: [PATCH 1290/1744] add gpredict script --- groundstation/gpredict.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 groundstation/gpredict.sh diff --git a/groundstation/gpredict.sh b/groundstation/gpredict.sh new file mode 100755 index 00000000..6f926dc8 --- /dev/null +++ b/groundstation/gpredict.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# + +if [ ! $(systemctl get-default | grep graphical) ]; then + + echo "Graphical User Interface not running!" + echo + echo "Do you want to reboot and switch to GUI so you can run Gpredict?" + read answer + + if [ "$answer" = "y" ] || [ "$answer" = "yes" ]; then + echo "Rebooting!" + sudo raspi-config nonint do_boot_behaviour B4 + sudo reboot now + else + echo "You can run Gpredict next time you run the GUI." + exit + fi +fi + +nohup /usr/bin/gpredict /dev/null 2>&1 & From de00467829f464f688a25977bab0aab65acc57e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 22:00:10 -0400 Subject: [PATCH 1291/1744] Update install add gpredict.desktop copy --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index c2110176..0b5f72e8 100755 --- a/install +++ b/install @@ -344,6 +344,7 @@ sudo apt-get update && sudo apt-get dist-upgrade -y # fi cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop +cp /home/pi/CubeSatSim/groundstation/gpredict.desktop /home/pi/Desktop/gpredict.desktop if [ ! -d "/home/pi/venv" ]; then From 92a49408f8aed1ed71f55301dd7e0d2c2de4be09 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 21 Jul 2026 22:02:09 -0400 Subject: [PATCH 1292/1744] Update pacsat-run.sh add gui check --- groundstation/pacsat-run.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 37139874..2c71944f 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -15,6 +15,23 @@ sudo killall -9 direwolf &>/dev/null sudo killall -9 aplay &>/dev/null +if [ ! $(systemctl get-default | grep graphical) ]; then + + echo "Graphical User Interface not running!" + echo + echo "Do you want to reboot and switch to GUI so you can run the Pacsat Ground Station" + read answer + + if [ "$answer" = "y" ] || [ "$answer" = "yes" ]; then + echo "Rebooting!" + sudo raspi-config nonint do_boot_behaviour B4 + sudo reboot now + else + echo "You can run the Pacsat Ground Station next time you run the GUI." + exit + fi +fi + #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then From 65978555ae3a449ad66fca85202450a9cfe35986 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 00:19:18 -0400 Subject: [PATCH 1293/1744] Update config for rig frequency, show default rx --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index 5ae66550..b777293e 100755 --- a/config +++ b/config @@ -296,8 +296,9 @@ TXPL=${11} # echo " MHz" elif [ "${14}" = "rig" ] ; then echo "rigctld Doppler frequency shift enabled" - echo -n "Current TX and RX Frequency (Hz) is: " + echo -n "Current TX Frequency (Hz) is: " cat /home/pi/CubeSatSim/frequency.txt + printf "\b\b\b\b\b\b\b Current RX Frequency (Hz) is ${8} or set for a particular satellite" echo elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" From 369361ff6c8a1eba460f88f979a953d2d618d05e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 00:23:21 -0400 Subject: [PATCH 1294/1744] Update config remove last 11 chars of frequency.txt --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index b777293e..1a7164f8 100755 --- a/config +++ b/config @@ -297,8 +297,8 @@ TXPL=${11} elif [ "${14}" = "rig" ] ; then echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " - cat /home/pi/CubeSatSim/frequency.txt - printf "\b\b\b\b\b\b\b Current RX Frequency (Hz) is ${8} or set for a particular satellite" + head -c -11 frequency.txt + echo "Current RX Frequency (Hz) is: ${8} or set for a particular satellite" echo elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" From 9cba600bb6700c0cabe6f6e6dc5b3782c0a0b20d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 00:24:55 -0400 Subject: [PATCH 1295/1744] Update config with MHz --- config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config b/config index 1a7164f8..038d50b4 100755 --- a/config +++ b/config @@ -298,8 +298,7 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 frequency.txt - echo "Current RX Frequency (Hz) is: ${8} or set for a particular satellite" - echo + echo -n "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite\n\n" elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" echo -n "TX Frequency is approximately: " From 70c1f4e27de56cd6d82d2ad407ea4c600fbbedae Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 00:25:39 -0400 Subject: [PATCH 1296/1744] Update config echo -e --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 038d50b4..361d4f49 100755 --- a/config +++ b/config @@ -298,7 +298,7 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 frequency.txt - echo -n "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite\n\n" + echo -e "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite\n\n" elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" echo -n "TX Frequency is approximately: " From 0bc4a63918c974dcfa6a29ed64b9a06d06b21045 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 00:26:27 -0400 Subject: [PATCH 1297/1744] Update config extra newline --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 361d4f49..887570f8 100755 --- a/config +++ b/config @@ -298,7 +298,7 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 frequency.txt - echo -e "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite\n\n" + echo -e "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite\n" elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" echo -n "TX Frequency is approximately: " From 8fff887eec7bcef20c44cf0ddf3d611349c19cac Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 00:27:21 -0400 Subject: [PATCH 1298/1744] Update config remove extra newline --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 887570f8..14e7aeb6 100755 --- a/config +++ b/config @@ -298,7 +298,7 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 frequency.txt - echo -e "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite\n" + echo -e "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite" elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" echo -n "TX Frequency is approximately: " From 664f5a02f734a10635d408d93eb11edfd8aecae2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 00:50:16 -0400 Subject: [PATCH 1299/1744] Update install download Icons for desktop --- install | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install b/install index 0b5f72e8..4957dc4e 100755 --- a/install +++ b/install @@ -900,6 +900,15 @@ cd sed -i 's/quick_exec=0/quick_exec=1/' ~/.config/libfm/libfm.conf +if [ ! -d "/home/pi/Icons" ]; then + cd + mkdir Icons + cd Icons + #wget http://cubesatsim.org/icons/* + #wget -r -nd --no-parent -A 'bar.*.tar.gz' http://url/dir/ + wget -r -nd --no-parent -A '*' https://cubesatsim.org/icons/ +fi + sudo apt install -y raspberrypi-ui-mods sudo apt autoremove -y From 575c3aa3acc8ff726b121ded4e7e4e7e24bd0a7b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 11:10:59 -0400 Subject: [PATCH 1300/1744] Update transmit.py remove left over doppler table --- transmit.py | 246 +--------------------------------------------------- 1 file changed, 4 insertions(+), 242 deletions(-) diff --git a/transmit.py b/transmit.py index 6d20aadc..e371577a 100644 --- a/transmit.py +++ b/transmit.py @@ -322,243 +322,6 @@ def stop_repeater(): print("Finished resetting audio") # print("Ready to detect carrier") -iss_doppler_passes = { - 5: [ - {"time_sec": -180, "velocity_kms": -4.00, "doppler_434_khz": 5.79, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, - {"time_sec": -170, "velocity_kms": -3.89, "doppler_434_khz": 5.64, "obs_434_mhz": 434.9056, "doppler_144_khz": 1.88, "obs_144_mhz": 144.9019}, - {"time_sec": -160, "velocity_kms": -3.78, "doppler_434_khz": 5.48, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.83, "obs_144_mhz": 144.9018}, - {"time_sec": -150, "velocity_kms": -3.67, "doppler_434_khz": 5.32, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.77, "obs_144_mhz": 144.9018}, - {"time_sec": -140, "velocity_kms": -3.54, "doppler_434_khz": 5.14, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.71, "obs_144_mhz": 144.9017}, - {"time_sec": -130, "velocity_kms": -3.42, "doppler_434_khz": 4.96, "obs_434_mhz": 434.9050, "doppler_144_khz": 1.65, "obs_144_mhz": 144.9017}, - {"time_sec": -120, "velocity_kms": -3.28, "doppler_434_khz": 4.76, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.59, "obs_144_mhz": 144.9016}, - {"time_sec": -110, "velocity_kms": -3.14, "doppler_434_khz": 4.55, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.52, "obs_144_mhz": 144.9015}, - {"time_sec": -100, "velocity_kms": -2.99, "doppler_434_khz": 4.33, "obs_434_mhz": 434.9043, "doppler_144_khz": 1.44, "obs_144_mhz": 144.9014}, - {"time_sec": -90, "velocity_kms": -2.83, "doppler_434_khz": 4.10, "obs_434_mhz": 434.9041, "doppler_144_khz": 1.37, "obs_144_mhz": 144.9014}, - {"time_sec": -80, "velocity_kms": -2.66, "doppler_434_khz": 3.86, "obs_434_mhz": 434.9039, "doppler_144_khz": 1.29, "obs_144_mhz": 144.9013}, - {"time_sec": -70, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, - {"time_sec": -60, "velocity_kms": -2.29, "doppler_434_khz": 3.32, "obs_434_mhz": 434.9033, "doppler_144_khz": 1.11, "obs_144_mhz": 144.9011}, - {"time_sec": -50, "velocity_kms": -2.09, "doppler_434_khz": 3.03, "obs_434_mhz": 434.9030, "doppler_144_khz": 1.01, "obs_144_mhz": 144.9010}, - {"time_sec": -40, "velocity_kms": -1.87, "doppler_434_khz": 2.71, "obs_434_mhz": 434.9027, "doppler_144_khz": 0.90, "obs_144_mhz": 144.9009}, - {"time_sec": -30, "velocity_kms": -1.63, "doppler_434_khz": 2.37, "obs_434_mhz": 434.9024, "doppler_144_khz": 0.79, "obs_144_mhz": 144.9008}, - {"time_sec": -20, "velocity_kms": -1.33, "doppler_434_khz": 1.93, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, - {"time_sec": -10, "velocity_kms": -0.84, "doppler_434_khz": 1.22, "obs_434_mhz": 434.9012, "doppler_144_khz": 0.41, "obs_144_mhz": 144.9004}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 0.84, "doppler_434_khz": -1.22, "obs_434_mhz": 434.8988, "doppler_144_khz": -0.41, "obs_144_mhz": 144.8996}, - {"time_sec": 20, "velocity_kms": 1.33, "doppler_434_khz": -1.93, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, - {"time_sec": 30, "velocity_kms": 1.63, "doppler_434_khz": -2.37, "obs_434_mhz": 434.8976, "doppler_144_khz": -0.79, "obs_144_mhz": 144.8992}, - {"time_sec": 40, "velocity_kms": 1.87, "doppler_434_khz": -2.71, "obs_434_mhz": 434.8973, "doppler_144_khz": -0.90, "obs_144_mhz": 144.8991}, - {"time_sec": 50, "velocity_kms": 2.09, "doppler_434_khz": -3.03, "obs_434_mhz": 434.8970, "doppler_144_khz": -1.01, "obs_144_mhz": 144.8990}, - {"time_sec": 60, "velocity_kms": 2.29, "doppler_434_khz": -3.32, "obs_434_mhz": 434.8967, "doppler_144_khz": -1.11, "obs_144_mhz": 144.8989}, - {"time_sec": 70, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, - {"time_sec": 80, "velocity_kms": 2.66, "doppler_434_khz": -3.86, "obs_434_mhz": 434.8961, "doppler_144_khz": -1.29, "obs_144_mhz": 144.8987}, - {"time_sec": 90, "velocity_kms": 2.83, "doppler_434_khz": -4.10, "obs_434_mhz": 434.8959, "doppler_144_khz": -1.37, "obs_144_mhz": 144.8986}, - {"time_sec": 100, "velocity_kms": 2.99, "doppler_434_khz": -4.33, "obs_434_mhz": 434.8957, "doppler_144_khz": -1.44, "obs_144_mhz": 144.8986}, - {"time_sec": 110, "velocity_kms": 3.14, "doppler_434_khz": -4.55, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.52, "obs_144_mhz": 144.8985}, - {"time_sec": 120, "velocity_kms": 3.28, "doppler_434_khz": -4.76, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.59, "obs_144_mhz": 144.8984}, - {"time_sec": 130, "velocity_kms": 3.42, "doppler_434_khz": -4.96, "obs_434_mhz": 434.8950, "doppler_144_khz": -1.65, "obs_144_mhz": 144.8983}, - {"time_sec": 140, "velocity_kms": 3.54, "doppler_434_khz": -5.14, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.71, "obs_144_mhz": 144.8983}, - {"time_sec": 150, "velocity_kms": 3.67, "doppler_434_khz": -5.32, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.77, "obs_144_mhz": 144.8982}, - {"time_sec": 160, "velocity_kms": 3.78, "doppler_434_khz": -5.48, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.83, "obs_144_mhz": 144.8982}, - {"time_sec": 170, "velocity_kms": 3.89, "doppler_434_khz": -5.64, "obs_434_mhz": 434.8944, "doppler_144_khz": -1.88, "obs_144_mhz": 144.8981}, - {"time_sec": 180, "velocity_kms": 4.00, "doppler_434_khz": -5.79, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981} - ], - 20: [ - {"time_sec": -180, "velocity_kms": -5.81, "doppler_434_khz": 8.43, "obs_434_mhz": 434.9084, "doppler_144_khz": 2.81, "obs_144_mhz": 144.9028}, - {"time_sec": -170, "velocity_kms": -5.68, "doppler_434_khz": 8.24, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.75, "obs_144_mhz": 144.9027}, - {"time_sec": -160, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, - {"time_sec": -150, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, - {"time_sec": -140, "velocity_kms": -5.22, "doppler_434_khz": 7.57, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.52, "obs_144_mhz": 144.9025}, - {"time_sec": -130, "velocity_kms": -5.02, "doppler_434_khz": 7.28, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.43, "obs_144_mhz": 144.9024}, - {"time_sec": -120, "velocity_kms": -4.81, "doppler_434_khz": 6.98, "obs_434_mhz": 434.9070, "doppler_144_khz": 2.32, "obs_144_mhz": 144.9023}, - {"time_sec": -110, "velocity_kms": -4.57, "doppler_434_khz": 6.63, "obs_434_mhz": 434.9066, "doppler_144_khz": 2.21, "obs_144_mhz": 144.9022}, - {"time_sec": -100, "velocity_kms": -4.30, "doppler_434_khz": 6.24, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.08, "obs_144_mhz": 144.9021}, - {"time_sec": -90, "velocity_kms": -4.00, "doppler_434_khz": 5.80, "obs_434_mhz": 434.9058, "doppler_144_khz": 1.93, "obs_144_mhz": 144.9019}, - {"time_sec": -80, "velocity_kms": -3.68, "doppler_434_khz": 5.34, "obs_434_mhz": 434.9053, "doppler_144_khz": 1.78, "obs_144_mhz": 144.9018}, - {"time_sec": -70, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, - {"time_sec": -60, "velocity_kms": -2.92, "doppler_434_khz": 4.24, "obs_434_mhz": 434.9042, "doppler_144_khz": 1.41, "obs_144_mhz": 144.9014}, - {"time_sec": -50, "velocity_kms": -2.50, "doppler_434_khz": 3.63, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.21, "obs_144_mhz": 144.9012}, - {"time_sec": -40, "velocity_kms": -2.04, "doppler_434_khz": 2.96, "obs_434_mhz": 434.9030, "doppler_144_khz": 0.99, "obs_144_mhz": 144.9010}, - {"time_sec": -30, "velocity_kms": -1.56, "doppler_434_khz": 2.26, "obs_434_mhz": 434.9023, "doppler_144_khz": 0.75, "obs_144_mhz": 144.9008}, - {"time_sec": -20, "velocity_kms": -1.05, "doppler_434_khz": 1.52, "obs_434_mhz": 434.9015, "doppler_144_khz": 0.51, "obs_144_mhz": 144.9005}, - {"time_sec": -10, "velocity_kms": -0.53, "doppler_434_khz": 0.77, "obs_434_mhz": 434.9008, "doppler_144_khz": 0.26, "obs_144_mhz": 144.9003}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 0.53, "doppler_434_khz": -0.77, "obs_434_mhz": 434.8992, "doppler_144_khz": -0.26, "obs_144_mhz": 144.8997}, - {"time_sec": 20, "velocity_kms": 1.05, "doppler_434_khz": -1.52, "obs_434_mhz": 434.8985, "doppler_144_khz": -0.51, "obs_144_mhz": 144.8995}, - {"time_sec": 30, "velocity_kms": 1.56, "doppler_434_khz": -2.26, "obs_434_mhz": 434.8977, "doppler_144_khz": -0.75, "obs_144_mhz": 144.8992}, - {"time_sec": 40, "velocity_kms": 2.04, "doppler_434_khz": -2.96, "obs_434_mhz": 434.8970, "doppler_144_khz": -0.99, "obs_144_mhz": 144.8990}, - {"time_sec": 50, "velocity_kms": 2.50, "doppler_434_khz": -3.63, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.21, "obs_144_mhz": 144.8988}, - {"time_sec": 60, "velocity_kms": 2.92, "doppler_434_khz": -4.24, "obs_434_mhz": 434.8958, "doppler_144_khz": -1.41, "obs_144_mhz": 144.8986}, - {"time_sec": 70, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, - {"time_sec": 80, "velocity_kms": 3.68, "doppler_434_khz": -5.34, "obs_434_mhz": 434.8947, "doppler_144_khz": -1.78, "obs_144_mhz": 144.8982}, - {"time_sec": 90, "velocity_kms": 4.00, "doppler_434_khz": -5.80, "obs_434_mhz": 434.8942, "doppler_144_khz": -1.93, "obs_144_mhz": 144.8981}, - {"time_sec": 100, "velocity_kms": 4.30, "doppler_434_khz": -6.24, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.08, "obs_144_mhz": 144.8979}, - {"time_sec": 110, "velocity_kms": 4.57, "doppler_434_khz": -6.63, "obs_434_mhz": 434.8934, "doppler_144_khz": -2.21, "obs_144_mhz": 144.8978}, - {"time_sec": 120, "velocity_kms": 4.81, "doppler_434_khz": -6.98, "obs_434_mhz": 434.8930, "doppler_144_khz": -2.32, "obs_144_mhz": 144.8977}, - {"time_sec": 130, "velocity_kms": 5.02, "doppler_434_khz": -7.28, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.43, "obs_144_mhz": 144.8976}, - {"time_sec": 140, "velocity_kms": 5.22, "doppler_434_khz": -7.57, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.52, "obs_144_mhz": 144.8975}, - {"time_sec": 150, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, - {"time_sec": 160, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, - {"time_sec": 170, "velocity_kms": 5.68, "doppler_434_khz": -8.24, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.75, "obs_144_mhz": 144.8973}, - {"time_sec": 180, "velocity_kms": 5.81, "doppler_434_khz": -8.43, "obs_434_mhz": 434.8916, "doppler_144_khz": -2.81, "obs_144_mhz": 144.8972} - ], - 40: [ - {"time_sec": -180, "velocity_kms": -6.67, "doppler_434_khz": 9.68, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.22, "obs_144_mhz": 144.9032}, - {"time_sec": -170, "velocity_kms": -6.60, "doppler_434_khz": 9.57, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.19, "obs_144_mhz": 144.9032}, - {"time_sec": -160, "velocity_kms": -6.52, "doppler_434_khz": 9.46, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.15, "obs_144_mhz": 144.9032}, - {"time_sec": -150, "velocity_kms": -6.43, "doppler_434_khz": 9.33, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.11, "obs_144_mhz": 144.9031}, - {"time_sec": -140, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, - {"time_sec": -130, "velocity_kms": -6.19, "doppler_434_khz": 8.98, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.99, "obs_144_mhz": 144.9030}, - {"time_sec": -120, "velocity_kms": -6.04, "doppler_434_khz": 8.76, "obs_434_mhz": 434.9088, "doppler_144_khz": 2.92, "obs_144_mhz": 144.9029}, - {"time_sec": -110, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, - {"time_sec": -100, "velocity_kms": -5.65, "doppler_434_khz": 8.20, "obs_434_mhz": 434.9082, "doppler_144_khz": 2.73, "obs_144_mhz": 144.9027}, - {"time_sec": -90, "velocity_kms": -5.39, "doppler_434_khz": 7.82, "obs_434_mhz": 434.9078, "doppler_144_khz": 2.61, "obs_144_mhz": 144.9026}, - {"time_sec": -80, "velocity_kms": -5.08, "doppler_434_khz": 7.37, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.46, "obs_144_mhz": 144.9025}, - {"time_sec": -70, "velocity_kms": -4.72, "doppler_434_khz": 6.85, "obs_434_mhz": 434.9068, "doppler_144_khz": 2.28, "obs_144_mhz": 144.9023}, - {"time_sec": -60, "velocity_kms": -4.28, "doppler_434_khz": 6.21, "obs_434_mhz": 434.9062, "doppler_144_khz": 2.07, "obs_144_mhz": 144.9021}, - {"time_sec": -50, "velocity_kms": -3.77, "doppler_434_khz": 5.47, "obs_434_mhz": 434.9055, "doppler_144_khz": 1.82, "obs_144_mhz": 144.8993}, # manual note context adjustments active - {"time_sec": -40, "velocity_kms": -3.17, "doppler_434_khz": 4.60, "obs_434_mhz": 434.9046, "doppler_144_khz": 1.53, "obs_144_mhz": 144.9015}, - {"time_sec": -30, "velocity_kms": -2.48, "doppler_434_khz": 3.60, "obs_434_mhz": 434.9036, "doppler_144_khz": 1.20, "obs_144_mhz": 144.9012}, - {"time_sec": -20, "velocity_kms": -1.70, "doppler_434_khz": 2.47, "obs_434_mhz": 434.9025, "doppler_144_khz": 0.82, "obs_144_mhz": 144.9008}, - {"time_sec": -10, "velocity_kms": -0.87, "doppler_434_khz": 1.26, "obs_434_mhz": 434.9013, "doppler_144_khz": 0.42, "obs_144_mhz": 144.9004}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 0.87, "doppler_434_khz": -1.26, "obs_434_mhz": 434.8987, "doppler_144_khz": -0.42, "obs_144_mhz": 144.8996}, - {"time_sec": 20, "velocity_kms": 1.70, "doppler_434_khz": -2.47, "obs_434_mhz": 434.8975, "doppler_144_khz": -0.82, "obs_144_mhz": 144.8992}, - {"time_sec": 30, "velocity_kms": 2.48, "doppler_434_khz": -3.60, "obs_434_mhz": 434.8964, "doppler_144_khz": -1.20, "obs_144_mhz": 144.8988}, - {"time_sec": 40, "velocity_kms": 3.17, "doppler_434_khz": -4.60, "obs_434_mhz": 434.8954, "doppler_144_khz": -1.53, "obs_144_mhz": 144.8985}, - {"time_sec": 50, "velocity_kms": 3.77, "doppler_434_khz": -5.47, "obs_434_mhz": 434.8945, "doppler_144_khz": -1.82, "obs_144_mhz": 144.8982}, - {"time_sec": 60, "velocity_kms": 4.28, "doppler_434_khz": -6.21, "obs_434_mhz": 434.8938, "doppler_144_khz": -2.07, "obs_144_mhz": 144.8979}, - {"time_sec": 70, "velocity_kms": 4.72, "doppler_434_khz": -6.85, "obs_434_mhz": 434.8932, "doppler_144_khz": -2.28, "obs_144_mhz": 144.8977}, - {"time_sec": 80, "velocity_kms": 5.08, "doppler_434_khz": -7.37, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.46, "obs_144_mhz": 144.8975}, - {"time_sec": 90, "velocity_kms": 5.39, "doppler_434_khz": -7.82, "obs_434_mhz": 434.8922, "doppler_144_khz": -2.61, "obs_144_mhz": 144.8974}, - {"time_sec": 100, "velocity_kms": 0.87, "doppler_434_khz": -8.19, "obs_434_mhz": 434.8918, "doppler_144_khz": -2.73, "obs_144_mhz": 144.8973}, - {"time_sec": 110, "velocity_kms": 1.70, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, - {"time_sec": 120, "velocity_kms": 2.48, "doppler_434_khz": -8.76, "obs_434_mhz": 434.8912, "doppler_144_khz": -2.92, "obs_144_mhz": 144.8971}, - {"time_sec": 130, "velocity_kms": 3.17, "doppler_434_khz": -8.98, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.99, "obs_144_mhz": 144.8970}, - {"time_sec": 140, "velocity_kms": 3.77, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, - {"time_sec": 150, "velocity_kms": 4.28, "doppler_434_khz": -9.33, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.11, "obs_144_mhz": 144.8969}, - {"time_sec": 160, "velocity_kms": 4.72, "doppler_434_khz": -9.46, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.15, "obs_144_mhz": 144.8968}, - {"time_sec": 170, "velocity_kms": 5.08, "doppler_434_khz": -9.58, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.19, "obs_144_mhz": 144.8968}, - {"time_sec": 180, "velocity_kms": 5.39, "doppler_434_khz": -9.68, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.22, "obs_144_mhz": 144.8968} - ], - 70: [ - {"time_sec": -180, "velocity_kms": -7.00, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, - {"time_sec": -170, "velocity_kms": -6.95, "doppler_434_khz": 10.09, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.36, "obs_144_mhz": 144.9034}, - {"time_sec": -160, "velocity_kms": -6.91, "doppler_434_khz": 10.02, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.34, "obs_144_mhz": 144.9033}, - {"time_sec": -150, "velocity_kms": -6.86, "doppler_434_khz": 9.95, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.32, "obs_144_mhz": 144.9033}, - {"time_sec": -140, "velocity_kms": -6.78, "doppler_434_khz": 9.84, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.28, "obs_144_mhz": 144.9033}, - {"time_sec": -130, "velocity_kms": -6.70, "doppler_434_khz": 9.72, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, - {"time_sec": -120, "velocity_kms": -6.62, "doppler_434_khz": 9.60, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, - {"time_sec": -110, "velocity_kms": -6.47, "doppler_434_khz": 9.39, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.13, "obs_144_mhz": 144.9031}, - {"time_sec": -100, "velocity_kms": -6.32, "doppler_434_khz": 9.17, "obs_434_mhz": 434.9092, "doppler_144_khz": 3.05, "obs_144_mhz": 144.9031}, - {"time_sec": -90, "velocity_kms": -6.17, "doppler_434_khz": 8.95, "obs_434_mhz": 434.9090, "doppler_144_khz": 2.98, "obs_144_mhz": 144.9030}, - {"time_sec": -80, "velocity_kms": -5.86, "doppler_434_khz": 8.50, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.83, "obs_144_mhz": 144.9028}, - {"time_sec": -70, "velocity_kms": -5.55, "doppler_434_khz": 8.05, "obs_434_mhz": 434.9081, "doppler_144_khz": 2.68, "obs_144_mhz": 144.9027}, - {"time_sec": -60, "velocity_kms": -5.24, "doppler_434_khz": 7.60, "obs_434_mhz": 434.9076, "doppler_144_khz": 2.53, "obs_144_mhz": 144.9025}, - {"time_sec": -50, "velocity_kms": -4.60, "doppler_434_khz": 6.67, "obs_434_mhz": 434.9067, "doppler_144_khz": 2.22, "obs_144_mhz": 144.9022}, - {"time_sec": -40, "velocity_kms": -3.96, "doppler_434_khz": 5.74, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.91, "obs_144_mhz": 144.9019}, - {"time_sec": -30, "velocity_kms": -3.32, "doppler_434_khz": 4.82, "obs_434_mhz": 434.9048, "doppler_144_khz": 1.60, "obs_144_mhz": 144.9016}, - {"time_sec": -20, "velocity_kms": -2.21, "doppler_434_khz": 3.21, "obs_434_mhz": 434.9032, "doppler_144_khz": 1.07, "obs_144_mhz": 144.9011}, - {"time_sec": -10, "velocity_kms": -1.11, "doppler_434_khz": 1.61, "obs_434_mhz": 434.9016, "doppler_144_khz": 0.53, "obs_144_mhz": 144.9005}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 1.11, "doppler_434_khz": -1.61, "obs_434_mhz": 434.8984, "doppler_144_khz": -0.53, "obs_144_mhz": 144.8995}, - {"time_sec": 20, "velocity_kms": 2.21, "doppler_434_khz": -3.21, "obs_434_mhz": 434.8968, "doppler_144_khz": -1.07, "obs_144_mhz": 144.8989}, - {"time_sec": 30, "velocity_kms": 3.32, "doppler_434_khz": -4.82, "obs_434_mhz": 434.8952, "doppler_144_khz": -1.60, "obs_144_mhz": 144.8984}, - {"time_sec": 40, "velocity_kms": 3.96, "doppler_434_khz": -5.74, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.91, "obs_144_mhz": 144.8981}, - {"time_sec": 50, "velocity_kms": 4.60, "doppler_434_khz": -6.67, "obs_434_mhz": 434.8933, "doppler_144_khz": -2.22, "obs_144_mhz": 144.8978}, - {"time_sec": 60, "velocity_kms": 5.24, "doppler_434_khz": -7.60, "obs_434_mhz": 434.8924, "doppler_144_khz": -2.53, "obs_144_mhz": 144.8975}, - {"time_sec": 70, "velocity_kms": 5.55, "doppler_434_khz": -8.05, "obs_434_mhz": 434.8919, "doppler_144_khz": -2.68, "obs_144_mhz": 144.8973}, - {"time_sec": 80, "velocity_kms": 5.86, "doppler_434_khz": -8.50, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.83, "obs_144_mhz": 144.8972}, - {"time_sec": 90, "velocity_kms": 6.17, "doppler_434_khz": -8.95, "obs_434_mhz": 434.8910, "doppler_144_khz": -2.98, "obs_144_mhz": 144.8970}, - {"time_sec": 100, "velocity_kms": 6.32, "doppler_434_khz": -9.17, "obs_434_mhz": 434.8908, "doppler_144_khz": -3.05, "obs_144_mhz": 144.8969}, - {"time_sec": 110, "velocity_kms": 6.47, "doppler_434_khz": -9.39, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.13, "obs_144_mhz": 144.8969}, - {"time_sec": 120, "velocity_kms": 6.62, "doppler_434_khz": -9.60, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, - {"time_sec": 130, "velocity_kms": 6.70, "doppler_434_khz": -9.72, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, - {"time_sec": 140, "velocity_kms": 6.78, "doppler_434_khz": -9.84, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.28, "obs_144_mhz": 144.8967}, - {"time_sec": 150, "velocity_kms": 6.86, "doppler_434_khz": -9.95, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.32, "obs_144_mhz": 144.8967}, - {"time_sec": 160, "velocity_kms": 6.91, "doppler_434_khz": -10.02, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.34, "obs_144_mhz": 144.8967}, - {"time_sec": 170, "velocity_kms": 6.95, "doppler_434_khz": -10.09, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.36, "obs_144_mhz": 144.8966}, - {"time_sec": 180, "velocity_kms": 7.00, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966} - ], - 85: [ - {"time_sec": -180, "velocity_kms": -7.15, "doppler_434_khz": 10.37, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.46, "obs_144_mhz": 144.9035}, - {"time_sec": -170, "velocity_kms": -7.12, "doppler_434_khz": 10.32, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.44, "obs_144_mhz": 144.9034}, - {"time_sec": -160, "velocity_kms": -7.08, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.42, "obs_144_mhz": 144.9034}, - {"time_sec": -150, "velocity_kms": -7.05, "doppler_434_khz": 10.23, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.41, "obs_144_mhz": 144.9034}, - {"time_sec": -140, "velocity_kms": -6.99, "doppler_434_khz": 10.15, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.38, "obs_144_mhz": 144.9034}, - {"time_sec": -130, "velocity_kms": -6.94, "doppler_434_khz": 10.06, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.35, "obs_144_mhz": 144.9034}, - {"time_sec": -120, "velocity_kms": -6.88, "doppler_434_khz": 9.98, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, - {"time_sec": -110, "velocity_kms": -6.75, "doppler_434_khz": 9.80, "obs_434_mhz": 434.9098, "doppler_144_khz": 3.26, "obs_144_mhz": 144.9033}, - {"time_sec": -100, "velocity_kms": -6.63, "doppler_434_khz": 9.61, "obs_434_mhz": 434.9096, "doppler_144_khz": 3.20, "obs_144_mhz": 144.9032}, - {"time_sec": -90, "velocity_kms": -6.50, "doppler_434_khz": 9.43, "obs_434_mhz": 434.9094, "doppler_144_khz": 3.14, "obs_144_mhz": 144.9031}, - {"time_sec": -80, "velocity_kms": -6.23, "doppler_434_khz": 9.04, "obs_434_mhz": 434.9090, "doppler_144_khz": 3.01, "obs_144_mhz": 144.9030}, - {"time_sec": -70, "velocity_kms": -5.97, "doppler_434_khz": 8.66, "obs_434_mhz": 434.9087, "doppler_144_khz": 2.88, "obs_144_mhz": 144.9029}, - {"time_sec": -60, "velocity_kms": -5.70, "doppler_434_khz": 8.27, "obs_434_mhz": 434.9083, "doppler_144_khz": 2.76, "obs_144_mhz": 144.9028}, - {"time_sec": -50, "velocity_kms": -5.10, "doppler_434_khz": 7.40, "obs_434_mhz": 434.9074, "doppler_144_khz": 2.47, "obs_144_mhz": 144.9025}, - {"time_sec": -40, "velocity_kms": -4.50, "doppler_434_khz": 6.53, "obs_434_mhz": 434.9065, "doppler_144_khz": 2.18, "obs_144_mhz": 144.9022}, - {"time_sec": -30, "velocity_kms": -3.90, "doppler_434_khz": 5.66, "obs_434_mhz": 434.9057, "doppler_144_khz": 1.89, "obs_144_mhz": 144.9019}, - {"time_sec": -20 ,"velocity_kms": -2.60, "doppler_434_khz": 3.77, "obs_434_mhz": 434.9038, "doppler_144_khz": 1.26, "obs_144_mhz": 144.9013}, - {"time_sec": -10 ,"velocity_kms": -1.30, "doppler_434_khz": 1.89, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.63, "obs_144_mhz": 144.9006}, - {"time_sec": 0 ,"velocity_kms": 0.00, "doppler_434_khz": -0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": -0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10 ,"velocity_kms": 1.30, "doppler_434_khz": -1.89, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.63, "obs_144_mhz": 144.8994}, - {"time_sec": 20 ,"velocity_kms": 2.60, "doppler_434_khz": -3.77, "obs_434_mhz": 434.8962, "doppler_144_khz": -1.26, "obs_144_mhz": 144.8987}, - {"time_sec": 30 ,"velocity_kms": 3.90, "doppler_434_khz": -5.66, "obs_434_mhz": 434.8943, "doppler_144_khz": -1.89, "obs_144_mhz": 144.8981}, - {"time_sec": 40 ,"velocity_kms": 4.50, "doppler_434_khz": -6.53, "obs_434_mhz": 434.8935, "doppler_144_khz": -2.18, "obs_144_mhz": 144.8978}, - {"time_sec": 50 ,"velocity_kms": 5.10, "doppler_434_khz": -7.40, "obs_434_mhz": 434.8926, "doppler_144_khz": -2.47, "obs_144_mhz": 144.8975}, - {"time_sec": 60 ,"velocity_kms": 5.70, "doppler_434_khz": -8.27, "obs_434_mhz": 434.8917, "doppler_144_khz": -2.76, "obs_144_mhz": 144.8972}, - {"time_sec": 70 ,"velocity_kms": 5.97, "doppler_434_khz": -8.66, "obs_434_mhz": 434.8913, "doppler_144_khz": -2.88, "obs_144_mhz": 144.8971}, - {"time_sec": 80 ,"velocity_kms": 6.23, "doppler_434_khz": -9.04, "obs_434_mhz": 434.8910, "doppler_144_khz": -3.01, "obs_144_mhz": 144.8970}, - {"time_sec": 90 ,"velocity_kms": 6.50, "doppler_434_khz": -9.43, "obs_434_mhz": 434.8906, "doppler_144_khz": -3.14, "obs_144_mhz": 144.8969}, - {"time_sec": 100 ,"velocity_kms": 6.63, "doppler_434_khz": -9.61, "obs_434_mhz": 434.8904, "doppler_144_khz": -3.20, "obs_144_mhz": 144.8968}, - {"time_sec": 110 ,"velocity_kms": 6.75, "doppler_434_khz": -9.80, "obs_434_mhz": 434.8902, "doppler_144_khz": -3.26, "obs_144_mhz": 144.8967}, - {"time_sec": 120 ,"velocity_kms": 6.88, "doppler_434_khz": -9.98, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, - {"time_sec": 130 ,"velocity_kms": 6.94, "doppler_434_khz": -10.06, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.35, "obs_144_mhz": 144.8966}, - {"time_sec": 140 ,"velocity_kms": 6.99, "doppler_434_khz": -10.15, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.38, "obs_144_mhz": 144.8966}, - {"time_sec": 150 ,"velocity_kms": 7.05, "doppler_434_khz": -10.23, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.41, "obs_144_mhz": 144.8966}, - {"time_sec": 160 ,"velocity_kms": 7.08, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8917, "doppler_144_khz": -3.42, "obs_144_mhz": 144.8966}, - {"time_sec": 170 ,"velocity_kms": 7.12, "doppler_434_khz": -10.32, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.44, "obs_144_mhz": 144.8966}, - {"time_sec": 180 ,"velocity_kms": 7.15, "doppler_434_khz": -10.37, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.46, "obs_144_mhz": 144.8965} - ], - 89: [ - {"time_sec": -180, "velocity_kms": -7.17, "doppler_434_khz": 10.40, "obs_434_mhz": 434.9104, "doppler_144_khz": 3.47, "obs_144_mhz": 144.9035}, - {"time_sec": -170, "velocity_kms": -7.13, "doppler_434_khz": 10.35, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.45, "obs_144_mhz": 144.9034}, - {"time_sec": -160, "velocity_kms": -7.09, "doppler_434_khz": 10.28, "obs_434_mhz": 434.9103, "doppler_144_khz": 3.43, "obs_144_mhz": 144.9034}, - {"time_sec": -150, "velocity_kms": -7.04, "doppler_434_khz": 10.21, "obs_434_mhz": 434.9102, "doppler_144_khz": 3.40, "obs_144_mhz": 144.9034}, - {"time_sec": -140, "velocity_kms": -6.97, "doppler_434_khz": 10.12, "obs_434_mhz": 434.9101, "doppler_144_khz": 3.37, "obs_144_mhz": 144.9034}, - {"time_sec": -130, "velocity_kms": -6.90, "doppler_434_khz": 10.01, "obs_434_mhz": 434.9100, "doppler_144_khz": 3.33, "obs_144_mhz": 144.9033}, - {"time_sec": -120, "velocity_kms": -6.81, "doppler_434_khz": 9.87, "obs_434_mhz": 434.9099, "doppler_144_khz": 3.29, "obs_144_mhz": 144.9033}, - {"time_sec": -110, "velocity_kms": -6.69, "doppler_434_khz": 9.71, "obs_434_mhz": 434.9097, "doppler_144_khz": 3.24, "obs_144_mhz": 144.9032}, - {"time_sec": -100, "velocity_kms": -6.55, "doppler_434_khz": 9.51, "obs_434_mhz": 434.9095, "doppler_144_khz": 3.17, "obs_144_mhz": 144.9032}, - {"time_sec": -90, "velocity_kms": -6.38, "doppler_434_khz": 9.25, "obs_434_mhz": 434.9093, "doppler_144_khz": 3.08, "obs_144_mhz": 144.9031}, - {"time_sec": -80, "velocity_kms": -6.15, "doppler_434_khz": 8.93, "obs_434_mhz": 434.9089, "doppler_144_khz": 2.97, "obs_144_mhz": 144.9030}, - {"time_sec": -70, "velocity_kms": -5.87, "doppler_434_khz": 8.51, "obs_434_mhz": 434.9085, "doppler_144_khz": 2.84, "obs_144_mhz": 144.9028}, - {"time_sec": -60, "velocity_kms": -5.49, "doppler_434_khz": 7.97, "obs_434_mhz": 434.9080, "doppler_144_khz": 2.66, "obs_144_mhz": 144.9027}, - {"time_sec": -50, "velocity_kms": -5.01, "doppler_434_khz": 7.26, "obs_434_mhz": 434.9073, "doppler_144_khz": 2.42, "obs_144_mhz": 144.9024}, - {"time_sec": -40, "velocity_kms": -4.37, "doppler_434_khz": 6.34, "obs_434_mhz": 434.9063, "doppler_144_khz": 2.11, "obs_144_mhz": 144.9021}, - {"time_sec": -30, "velocity_kms": -3.55, "doppler_434_khz": 5.15, "obs_434_mhz": 434.9051, "doppler_144_khz": 1.72, "obs_144_mhz": 144.9017}, - {"time_sec": -20, "velocity_kms": -2.53, "doppler_434_khz": 3.67, "obs_434_mhz": 434.9037, "doppler_144_khz": 1.22, "obs_144_mhz": 144.9012}, - {"time_sec": -10, "velocity_kms": -1.32, "doppler_434_khz": 1.92, "obs_434_mhz": 434.9019, "doppler_144_khz": 0.64, "obs_144_mhz": 144.9006}, - {"time_sec": 0, "velocity_kms": 0.00, "doppler_434_khz": 0.00, "obs_434_mhz": 434.9000, "doppler_144_khz": 0.00, "obs_144_mhz": 144.9000}, - {"time_sec": 10, "velocity_kms": 1.32, "doppler_434_khz": -1.92, "obs_434_mhz": 434.8981, "doppler_144_khz": -0.64, "obs_144_mhz": 144.8994}, - {"time_sec": 20, "velocity_kms": 2.53, "doppler_434_khz": -3.67, "obs_434_mhz": 434.8963, "doppler_144_khz": -1.22, "obs_144_mhz": 144.8988}, - {"time_sec": 30, "velocity_kms": 3.55, "doppler_434_khz": -5.15, "obs_434_mhz": 434.8949, "doppler_144_khz": -1.72, "obs_144_mhz": 144.8983}, - {"time_sec": 40, "velocity_kms": 4.37, "doppler_434_khz": -6.34, "obs_434_mhz": 434.8937, "doppler_144_khz": -2.11, "obs_144_mhz": 144.8979}, - {"time_sec": 50, "velocity_kms": 5.01, "doppler_434_khz": -7.26, "obs_434_mhz": 434.8927, "doppler_144_khz": -2.42, "obs_144_mhz": 144.8976}, - {"time_sec": 60, "velocity_kms": 5.49, "doppler_434_khz": -7.97, "obs_434_mhz": 434.8920, "doppler_144_khz": -2.66, "obs_144_mhz": 144.8973}, - {"time_sec": 70, "velocity_kms": 5.87, "doppler_434_khz": -8.51, "obs_434_mhz": 434.8915, "doppler_144_khz": -2.84, "obs_144_mhz": 144.8972}, - {"time_sec": 80, "velocity_kms": 6.15, "doppler_434_khz": -8.93, "obs_434_mhz": 434.8911, "doppler_144_khz": -2.97, "obs_144_mhz": 144.8970}, - {"time_sec": 90, "velocity_kms": 6.38, "doppler_434_khz": -9.25, "obs_434_mhz": 434.8907, "doppler_144_khz": -3.08, "obs_144_mhz": 144.8969}, - {"time_sec": 100, "velocity_kms": 6.55, "doppler_434_khz": -9.51, "obs_434_mhz": 434.8905, "doppler_144_khz": -3.17, "obs_144_mhz": 144.8968}, - {"time_sec": 110, "velocity_kms": 6.69, "doppler_434_khz": -9.71, "obs_434_mhz": 434.8903, "doppler_144_khz": -3.24, "obs_144_mhz": 144.8968}, - {"time_sec": 120, "velocity_kms": 6.81, "doppler_434_khz": -9.87, "obs_434_mhz": 434.8901, "doppler_144_khz": -3.29, "obs_144_mhz": 144.8967}, - {"time_sec": 130, "velocity_kms": 6.90, "doppler_434_khz": -10.01, "obs_434_mhz": 434.8900, "doppler_144_khz": -3.33, "obs_144_mhz": 144.8967}, - {"time_sec": 140, "velocity_kms": 6.97, "doppler_434_khz": -10.12, "obs_434_mhz": 434.8899, "doppler_144_khz": -3.37, "obs_144_mhz": 144.8966}, - {"time_sec": 150, "velocity_kms": 7.04, "doppler_434_khz": -10.21, "obs_434_mhz": 434.8898, "doppler_144_khz": -3.40, "obs_144_mhz": 144.8966}, - {"time_sec": 160, "velocity_kms": 7.09, "doppler_434_khz": -10.28, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.43, "obs_144_mhz": 144.8966}, - {"time_sec": 170, "velocity_kms": 7.13, "doppler_434_khz": -10.35, "obs_434_mhz": 434.8897, "doppler_144_khz": -3.45, "obs_144_mhz": 144.8966}, - {"time_sec": 180, "velocity_kms": 7.17, "doppler_434_khz": -10.40, "obs_434_mhz": 434.8896, "doppler_144_khz": -3.47, "obs_144_mhz": 144.8965} - ] -} - def update_doppler(fm="yes"): try: @@ -568,7 +331,6 @@ def update_doppler(fm="yes"): global rxpl_value global txpl_value global sq - global doppler_table global mode global tx global rxf @@ -741,7 +503,7 @@ def cw_transmit_char(character): duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: duration = 1.2 - print(duration) +# print(duration) while (duration != 0): transmit_carrier(duration * morse_timing) sleep(morse_timing * 0.4) # 6) @@ -1081,10 +843,10 @@ if __name__ == "__main__": rx_doppler_shift_hz = 0 print(f"Rx center frequency: {rx_doppler_start_hz}") - TARGET_PASS = 85 # Maximum elevation profile +# TARGET_PASS = 85 # Maximum elevation profile - doppler_table = iss_doppler_passes[TARGET_PASS] - print(f"Pass Max Elevation: {TARGET_PASS}°") +# doppler_table = iss_doppler_passes[TARGET_PASS] +# print(f"Pass Max Elevation: {TARGET_PASS}°") print("MODE: ") print(mode) From fa87607d3ec66b370622e61d66aed684195d9476 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 11:16:48 -0400 Subject: [PATCH 1301/1744] Update transmit.py in sim mode, shift rx frequency too --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index e371577a..d2269332 100644 --- a/transmit.py +++ b/transmit.py @@ -383,7 +383,7 @@ def update_doppler(fm="yes"): print(f"Rx Frequency: {new_rx_frequency:.0f}") else: new_tx_frequency = tx_frequency - new_rx_frequency = tx_frequency + new_rx_frequency = rx_frequency print(f"Tx Frequency: {new_tx_frequency:.0f}") print(f"Rx Frequency: {new_rx_frequency:.0f}") From be70f211fca8076af66055f2b61120875f459ffa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 11:27:37 -0400 Subject: [PATCH 1302/1744] Update config -F print correct frequency --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 14e7aeb6..7b69b013 100755 --- a/config +++ b/config @@ -1225,8 +1225,8 @@ elif [ "$1" = "-F" ]; then 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 - rxf=$(echo "$8 * 1000000" | bc) - txf=$(echo "$7 * 1000000" | bc) + rxf=$(echo "$rx * 1000000" | bc) + txf=$(echo "$tx * 1000000" | bc) echo $txf $rxf echo $txf $rxf > /home/pi/CubeSatSim/frequency.txt From 2613f2902dbd309d242794b9c751d250bc9e9bd4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 11:40:08 -0400 Subject: [PATCH 1303/1744] Update transmit.py repeater mode, only shift by 290 if in 70cm --- transmit.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index d2269332..e79a6e37 100644 --- a/transmit.py +++ b/transmit.py @@ -715,7 +715,12 @@ if __name__ == "__main__": txf = float(config[6]) tx = "{:.4f}".format(txf) if (mode == 'e'): - txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + if (txf > 420.0) and (txf < 450.0): + txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + elif (txf > 144.0) and (txf < 148.0): + txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + else: + txf = 144.9 txr = "{:.4f}".format(txrf) print("Transmit frequency: ",txr) else: From d0cf959932500ff8efb25cd8f9e1fa7a109566e9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 11:44:06 -0400 Subject: [PATCH 1304/1744] Update transmit.py print repeater tx calculation --- transmit.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index e79a6e37..ef0c00c4 100644 --- a/transmit.py +++ b/transmit.py @@ -717,8 +717,10 @@ if __name__ == "__main__": if (mode == 'e'): if (txf > 420.0) and (txf < 450.0): txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + print("Repeater mode subtracting 290 MHz from TX Frequency") elif (txf > 144.0) and (txf < 148.0): - txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + txrf = txf # Cross Band Repeater mode transmit frequency is already in 2m band + print("Repeater mode using 2m TX Frequency") else: txf = 144.9 txr = "{:.4f}".format(txrf) From c7f117d87390bccb72880760b4d0d4c4564c5e85 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 12:28:58 -0400 Subject: [PATCH 1305/1744] Update frequency.py remove repeater frequency changes --- frequency.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/frequency.py b/frequency.py index ea08b0e2..d05b2e82 100644 --- a/frequency.py +++ b/frequency.py @@ -730,12 +730,13 @@ try: if len(config) > 6: txf = float(config[6]) tx = "{:.4f}".format(txf) - if (mode == 'e'): - txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band - txr = "{:.4f}".format(txrf) - print("Transmit frequency: ",txr) - else: - print("Transmit frequency: ",tx) +# if (mode == 'e'): +# txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band +# txr = "{:.4f}".format(txrf) +# print("Transmit frequency: ",txr) +# else: +# print("Transmit frequency: ",tx) + print("Transmit frequency: ",tx) if len(config) > 7: rxf = float(config[7]) rx = "{:.4f}".format(rxf) @@ -797,10 +798,11 @@ if (doppler_mode == 'off'): if (doppler_mode == 'sim'): print("Sim mode") - if (mode == 'e'): - tx_doppler_start_hz = txrf * 1e6 - else: - tx_doppler_start_hz = txf * 1e6 +# if (mode == 'e'): +# tx_doppler_start_hz = txrf * 1e6 +# else: +# tx_doppler_start_hz = txf * 1e6 + tx_doppler_start_hz = txf * 1e6 tx_doppler_shift_hz = 0 print(f"Tx center frequency: {tx_doppler_start_hz}") rx_doppler_start_hz = rxf * 1e6 From da949a287e51428a15c977cff70017fc3dd41d0a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 12:41:36 -0400 Subject: [PATCH 1306/1744] Update transmit.py check for tx freq 3rd harmonic rx --- transmit.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/transmit.py b/transmit.py index ef0c00c4..7bba93b5 100644 --- a/transmit.py +++ b/transmit.py @@ -714,6 +714,7 @@ if __name__ == "__main__": if len(config) > 6: txf = float(config[6]) tx = "{:.4f}".format(txf) + txrf = 0 if (mode == 'e'): if (txf > 420.0) and (txf < 450.0): txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band @@ -731,6 +732,16 @@ if __name__ == "__main__": rxf = float(config[7]) rx = "{:.4f}".format(rxf) print(rx) + if abs(rxf - 3 * txrf) < 10.0: + txrf = txrf + 0.02 + txr = "{:.4f}".format(txrf) + print("Adjusting Repeater TX frequency to avoid 3rd harmonic RX") + print("Transmit frequency: ",txr) + if abs(rxf - 3 * txf) < 10.0: + txf = txf + 0.02 + tx = "{:.4f}".format(txf) + print("Adjusting TX frequency to avoid 3rd harmonic RX") + print("Transmit frequency: ",tx) if len(config) > 8: if config[8] == 'y' or config[8] == 'yes': hab_mode = True From d47a1a6b7eb49178c864f6b9208a1a92521c8ae5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 12:56:37 -0400 Subject: [PATCH 1307/1744] Update transmit.py 3rd harmonic test in start_repeater --- transmit.py | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/transmit.py b/transmit.py index 7bba93b5..1f2fa830 100644 --- a/transmit.py +++ b/transmit.py @@ -298,11 +298,16 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): print(f"An error occurred: {e}") print("program_fm failed") -def start_repeater(tx_doppler_freq_hz): +def start_repeater(tx_freq_hz, rx_freq_hz): global txLed print("Starting repeater") + + if abs(rx_freq_hz - 3 * tx_freq_hz) < 10.0: + tx_freq_hz = tx_freq_hz + 30000 + print("Adjusting Repeater TX frequency to avoid 3rd harmonic RX") + output(txLed, 1) - txr = "{:.3f}".format(tx_doppler_freq_hz/1e3) + txr = "{:.3f}".format(tx_freq_hz/1e3) print(txr) system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") sleep(0.5) @@ -732,16 +737,6 @@ if __name__ == "__main__": rxf = float(config[7]) rx = "{:.4f}".format(rxf) print(rx) - if abs(rxf - 3 * txrf) < 10.0: - txrf = txrf + 0.02 - txr = "{:.4f}".format(txrf) - print("Adjusting Repeater TX frequency to avoid 3rd harmonic RX") - print("Transmit frequency: ",txr) - if abs(rxf - 3 * txf) < 10.0: - txf = txf + 0.02 - tx = "{:.4f}".format(txf) - print("Adjusting TX frequency to avoid 3rd harmonic RX") - print("Transmit frequency: ",tx) if len(config) > 8: if config[8] == 'y' or config[8] == 'yes': hab_mode = True @@ -1380,9 +1375,9 @@ if __name__ == "__main__": print("Carrier detected") if (doppler_mode): update_doppler() - start_repeater(tx_doppler_freq_hz) + start_repeater(tx_doppler_freq_hz, tx_doppler_freq_hz) else: - start_repeater(txrf * 1e6) + start_repeater(txrf * 1e6, rxf * 1e6) while (input(squelch) == False): sleep(1) print("No carrier detected") From 8a8a0dd4bff3219f56268b4fbc676bc154d9347e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 12:59:20 -0400 Subject: [PATCH 1308/1744] Update transmit.py 3rd harmonic within 10kHz --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 1f2fa830..c7d79f8b 100644 --- a/transmit.py +++ b/transmit.py @@ -302,7 +302,7 @@ def start_repeater(tx_freq_hz, rx_freq_hz): global txLed print("Starting repeater") - if abs(rx_freq_hz - 3 * tx_freq_hz) < 10.0: + if abs(rx_freq_hz - 3 * tx_freq_hz) < 10000: tx_freq_hz = tx_freq_hz + 30000 print("Adjusting Repeater TX frequency to avoid 3rd harmonic RX") From 502db4260d50cd4c68dba654c60df416f1031387 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 13:02:42 -0400 Subject: [PATCH 1309/1744] Update transmit.py fix rx doppler freq in start_repeater --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index c7d79f8b..b244811b 100644 --- a/transmit.py +++ b/transmit.py @@ -1375,7 +1375,7 @@ if __name__ == "__main__": print("Carrier detected") if (doppler_mode): update_doppler() - start_repeater(tx_doppler_freq_hz, tx_doppler_freq_hz) + start_repeater(tx_doppler_freq_hz, rx_doppler_freq_hz) else: start_repeater(txrf * 1e6, rxf * 1e6) while (input(squelch) == False): From c0f95dee8c4f68a20ff7f4ecc0006e7c270e60d7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 13:56:20 -0400 Subject: [PATCH 1310/1744] Update transmit.py transmit CW QSY at default freq for Repeater --- transmit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index b244811b..3a4448e7 100644 --- a/transmit.py +++ b/transmit.py @@ -841,10 +841,13 @@ if __name__ == "__main__": # if (mode != 'e'): program_fm(rx,tx,rxpl_value,sq,txpl_value) + if ((doppler_mode == True) and (command_tx == True) and (skip == False)) or (mode == 'e'): + cw_transmit_fm("QSY", tx) + if (doppler_mode == True): - if (command_tx == True) and (skip == False): - cw_transmit_fm("QSY", tx) +# if (command_tx == True) and (skip == False): +# cw_transmit_fm("QSY", tx) if (mode == 'e'): tx_doppler_start_hz = txrf * 1e6 From b4fd46dfeccc8f1829fd23bbd29186407fa6692f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 22 Jul 2026 19:18:21 -0400 Subject: [PATCH 1311/1744] Update transmit.py add callsign to QSY, only for rigctl or repeater --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 3a4448e7..2f1c5c19 100644 --- a/transmit.py +++ b/transmit.py @@ -841,8 +841,8 @@ if __name__ == "__main__": # if (mode != 'e'): program_fm(rx,tx,rxpl_value,sq,txpl_value) - if ((doppler_mode == True) and (command_tx == True) and (skip == False)) or (mode == 'e'): - cw_transmit_fm("QSY", tx) + if ((doppler_mode == True) and (rigctl == True) and (command_tx == True) and (skip == False)) or (mode == 'e'): + cw_transmit_fm(callsign + "QSY", tx) if (doppler_mode == True): From f998c59bc97fdb9743529cb36bb3bab9f62f9ce2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:31:52 -0400 Subject: [PATCH 1312/1744] Create pushbutton.py from pi-power-button --- pushbutton.py | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 pushbutton.py diff --git a/pushbutton.py b/pushbutton.py new file mode 100644 index 00000000..3999dc3b --- /dev/null +++ b/pushbutton.py @@ -0,0 +1,156 @@ +#!/usr/bin/env python + +# originally based on listen-for-shutdown.py from pi-power-button + +import RPi.GPIO as GPIO +import subprocess +import time +import os +from time import sleep + +def blink(times): + blink_time = 0.1 + powerPin = 16 + for i in range(times): # blink times + GPIO.output(powerPin, 0) + sleep(blink_time) + GPIO.output(powerPin, 1) + sleep(blink_time) + sleep(0.65) + +def change_mode(): + push_button = 26 + powerPin = 16 + txPin = 27 + sleep(0.75) + if GPIO.input(push_button): + print("sudo reboot -h now") + os.system("echo 'reboot due to push button!' | wall") + GPIO.setwarnings(False) + GPIO.setup(powerPin, GPIO.OUT) + GPIO.output(powerPin, 0); + subprocess.call(['reboot', '-h', 'now'], shell=False) + return + blink(1) + if GPIO.input(push_button): + print("switch to AFSK") + os.system("echo 'switch to AFSK due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -a") + return + blink(2) + if GPIO.input(push_button): + print("switch to FSK") + os.system("echo 'switch to FSK due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -f") + return + blink(3) + if GPIO.input(push_button): + print("switch to BPSK") + os.system("echo 'switch to BPSK due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -b") + return + blink(4) + if GPIO.input(push_button): + print("switch to SSTV") + os.system("echo 'switch to SSTV due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -s") + return + blink(5) + if GPIO.input(push_button): + print("switch to CW") + os.system("echo 'switch to CW due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -m") + return + blink(6) + if GPIO.input(push_button): + print("switch to Repeater") + os.system("echo 'switch to Repeater due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -e") + return + blink(7) + if GPIO.input(push_button): + print("switch to FunCube") + os.system("echo 'switch to FunCube due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -j") + return + blink(8) + if GPIO.input(push_button): + print("switch to PacSat") + os.system("echo 'switch to PacSat due to push button!' | wall") + os.system("/home/pi/CubeSatSim/config -G") + return + for i in range(3): # blink 3 times slowly + GPIO.output(powerPin, 0) + sleep(0.35) + GPIO.output(powerPin, 1) + sleep(0.35) + sleep(0.65) + if GPIO.input(push_button): + print("sudo nmcli connection up preconfigured") + os.system("sudo nmcli connection up preconfigured") + print("sudo shutdown -h now") + os.system("echo 'shutdown due to push button!' | wall") + GPIO.setwarnings(False) + GPIO.setup(powerPin, GPIO.OUT) + subprocess.call(['shutdown', '-h', 'now'], shell=False) + return + for i in range(3): # blink two times even more slowly + GPIO.output(powerPin, 0) + sleep(0.7) + GPIO.output(powerPin, 1) + sleep(0.7) + sleep(0.7) + print("toggle command and control mode") + try: + f = open("/home/pi/CubeSatSim/command_control", "r") + f.close() + print("command and control will be deactivated") + os.system('sudo rm /home/pi/CubeSatSim/command_control') + os.system("echo 'command and control deactivated by push button!' | wall") + os.system('sudo systemctl restart command') + except: + print("command and control will be activated") + os.system('touch /home/pi/CubeSatSim/command_control') + os.system("echo 'command and control activated by push button!' | wall") + os.system('sudo systemctl restart command') + sleep(1) + +powerPin = 16 +txPin = 27 +push_button = 26 +GPIO.setmode(GPIO.BCM) +GPIO.setwarnings(False) +GPIO.setup(txPin, GPIO.OUT) +GPIO.output(txPin, 0) +GPIO.setup(powerPin, GPIO.OUT) +GPIO.output(powerPin, 0) +# GPIO.output(powerPin, 1) +# sleep(0.5) +# GPIO.output(powerPin, 0) +# sleep(0.5) + +GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) +# sleep(1) +if not GPIO.input(push_button): # if pushbutton is held down during boot + print("Activating WiFi access point!") + GPIO.output(powerPin, 1) + sleep(0.1) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.3) + GPIO.output(powerPin, 0) + sleep(0.1) + GPIO.output(powerPin, 1) + sleep(0.3) + GPIO.output(powerPin, 0) + print("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") + os.system("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") + sleep(2) +GPIO.setup(powerPin, GPIO.OUT) +GPIO.output(powerPin, 1) +while (True): + sleep(1) + GPIO.wait_for_edge(push_button, GPIO.FALLING) + change_mode() + sleep(5) From 14439d8d90ce18c49a154abcb4fd7c81b39964b0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:37:08 -0400 Subject: [PATCH 1313/1744] Create pushbutton.system --- systemd/pushbutton.system | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 systemd/pushbutton.system diff --git a/systemd/pushbutton.system b/systemd/pushbutton.system new file mode 100644 index 00000000..fa2edf55 --- /dev/null +++ b/systemd/pushbutton.system @@ -0,0 +1,14 @@ +[Unit] +Description=pushbutton + +[Service] +TimeoutStopSec=5 +ExecStart=python3 -u /home/pi/CubeSatSim/pushbutton.py +WorkingDirectory=/home/pi/CubeSatSim +StandardOutput=inherit +StandardError=inherit +Restart=always +User=pi + +[Install] +WantedBy=default.target From 9ccbcc3a0c3949bca66a76662badab38c82f43ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:37:36 -0400 Subject: [PATCH 1314/1744] Rename pushbutton.system to pushbutton.service --- systemd/{pushbutton.system => pushbutton.service} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename systemd/{pushbutton.system => pushbutton.service} (100%) diff --git a/systemd/pushbutton.system b/systemd/pushbutton.service similarity index 100% rename from systemd/pushbutton.system rename to systemd/pushbutton.service From 010cf16db78642597a86b80a9c063341899f9d33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:42:09 -0400 Subject: [PATCH 1315/1744] Update install --- install | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/install b/install index 4957dc4e..c332569a 100755 --- a/install +++ b/install @@ -741,6 +741,20 @@ else FLAG=1 fi +FILE=/etc/systemd/system/pushbutton.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/pushbutton.service /etc/systemd/system/pushbutton.service) ]]; then + echo "changed pushbutton.service." + sudo cp /home/pi/CubeSatSim/systemd/pushbutton.service /etc/systemd/system/pushbutton.service + FLAG=1 + else + echo "no change to pushbutton.service." + fi +else + echo "creating pushbutton.service." + sudo cp /home/pi/CubeSatSim/systemd/pushbutton.service /etc/systemd/system/pushbutton.service + FLAG=1 +fi FILE=/etc/asound.conf if [ -f "$FILE" ]; then From d9d5ba5a42c3083efcf55e1e546edb650b36dc80 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:45:45 -0400 Subject: [PATCH 1316/1744] Update install remove pi-power-button --- install | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/install b/install index c332569a..f7b565ce 100755 --- a/install +++ b/install @@ -469,28 +469,6 @@ else echo "b" > .mode fi -if [ ! -d "/home/pi/pi-power-button" ]; then - - cd - git clone https://github.com/alanbjohnston/pi-power-button.git - cd pi-power-button - git checkout master - ./script/install - sudo apt-get install -y libraspberrypi-dev - -fi - -cd /home/pi/pi-power-button - -if [ ! $(git branch --show-current | grep master-b) ]; then - - echo "updating branch of pi-power-button to master-b." - git pull - git checkout master-b - script/install - FLAG=1 -fi - git pull --no-rebase > .updated_p #git checkout master grep 'changed' /home/pi/pi-power-button/.updated_p @@ -741,6 +719,11 @@ else FLAG=1 fi +if [ ! -d "/home/pi/pi-pushbutton" ]; then + pkill -f /usr/local/bin/listen-for-shutdown.py > /dev/null + sudo rm /etc/init.d/listen-for-shutdown.sh stop > /dev/null +fi + FILE=/etc/systemd/system/pushbutton.service if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/systemd/pushbutton.service /etc/systemd/system/pushbutton.service) ]]; then From b9f4ed144c87e0c4cc176472e650efe94315bece Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:46:45 -0400 Subject: [PATCH 1317/1744] Update install remove rest of pi-power-button --- install | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/install b/install index f7b565ce..a0cb5d37 100755 --- a/install +++ b/install @@ -469,16 +469,6 @@ else echo "b" > .mode fi -git pull --no-rebase > .updated_p -#git checkout master -grep 'changed' /home/pi/pi-power-button/.updated_p -if [[ $(grep 'changed' /home/pi/pi-power-button/.updated_p) ]]; then - - echo "updating pi-power-button." - script/install - FLAG=1 -fi - if [ ! -d "/home/pi/g0kla_common" ]; then cd git clone https://github.com/alanbjohnston/g0kla_common.git From b0757b4827bd90a703163e792f9dff6670fa9880 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:48:20 -0400 Subject: [PATCH 1318/1744] Update install uninstall pi-power-button --- install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install b/install index a0cb5d37..4de24a86 100755 --- a/install +++ b/install @@ -709,7 +709,8 @@ else FLAG=1 fi -if [ ! -d "/home/pi/pi-pushbutton" ]; then +if [ ! -d "/home/pi/pi-power-button" ]; then + echo "Uninstalling pi-power-button" pkill -f /usr/local/bin/listen-for-shutdown.py > /dev/null sudo rm /etc/init.d/listen-for-shutdown.sh stop > /dev/null fi From 3203f07bf126f8a71aa223156543861745c52483 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 09:49:16 -0400 Subject: [PATCH 1319/1744] Update install fix uninstall pi-power-button --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 4de24a86..df4dedde 100755 --- a/install +++ b/install @@ -709,7 +709,7 @@ else FLAG=1 fi -if [ ! -d "/home/pi/pi-power-button" ]; then +if [ -d "/home/pi/pi-power-button" ]; then echo "Uninstalling pi-power-button" pkill -f /usr/local/bin/listen-for-shutdown.py > /dev/null sudo rm /etc/init.d/listen-for-shutdown.sh stop > /dev/null From 09c505ff5ecc1a622cb8daed874dea9d57c3289b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 10:01:24 -0400 Subject: [PATCH 1320/1744] Update install enable pushbutton --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index df4dedde..d8312955 100755 --- a/install +++ b/install @@ -720,6 +720,7 @@ if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/systemd/pushbutton.service /etc/systemd/system/pushbutton.service) ]]; then echo "changed pushbutton.service." sudo cp /home/pi/CubeSatSim/systemd/pushbutton.service /etc/systemd/system/pushbutton.service + sudo systemctl enable pushbutton FLAG=1 else echo "no change to pushbutton.service." From 86f2faa798f9d08754fd5273aec867951c090762 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 10:03:59 -0400 Subject: [PATCH 1321/1744] Update log add pushbutton --- log | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/log b/log index c4017153..6ba02f3c 100755 --- a/log +++ b/log @@ -10,6 +10,7 @@ if [ "$1" = "-h" ] ; then echo " -p pacsat" echo " -r frequency control" echo " -f frequency display" + echo " -b pushbutton" echo "Default is the log is dumpted to the screen and written to a file." echo "If an additional r is included, the log is realtime, and exits with a Control-C" echo @@ -48,6 +49,9 @@ if [ "$REALTIME" = "1" ] ; then sleep 1 printf "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" done + elif [ "$1" = "-b" ]; then + sudo journalctl -af -u pushbutton # > /home/pi/CubeSatSim/logb.txt + cat /home/pi/CubeSatSim/logb.txt else sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt # cat /home/pi/CubeSatSim/log.txt @@ -67,7 +71,7 @@ else elif [ "$1" = "-p" ]; then sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt - echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" + echo -e "\nPacSat Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then sudo journalctl -a -u frequency > /home/pi/CubeSatSim/logr.txt cat /home/pi/CubeSatSim/logr.txt @@ -75,6 +79,11 @@ else elif [ "$1" = "-f" ] ; then cat /home/pi/CubeSatSim/frequency.txt echo + elif [ "$1" = "-b" ]; then + sudo journalctl -a -u pushbutton > /home/pi/CubeSatSim/logb.txt + cat /home/pi/CubeSatSim/logb.txt + echo -e "\nPushbutton Log file also saved as /home/pi/CubeSatSim/logb.txt" + else sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt From 4ce8cdb8b19b042bd8981218869947d4e10acd7b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 10:09:24 -0400 Subject: [PATCH 1322/1744] Update install remove listen-for-shutdown.sh --- install | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install b/install index d8312955..5dee03cb 100755 --- a/install +++ b/install @@ -711,8 +711,7 @@ fi if [ -d "/home/pi/pi-power-button" ]; then echo "Uninstalling pi-power-button" - pkill -f /usr/local/bin/listen-for-shutdown.py > /dev/null - sudo rm /etc/init.d/listen-for-shutdown.sh stop > /dev/null + sudo rm /etc/init.d/listen-for-shutdown.sh fi FILE=/etc/systemd/system/pushbutton.service From 7693b5b58972f63daff219f37581028e754b3e21 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 10:20:31 -0400 Subject: [PATCH 1323/1744] Update pushbutton.py shutdown without -h --- pushbutton.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 3999dc3b..228323e2 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -28,8 +28,9 @@ def change_mode(): os.system("echo 'reboot due to push button!' | wall") GPIO.setwarnings(False) GPIO.setup(powerPin, GPIO.OUT) - GPIO.output(powerPin, 0); - subprocess.call(['reboot', '-h', 'now'], shell=False) + GPIO.output(powerPin, 0); + os.system("sudo reboot now") +# subprocess.call(['reboot', '-h', 'now'], shell=False) return blink(1) if GPIO.input(push_button): From 8594d29c5dd2b217070e691453cfa8ac6dde53f5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 10:35:45 -0400 Subject: [PATCH 1324/1744] Update install allow nmcli to manage wifi --- install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install b/install index 5dee03cb..2f943ab3 100755 --- a/install +++ b/install @@ -255,6 +255,8 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sh -c 'echo "\n" >> /boot/firmware/config.txt' + sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi + elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Trixie detected, installation continuing." @@ -709,9 +711,10 @@ else FLAG=1 fi -if [ -d "/home/pi/pi-power-button" ]; then +FILE=/etc/init.d/listen-for-shutdown.sh +if [ -f $FILE ]; then echo "Uninstalling pi-power-button" - sudo rm /etc/init.d/listen-for-shutdown.sh + sudo rm $FILE fi FILE=/etc/systemd/system/pushbutton.service From 7ea790cf80374db82f6dd3138c79527ebd6c6c2d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 10:39:50 -0400 Subject: [PATCH 1325/1744] Update gpredict.desktop run gpredict.sh --- groundstation/gpredict.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/gpredict.desktop b/groundstation/gpredict.desktop index 69d11ecb..c3e0a72b 100644 --- a/groundstation/gpredict.desktop +++ b/groundstation/gpredict.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Exec=/usr/bin/gpredict +Exec=/home/pi/CubeSatSim/groundstation/gpredict.sh Name=Gpredict Comment=ISS and Satellite Tracking for ARISS Radio Pi Icon=/home/pi/Icons/gpredict.png From 9182cb1e4788f7234a561d91cb2360a5859df1a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 10:45:19 -0400 Subject: [PATCH 1326/1744] Update gpredict.desktop use gpredict.sh --- groundstation/gpredict.desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/gpredict.desktop b/groundstation/gpredict.desktop index 69d11ecb..c3e0a72b 100644 --- a/groundstation/gpredict.desktop +++ b/groundstation/gpredict.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Exec=/usr/bin/gpredict +Exec=/home/pi/CubeSatSim/groundstation/gpredict.sh Name=Gpredict Comment=ISS and Satellite Tracking for ARISS Radio Pi Icon=/home/pi/Icons/gpredict.png From 0b52f7174911c356cae40e5c70233dc97150701b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 10:46:36 -0400 Subject: [PATCH 1327/1744] Update pushbutton.service use root --- systemd/pushbutton.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/pushbutton.service b/systemd/pushbutton.service index fa2edf55..da0fbdef 100644 --- a/systemd/pushbutton.service +++ b/systemd/pushbutton.service @@ -8,7 +8,7 @@ WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit Restart=always -User=pi +User=root [Install] WantedBy=default.target From 0f470314f31108e9933f91f99903446849e97408 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 10:54:46 -0400 Subject: [PATCH 1328/1744] Update pushbutton.py subprocess.run for sudo nmcli commands --- pushbutton.py | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 228323e2..8686f878 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -88,7 +88,12 @@ def change_mode(): sleep(0.65) if GPIO.input(push_button): print("sudo nmcli connection up preconfigured") - os.system("sudo nmcli connection up preconfigured") +### os.system("sudo nmcli connection down preconfigured") + result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) + print(result) + result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) + print(result) +### os.system("sudo nmcli connection down Hotspot-Manual") print("sudo shutdown -h now") os.system("echo 'shutdown due to push button!' | wall") GPIO.setwarnings(False) @@ -146,8 +151,31 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot sleep(0.3) GPIO.output(powerPin, 0) print("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") - os.system("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") +### os.system("sudo nmcli connection down preconfigured") + result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) + print(result) + result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) + print(result) +### os.system("sudo nmcli connection down Hotspot-Manual") +## os.system("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") +# os.system("sudo nmcli c add type wifi ifname wlan0 con-name Hotspot-Manual ssid MyHotspot") +# os.system("sudo nmcli connection modify Hotspot-Manual 802-11-wireless.mode ap 802-11-wireless.band bg") + # # os.system("sudo nmcli connection modify Hotspot-Manual wifi-sec.key-mgmt wpa-psk wifi-sec.psk 'YourPassword123' ipv4.method shared") +# os.system("sudo nmcli connection down uuid 335c2e13-cab4-40bf-a297-7ff2535ec214") # preconfigured") +# os.system("sudo nmcli device disconnect wlan0") +# os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") + result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) + print(result.stdout) +# os.system("sudo nmcli connection up Hotspot-Manual") + result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) + print(result.stdout) sleep(2) +else: + result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) + print(result.stdout) + result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) + print(result.stdout) +# os.system("sudo nmcli connection up preconfigured") GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) while (True): From 5f5e7e7e53e3b63944653829ae92eb0acc285373 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 10:56:21 -0400 Subject: [PATCH 1329/1744] Update pushbutton.py cleanup diff --- pushbutton.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 8686f878..feb2b0bf 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -24,6 +24,12 @@ def change_mode(): txPin = 27 sleep(0.75) if GPIO.input(push_button): +### os.system("sudo nmcli connection down preconfigured") + result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) + print(result) + result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) + print(result) +### os.system("sudo nmcli connection down Hotspot-Manual") print("sudo reboot -h now") os.system("echo 'reboot due to push button!' | wall") GPIO.setwarnings(False) @@ -151,12 +157,6 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot sleep(0.3) GPIO.output(powerPin, 0) print("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") -### os.system("sudo nmcli connection down preconfigured") - result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) - print(result) - result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) - print(result) -### os.system("sudo nmcli connection down Hotspot-Manual") ## os.system("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") # os.system("sudo nmcli c add type wifi ifname wlan0 con-name Hotspot-Manual ssid MyHotspot") # os.system("sudo nmcli connection modify Hotspot-Manual 802-11-wireless.mode ap 802-11-wireless.band bg") @@ -168,7 +168,7 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot print(result.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) - print(result.stdout) + print(result.stdout) sleep(2) else: result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) From 065cb227dd9f6016b668484881f475b48af2a3b1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 11:13:28 -0400 Subject: [PATCH 1330/1744] Update pushbutton.py add fflush --- pushbutton.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index feb2b0bf..6dfb30ef 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -26,9 +26,9 @@ def change_mode(): if GPIO.input(push_button): ### os.system("sudo nmcli connection down preconfigured") result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) - print(result) + print(result, flush=True) result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) - print(result) + print(result, flush=True) ### os.system("sudo nmcli connection down Hotspot-Manual") print("sudo reboot -h now") os.system("echo 'reboot due to push button!' | wall") @@ -96,9 +96,9 @@ def change_mode(): print("sudo nmcli connection up preconfigured") ### os.system("sudo nmcli connection down preconfigured") result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) - print(result) + print(result, flush=True) result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) - print(result) + print(result, flush=True) ### os.system("sudo nmcli connection down Hotspot-Manual") print("sudo shutdown -h now") os.system("echo 'shutdown due to push button!' | wall") @@ -165,16 +165,16 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot # os.system("sudo nmcli device disconnect wlan0") # os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) - print(result.stdout) + print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) - print(result.stdout) + print(result, flush=True) #.stdout) sleep(2) else: result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) - print(result.stdout) + print(result, flush=True) # .stdout) result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) - print(result.stdout) + print(result, flush=True) # .stdout) # os.system("sudo nmcli connection up preconfigured") GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) From 23454ff97888a724f6897af769d8c7b6747d767f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 12:02:38 -0400 Subject: [PATCH 1331/1744] Update pushbutton.py add modify to wlan0 --- pushbutton.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pushbutton.py b/pushbutton.py index 6dfb30ef..a37ba4a2 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -164,6 +164,9 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot # os.system("sudo nmcli connection down uuid 335c2e13-cab4-40bf-a297-7ff2535ec214") # preconfigured") # os.system("sudo nmcli device disconnect wlan0") # os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") + result = subprocess.run(['nmcli', 'connection', 'modify', 'Hotspot-Manual', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) + print(result, flush=True) #.stdout) + result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") From 8674a8d6352846d3cecbb3c0757f5dd72a57149b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 12:18:39 -0400 Subject: [PATCH 1332/1744] Update pushbutton.py add wlan0 to preconfigured --- pushbutton.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index a37ba4a2..94c82bb2 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -166,7 +166,6 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot # os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'modify', 'Hotspot-Manual', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) print(result, flush=True) #.stdout) - result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") @@ -174,6 +173,8 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot print(result, flush=True) #.stdout) sleep(2) else: + result = subprocess.run(['nmcli', 'connection', 'modify', 'preconfigured', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) + print(result, flush=True) #.stdout) result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) print(result, flush=True) # .stdout) result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) From 74a83194d7ded78095122c5fff5cb5dfea780a44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 12:35:05 -0400 Subject: [PATCH 1333/1744] Update pushbutton.py remove connection down --- pushbutton.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 94c82bb2..ce1635a9 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -25,10 +25,10 @@ def change_mode(): sleep(0.75) if GPIO.input(push_button): ### os.system("sudo nmcli connection down preconfigured") - result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) - print(result, flush=True) - result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) - print(result, flush=True) +# result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) +# print(result, flush=True) +# result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) +# print(result, flush=True) ### os.system("sudo nmcli connection down Hotspot-Manual") print("sudo reboot -h now") os.system("echo 'reboot due to push button!' | wall") @@ -95,10 +95,10 @@ def change_mode(): if GPIO.input(push_button): print("sudo nmcli connection up preconfigured") ### os.system("sudo nmcli connection down preconfigured") - result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) - print(result, flush=True) - result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) - print(result, flush=True) +# result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) +# print(result, flush=True) +# result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) +# print(result, flush=True) ### os.system("sudo nmcli connection down Hotspot-Manual") print("sudo shutdown -h now") os.system("echo 'shutdown due to push button!' | wall") @@ -166,8 +166,8 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot # os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'modify', 'Hotspot-Manual', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) print(result, flush=True) #.stdout) - result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) - print(result, flush=True) #.stdout) +# result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) +# print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) print(result, flush=True) #.stdout) @@ -175,8 +175,8 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot else: result = subprocess.run(['nmcli', 'connection', 'modify', 'preconfigured', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) print(result, flush=True) #.stdout) - result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) - print(result, flush=True) # .stdout) +# result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) +# print(result, flush=True) # .stdout) result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) print(result, flush=True) # .stdout) # os.system("sudo nmcli connection up preconfigured") From d1b4c30670dc33ee5253ddcc9d0da16ce0504897 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 12:47:56 -0400 Subject: [PATCH 1334/1744] Update pushbutton.py print connection show --- pushbutton.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index ce1635a9..4e3160bb 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -165,12 +165,16 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot # os.system("sudo nmcli device disconnect wlan0") # os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'modify', 'Hotspot-Manual', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) - print(result, flush=True) #.stdout) + print(result, flush=True) #.stdout) # result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) # print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) print(result, flush=True) #.stdout) +# if (result.returncode != 0): + print(result.returncode) + result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) + print(result, flush=True) sleep(2) else: result = subprocess.run(['nmcli', 'connection', 'modify', 'preconfigured', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) @@ -179,6 +183,10 @@ else: # print(result, flush=True) # .stdout) result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) print(result, flush=True) # .stdout) +# if (result.returncode != 0): + print(result.returncode) + result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) + print(result, flush=True) # os.system("sudo nmcli connection up preconfigured") GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) From 3ee6413d0015a508b74b98ce55bab783f484be6b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 12:52:11 -0400 Subject: [PATCH 1335/1744] Update pushbutton.py turn wifi on --- pushbutton.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pushbutton.py b/pushbutton.py index 4e3160bb..0d4774cb 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -169,6 +169,8 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot # result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) # print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") + result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) + print(result, flush=True) result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) print(result, flush=True) #.stdout) # if (result.returncode != 0): @@ -181,6 +183,8 @@ else: print(result, flush=True) #.stdout) # result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) # print(result, flush=True) # .stdout) + result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) + print(result, flush=True) result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) print(result, flush=True) # .stdout) # if (result.returncode != 0): From 3a96325e2334285561129e81fccc205982da2a03 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 16:52:37 -0400 Subject: [PATCH 1336/1744] Update pushbutton.py nmcli one line --- pushbutton.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 0d4774cb..6b0a7732 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -158,23 +158,25 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot GPIO.output(powerPin, 0) print("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") ## os.system("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") + result = subprocess.run(['nmcli', 'device', 'wifi', 'hotspot', 'con-name', 'MyHotspot', 'ifname', 'wlan0', 'ssid', 'CubeSat', 'password', 'amsatao7'], capture_output=True, text=True) + print(result, flush=True) #.stdout) # os.system("sudo nmcli c add type wifi ifname wlan0 con-name Hotspot-Manual ssid MyHotspot") # os.system("sudo nmcli connection modify Hotspot-Manual 802-11-wireless.mode ap 802-11-wireless.band bg") # # os.system("sudo nmcli connection modify Hotspot-Manual wifi-sec.key-mgmt wpa-psk wifi-sec.psk 'YourPassword123' ipv4.method shared") # os.system("sudo nmcli connection down uuid 335c2e13-cab4-40bf-a297-7ff2535ec214") # preconfigured") # os.system("sudo nmcli device disconnect wlan0") # os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") - result = subprocess.run(['nmcli', 'connection', 'modify', 'Hotspot-Manual', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) - print(result, flush=True) #.stdout) +## result = subprocess.run(['nmcli', 'connection', 'modify', 'Hotspot-Manual', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) +## print(result, flush=True) #.stdout) # result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) # print(result, flush=True) #.stdout) # os.system("sudo nmcli connection up Hotspot-Manual") - result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) - print(result, flush=True) - result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) - print(result, flush=True) #.stdout) +## result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) +## print(result, flush=True) +## result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) +## print(result, flush=True) #.stdout) # if (result.returncode != 0): - print(result.returncode) +# print(result.returncode) result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) sleep(2) From 3af021d674fec56c28a720c4c1c28c5bb53e9cc3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 17:30:04 -0400 Subject: [PATCH 1337/1744] Update pushbutton.py nmcli up to 5 times --- pushbutton.py | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 6b0a7732..4bff85c1 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -156,10 +156,16 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot GPIO.output(powerPin, 1) sleep(0.3) GPIO.output(powerPin, 0) - print("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") + success = 1 + count = 0 + while (success != 0) and (count < 5): +# print("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") ## os.system("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") - result = subprocess.run(['nmcli', 'device', 'wifi', 'hotspot', 'con-name', 'MyHotspot', 'ifname', 'wlan0', 'ssid', 'CubeSat', 'password', 'amsatao7'], capture_output=True, text=True) - print(result, flush=True) #.stdout) + result = subprocess.run(['nmcli', 'device', 'wifi', 'hotspot', 'con-name', 'Hotspot', 'ifname', 'wlan0', 'ssid', 'CubeSat', 'password', 'amsatao7'], capture_output=True, text=True) + print(result, flush=True) #.stdout) + count = count +1 + success = result.returncode + sleep(1) # os.system("sudo nmcli c add type wifi ifname wlan0 con-name Hotspot-Manual ssid MyHotspot") # os.system("sudo nmcli connection modify Hotspot-Manual 802-11-wireless.mode ap 802-11-wireless.band bg") # # os.system("sudo nmcli connection modify Hotspot-Manual wifi-sec.key-mgmt wpa-psk wifi-sec.psk 'YourPassword123' ipv4.method shared") @@ -180,17 +186,17 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) sleep(2) -else: - result = subprocess.run(['nmcli', 'connection', 'modify', 'preconfigured', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) - print(result, flush=True) #.stdout) +###else: +### result = subprocess.run(['nmcli', 'connection', 'modify', 'preconfigured', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) +### print(result, flush=True) #.stdout) # result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) # print(result, flush=True) # .stdout) - result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) - print(result, flush=True) - result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) - print(result, flush=True) # .stdout) +### result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) +### print(result, flush=True) +### result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) +### print(result, flush=True) # .stdout) # if (result.returncode != 0): - print(result.returncode) +### print(result.returncode) result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) # os.system("sudo nmcli connection up preconfigured") From a49c773fbf7f26422df4f007374ae0c7a9a26947 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 17:35:23 -0400 Subject: [PATCH 1338/1744] Update pushbutton.py cleanup --- pushbutton.py | 84 +++++++++++---------------------------------------- 1 file changed, 17 insertions(+), 67 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 4bff85c1..dcf58e4e 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -24,13 +24,7 @@ def change_mode(): txPin = 27 sleep(0.75) if GPIO.input(push_button): -### os.system("sudo nmcli connection down preconfigured") -# result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) -# print(result, flush=True) -# result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) -# print(result, flush=True) -### os.system("sudo nmcli connection down Hotspot-Manual") - print("sudo reboot -h now") + print("sudo reboot -h now", flush=True) os.system("echo 'reboot due to push button!' | wall") GPIO.setwarnings(False) GPIO.setup(powerPin, GPIO.OUT) @@ -40,49 +34,49 @@ def change_mode(): return blink(1) if GPIO.input(push_button): - print("switch to AFSK") + print("switch to AFSK", flush=True) os.system("echo 'switch to AFSK due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -a") return blink(2) if GPIO.input(push_button): - print("switch to FSK") + print("switch to FSK", flush=True) os.system("echo 'switch to FSK due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -f") return blink(3) if GPIO.input(push_button): - print("switch to BPSK") + print("switch to BPSK", flush=True) os.system("echo 'switch to BPSK due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -b") return blink(4) if GPIO.input(push_button): - print("switch to SSTV") + print("switch to SSTV", flush=True) os.system("echo 'switch to SSTV due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -s") return blink(5) if GPIO.input(push_button): - print("switch to CW") + print("switch to CW", flush=True) os.system("echo 'switch to CW due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -m") return blink(6) if GPIO.input(push_button): - print("switch to Repeater") + print("switch to Repeater", flush=True) os.system("echo 'switch to Repeater due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -e") return blink(7) if GPIO.input(push_button): - print("switch to FunCube") + print("switch to FunCube", flush=True) os.system("echo 'switch to FunCube due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -j") return blink(8) if GPIO.input(push_button): - print("switch to PacSat") + print("switch to PacSat", flush=True) os.system("echo 'switch to PacSat due to push button!' | wall") os.system("/home/pi/CubeSatSim/config -G") return @@ -93,14 +87,7 @@ def change_mode(): sleep(0.35) sleep(0.65) if GPIO.input(push_button): - print("sudo nmcli connection up preconfigured") -### os.system("sudo nmcli connection down preconfigured") -# result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) -# print(result, flush=True) -# result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) -# print(result, flush=True) -### os.system("sudo nmcli connection down Hotspot-Manual") - print("sudo shutdown -h now") + print("sudo shutdown -h now", flush=True) os.system("echo 'shutdown due to push button!' | wall") GPIO.setwarnings(False) GPIO.setup(powerPin, GPIO.OUT) @@ -112,16 +99,16 @@ def change_mode(): GPIO.output(powerPin, 1) sleep(0.7) sleep(0.7) - print("toggle command and control mode") + print("toggle command and control mode", flush=True) try: f = open("/home/pi/CubeSatSim/command_control", "r") f.close() - print("command and control will be deactivated") + print("command and control will be deactivated", flush=True) os.system('sudo rm /home/pi/CubeSatSim/command_control') os.system("echo 'command and control deactivated by push button!' | wall") os.system('sudo systemctl restart command') except: - print("command and control will be activated") + print("command and control will be activated", flush=True) os.system('touch /home/pi/CubeSatSim/command_control') os.system("echo 'command and control activated by push button!' | wall") os.system('sudo systemctl restart command') @@ -136,15 +123,11 @@ GPIO.setup(txPin, GPIO.OUT) GPIO.output(txPin, 0) GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 0) -# GPIO.output(powerPin, 1) -# sleep(0.5) -# GPIO.output(powerPin, 0) -# sleep(0.5) GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) -# sleep(1) + if not GPIO.input(push_button): # if pushbutton is held down during boot - print("Activating WiFi access point!") + print("Activating WiFi access point!", flush=True) GPIO.output(powerPin, 1) sleep(0.1) GPIO.output(powerPin, 0) @@ -159,47 +142,14 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot success = 1 count = 0 while (success != 0) and (count < 5): -# print("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") -## os.system("sudo nmcli device wifi hotspot con-name HotSpot ifname wlan0 ssid CubeSat password amsatao7") result = subprocess.run(['nmcli', 'device', 'wifi', 'hotspot', 'con-name', 'Hotspot', 'ifname', 'wlan0', 'ssid', 'CubeSat', 'password', 'amsatao7'], capture_output=True, text=True) print(result, flush=True) #.stdout) - count = count +1 + count = count + 1 success = result.returncode sleep(1) -# os.system("sudo nmcli c add type wifi ifname wlan0 con-name Hotspot-Manual ssid MyHotspot") -# os.system("sudo nmcli connection modify Hotspot-Manual 802-11-wireless.mode ap 802-11-wireless.band bg") - # # os.system("sudo nmcli connection modify Hotspot-Manual wifi-sec.key-mgmt wpa-psk wifi-sec.psk 'YourPassword123' ipv4.method shared") -# os.system("sudo nmcli connection down uuid 335c2e13-cab4-40bf-a297-7ff2535ec214") # preconfigured") -# os.system("sudo nmcli device disconnect wlan0") -# os.system("sudo nmcli connection up uuid d437746a-411f-4f02-95ea-7b2f7665d59a") # Hotspot-Manual") -## result = subprocess.run(['nmcli', 'connection', 'modify', 'Hotspot-Manual', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) -## print(result, flush=True) #.stdout) -# result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True) -# print(result, flush=True) #.stdout) -# os.system("sudo nmcli connection up Hotspot-Manual") -## result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) -## print(result, flush=True) -## result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True) -## print(result, flush=True) #.stdout) -# if (result.returncode != 0): -# print(result.returncode) - result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) - print(result, flush=True) - sleep(2) -###else: -### result = subprocess.run(['nmcli', 'connection', 'modify', 'preconfigured', 'connection.interface-name', 'wlan0'], capture_output=True, text=True) -### print(result, flush=True) #.stdout) -# result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True) -# print(result, flush=True) # .stdout) -### result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True) -### print(result, flush=True) -### result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True) -### print(result, flush=True) # .stdout) -# if (result.returncode != 0): -### print(result.returncode) result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) -# os.system("sudo nmcli connection up preconfigured") + sleep(2) GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) while (True): From 92b0e8b854256bc2315a2d785b8bcdf60152ca49 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 18:38:31 -0400 Subject: [PATCH 1339/1744] Update install add enable pushbutton --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 2f943ab3..7dbf9c09 100755 --- a/install +++ b/install @@ -730,6 +730,7 @@ if [ -f "$FILE" ]; then else echo "creating pushbutton.service." sudo cp /home/pi/CubeSatSim/systemd/pushbutton.service /etc/systemd/system/pushbutton.service + sudo systemctl enable pushbutton FLAG=1 fi From 5b28a52346a0c9da61a8502e1c96378c77282496 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 19:15:27 -0400 Subject: [PATCH 1340/1744] Update log add -b all --- log | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/log b/log index 6ba02f3c..8963b64f 100755 --- a/log +++ b/log @@ -29,19 +29,19 @@ if [ "$REALTIME" = "1" ] ; then sleep 2 if [ "$1" = "-t" ] ; then - sudo journalctl -af -u transmit # > /home/pi/CubeSatSim/logt.txt + sudo journalctl -b all -af -u transmit # > /home/pi/CubeSatSim/logt.txt # cat /home/pi/CubeSatSim/logt.txt # echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then - sudo journalctl -af -u command # > /home/pi/CubeSatSim/logc.txt + sudo journaclt -b all -af -u command # > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then - sudo journalctl -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt + sudo journalctl -b all -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then - sudo journalctl -af -u frequency # > /home/pi/CubeSatSim/logr.txt + sudo journalctl -b all -af -u frequency # > /home/pi/CubeSatSim/logr.txt elif [ "$1" = "-f" ] ; then while true; do cat /home/pi/CubeSatSim/frequency.txt | tr -d '\n' @@ -50,10 +50,10 @@ if [ "$REALTIME" = "1" ] ; then printf "\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" done elif [ "$1" = "-b" ]; then - sudo journalctl -af -u pushbutton # > /home/pi/CubeSatSim/logb.txt + sudo journalctl -b all -af -u pushbutton # > /home/pi/CubeSatSim/logb.txt cat /home/pi/CubeSatSim/logb.txt else - sudo journalctl -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt + sudo journalctl -b all -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt # cat /home/pi/CubeSatSim/log.txt # echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" fi @@ -61,31 +61,31 @@ if [ "$REALTIME" = "1" ] ; then else if [ "$1" = "-t" ] ; then - sudo journalctl -a -u transmit > /home/pi/CubeSatSim/logt.txt + sudo journalctl -b all -a -u transmit > /home/pi/CubeSatSim/logt.txt cat /home/pi/CubeSatSim/logt.txt echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then - sudo journalctl -a -u command > /home/pi/CubeSatSim/logc.txt + sudo journalctl -b all -a -u command > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then - sudo journalctl -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt + sudo journalctl -b all -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt echo -e "\nPacSat Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then - sudo journalctl -a -u frequency > /home/pi/CubeSatSim/logr.txt + sudo journalctl -b all -a -u frequency > /home/pi/CubeSatSim/logr.txt cat /home/pi/CubeSatSim/logr.txt echo -e "\nFrequency Log file also saved as /home/pi/CubeSatSim/logf.txt" elif [ "$1" = "-f" ] ; then cat /home/pi/CubeSatSim/frequency.txt echo elif [ "$1" = "-b" ]; then - sudo journalctl -a -u pushbutton > /home/pi/CubeSatSim/logb.txt + sudo journalctl -b all -a -u pushbutton > /home/pi/CubeSatSim/logb.txt cat /home/pi/CubeSatSim/logb.txt echo -e "\nPushbutton Log file also saved as /home/pi/CubeSatSim/logb.txt" else - sudo journalctl -a -u cubesatsim > /home/pi/CubeSatSim/log.txt + sudo journalctl -b all -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" fi From ea4ccf94f14c290b6d8d3481e47647a685fb5395 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 29 Jul 2026 19:17:59 -0400 Subject: [PATCH 1341/1744] Update install add persistent journal logs --- install | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install b/install index 7dbf9c09..9dd12e3d 100755 --- a/install +++ b/install @@ -257,6 +257,13 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi + if [ ! -d "/var/log/journal" ]; then # persistant journal logs across boots + sudo mkdir -p /var/log/journal + sudo systemd-tmpfiles --create --prefix /var/log/journal + sudo systemctl restart systemd-journal-flush.service + sudo sed -i 's/Storage=volatile/Storage=persistent/g' /etc/systemd/journald.conf + fi + elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Trixie detected, installation continuing." From 1336bcb751bad9fdb1c6d6b150eb33e7912a0a38 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 00:25:08 -0400 Subject: [PATCH 1342/1744] Update pushbutton.py add ttyd port 8080 --- pushbutton.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index dcf58e4e..65f6218f 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -149,7 +149,10 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot sleep(1) result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) - sleep(2) + sleep(2) + result = subprocess.run(['ttyd', '-p', '8080', 'bash', '&'], capture_output=True, text=True) + print(result, flush=True) + GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) while (True): From e7e617959ce06175e074f55754143c4836ba6dfc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 00:47:54 -0400 Subject: [PATCH 1343/1744] Update pushbutton.py use Popen to run ttyd in background --- pushbutton.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 65f6218f..03fcac50 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -150,8 +150,7 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) sleep(2) - result = subprocess.run(['ttyd', '-p', '8080', 'bash', '&'], capture_output=True, text=True) - print(result, flush=True) + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8080', 'bash']) GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) From 1478f3b48b783cc36aeedd2581a39edb55ca60ad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 00:48:24 -0400 Subject: [PATCH 1344/1744] Update .gitignore add logs.txt --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index a63f7b2e..3df2c6bd 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,4 @@ direwolf-pacsatsim-tmp.conf groundstation/direwolf-pacsat-tmp.conf tlm.bin frequency.txt +logb.txt From 841adf1e0a28b0c2352d951eddae28398ce0eec1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 00:50:47 -0400 Subject: [PATCH 1345/1744] Update pushbutton.py fix tabs --- pushbutton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index 03fcac50..348aee6f 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -150,7 +150,7 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) sleep(2) - subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8080', 'bash']) + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8080', 'bash']) GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) From ab77a5ac6c9d610dbfabacc810c5463f05470f57 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 17:48:15 -0400 Subject: [PATCH 1346/1744] Update config add param to -K --- config | 65 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 27 deletions(-) diff --git a/config b/config index 7b69b013..58bd1fbb 100755 --- a/config +++ b/config @@ -132,6 +132,11 @@ echo # echo $2 # echo +param1=$1 +param2=$2 +param3=$3 +param4=$4 + sudo modprobe snd-aloop # if [ "$2" = "-n" ] ; then @@ -1965,46 +1970,52 @@ elif [ "$1" = "-K" ]; then 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 - doppler="${14}" - if [ "${14}" = "sim" ] ; then - echo "Simulated Doppler frequency shift mode enabled" - elif [ "${14}" = "rig" ] ; then - echo "rigctld Doppler frequency shift mode enabled" - else - echo "Doppler frequency shift is OFF" - fi - - echo - -# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14} + if [ -z "$param2" ] ; then - echo "Do you want Doppler frequency shift ON (y/n) " - read sim - echo + doppler="${14}" - if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then - doppler="yes" - echo "Do you want simulated Doppler shift or rigctld Doppler (sim/rig)" - read doppler - - if [ "$doppler" = "sim" ] ; then + if [ "${14}" = "sim" ] ; then echo "Simulated Doppler frequency shift mode enabled" - elif [ "$doppler" = "rig" ] ; then + elif [ "${14}" = "rig" ] ; then echo "rigctld Doppler frequency shift mode enabled" + else + echo "Doppler frequency shift 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 "Do you want simulated Doppler shift or rigctld Doppler (sim/rig)" + read doppler + + if [ "$doppler" = "sim" ] ; then + echo "Simulated Doppler frequency shift mode enabled" + elif [ "$doppler" = "rig" ] ; then + echo "rigctld Doppler frequency shift mode enabled" + else + doppler="no" + echo "sim or rig not entered. Doppler frequency shift is OFF" + fi else doppler="no" - echo "sim or rig not entered. Doppler frequency shift is OFF" + echo " Doppler frequency shift is OFF" fi else - doppler="no" - echo " Doppler frequency shift is OFF" + doppler="$param2" fi - + # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" # echo From 0188e64cebf53feee7080ce38f041e7e4f3f6414 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:00:06 -0400 Subject: [PATCH 1347/1744] Update config print result of -K with param --- config | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config b/config index 58bd1fbb..8e336275 100755 --- a/config +++ b/config @@ -2014,6 +2014,14 @@ elif [ "$1" = "-K" ]; then fi else doppler="$param2" + if [ "$doppler" = "sim" ] ; then + echo "Simulated Doppler frequency shift mode enabled" + elif [ "$doppler" = "rig" ] ; then + echo "Radio Control Doppler frequency shift mode enabled" + else + echo "Doppler frequency shift is OFF" + doppler="no" + fi fi # echo From d16f57d9f460c20055c77218ce9184a04e23da48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:01:31 -0400 Subject: [PATCH 1348/1744] Update config update print --- config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config b/config index 8e336275..3ed437b9 100755 --- a/config +++ b/config @@ -1967,8 +1967,7 @@ elif [ "$1" = "-k" ]; then elif [ "$1" = "-K" ]; then echo - echo "Editing the Doppler frequency shift setting in" - echo "the configuration file for CubeSatSim" + echo "Setting the Doppler frequency shift mode setting" echo value=`cat /home/pi/CubeSatSim/sim.cfg` From 39961166e28fe496f8a92d6879b589a861b77cfb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:10:16 -0400 Subject: [PATCH 1349/1744] Update config add params to -F --- config | 52 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/config b/config index 3ed437b9..e6eb5b5f 100755 --- a/config +++ b/config @@ -1191,40 +1191,54 @@ elif [ "$1" = "-F" ]; then echo "Editing the tx and rx frequency in the" echo "configuration file for CubeSatSim" echo - echo "Return keeps current value." -# echo -e "Current sim.cfg configuration file:" -# echo - + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - echo "Current value of tx is" + echo "Current value of TX frequency (MHz) is" echo $7 echo - echo "Current value of rx is" + echo "Current value of RX frequency (MHz) is" echo $8 echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} - echo "Enter tx frequency as 4XX.XXXX: " - read tx + if [ -z "$param2" ] ; then - if [ -z $tx ] ; then + echo "Return keeps current value." + + echo "Enter TX frequency in MHz (2m or 70cm band): " + read tx + + if [ -z $tx ] ; then + + tx="$7" + echo "Keeping value of" $tx + fi + + echo "Enter RX frequency in MHz (70cm band only): " + read rx + + if [ -z $rx ] ; then + + rx="$8" + echo "Keeping RX value of" $rx + fi - tx="$7" - echo "Keeping value of" $tx + else + tx="$param2"` + echo "Changing TX frequency to (MHz)" $tx + if [ -z "$param3" ] ; then + rx="$8" + echo "Keeping RX value of" $rx + else + rx="$param3" + echo "Changing TX frequency to (MHz)" $rx + fi fi - echo "Enter rx frequency as 4XX.XXXX: " - read rx - - if [ -z $rx ] ; then - - rx="$8" - echo "Keeping value of" $rx - 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} ${14} From 7574c386bc1154318ea5adecafc9197988356274 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:12:07 -0400 Subject: [PATCH 1350/1744] Update config stray ' --- config | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/config b/config index e6eb5b5f..256fc260 100755 --- a/config +++ b/config @@ -1188,8 +1188,7 @@ elif [ "$1" = "-P" ]; then elif [ "$1" = "-F" ]; then echo - echo "Editing the tx and rx frequency in the" - echo "configuration file for CubeSatSim" + echo "Editing the RX and RX frequency" echo value=`cat /home/pi/CubeSatSim/sim.cfg` @@ -1228,7 +1227,7 @@ elif [ "$1" = "-F" ]; then fi else - tx="$param2"` + tx="$param2" echo "Changing TX frequency to (MHz)" $tx if [ -z "$param3" ] ; then rx="$8" From 61019e41ae0a8a31a971716d4519186993f416c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:14:10 -0400 Subject: [PATCH 1351/1744] Update config change -F print --- config | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config b/config index 256fc260..9d4e7245 100755 --- a/config +++ b/config @@ -1195,11 +1195,9 @@ elif [ "$1" = "-F" ]; then echo "$value" > /dev/null set -- $value - echo "Current value of TX frequency (MHz) is" - echo $7 + echo "Current value of TX frequency (MHz) is" $7 echo - echo "Current value of RX frequency (MHz) is" - echo $8 + echo "Current value of RX frequency (MHz) is" $8 echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} From 24f74c6d00255f91a14d88a536afdeffbc531f56 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:15:32 -0400 Subject: [PATCH 1352/1744] Update config add MHz after --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 9d4e7245..92f9ef53 100755 --- a/config +++ b/config @@ -1221,18 +1221,18 @@ elif [ "$1" = "-F" ]; then if [ -z $rx ] ; then rx="$8" - echo "Keeping RX value of" $rx + echo "Keeping RX value of" $rx "MHz" fi else tx="$param2" - echo "Changing TX frequency to (MHz)" $tx + echo "Changing TX frequency to " $tx "MHz" if [ -z "$param3" ] ; then rx="$8" echo "Keeping RX value of" $rx else rx="$param3" - echo "Changing TX frequency to (MHz)" $rx + echo "Changing TX frequency to" $rx "MHz" fi fi From a92c545a58d0ed96a2c4ad959768aff1a88ee4a5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:17:09 -0400 Subject: [PATCH 1353/1744] Update config cleanup -F prints --- config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index 92f9ef53..e4fb329d 100755 --- a/config +++ b/config @@ -1195,9 +1195,9 @@ elif [ "$1" = "-F" ]; then echo "$value" > /dev/null set -- $value - echo "Current value of TX frequency (MHz) is" $7 + echo "Current value of TX frequency is" $7 "MHz" echo - echo "Current value of RX frequency (MHz) is" $8 + echo "Current value of RX frequency is" $8"MHz" echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} @@ -1226,13 +1226,13 @@ elif [ "$1" = "-F" ]; then else tx="$param2" - echo "Changing TX frequency to " $tx "MHz" + echo "Changing TX frequency to" $tx "MHz" if [ -z "$param3" ] ; then rx="$8" echo "Keeping RX value of" $rx else rx="$param3" - echo "Changing TX frequency to" $rx "MHz" + echo "Changing RX frequency to" $rx "MHz" fi fi From 5dc16924e731a5bc7446f36b945d37e49b7989c5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:19:06 -0400 Subject: [PATCH 1354/1744] Update config complete -F with params --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index e4fb329d..bf426b65 100755 --- a/config +++ b/config @@ -1197,7 +1197,7 @@ elif [ "$1" = "-F" ]; then echo "Current value of TX frequency is" $7 "MHz" echo - echo "Current value of RX frequency is" $8"MHz" + echo "Current value of RX frequency is" $8 "MHz" echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} @@ -1212,7 +1212,7 @@ elif [ "$1" = "-F" ]; then if [ -z $tx ] ; then tx="$7" - echo "Keeping value of" $tx + echo "Keeping value of" $tx "MHz" fi echo "Enter RX frequency in MHz (70cm band only): " @@ -1229,7 +1229,7 @@ elif [ "$1" = "-F" ]; then echo "Changing TX frequency to" $tx "MHz" if [ -z "$param3" ] ; then rx="$8" - echo "Keeping RX value of" $rx + echo "Keeping RX value of" $rx "MHz" else rx="$param3" echo "Changing RX frequency to" $rx "MHz" From 4d2ed6220d15fb9a24365fc57c6b4f19faa63690 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 18:55:40 -0400 Subject: [PATCH 1355/1744] Update config -c with param --- config | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/config b/config index bf426b65..efbfb19c 100755 --- a/config +++ b/config @@ -599,10 +599,10 @@ elif [ "$1" = "-t" ]; then elif [ "$1" = "-c" ]; then echo - echo "Editing the CALLSIGN in the" + echo "Setting the CALLSIGN in the" echo "configuration file for CubeSatSim" echo - echo "Return keeps current value." + # echo -e "Current sim.cfg configuration file:" # echo @@ -618,11 +618,18 @@ elif [ "$1" = "-c" ]; then # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14} - echo "Enter callsign in all capitals: " - read callsign + if [ -z "$param2" ] ; then - if [ -z $callsign ] ; then + echo "Return keeps current value." + + echo "Enter callsign in all capitals: " + read callsign + else + callsign="$param2" + fi + + if [ -z $callsign ] ; then callsign="$1" echo "Keeping value of" $callsign norestart=1 @@ -633,7 +640,7 @@ elif [ "$1" = "-c" ]; then 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 echo else From e646e618c5a348c74592b5e9ac3790e4ac26b3f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 19:00:36 -0400 Subject: [PATCH 1356/1744] Update config fix -c --- config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index efbfb19c..dbbaae6e 100755 --- a/config +++ b/config @@ -139,9 +139,10 @@ param4=$4 sudo modprobe snd-aloop -# if [ "$2" = "-n" ] ; then -if [ -z "$2" ] ; then +if [ "$2" = "-n" ] ; then +# if [ -z "$2" ] ; then noreboot=0 + param2="" else if [ "$2" = "-n" ] ; then echo "Reboot disabled" @@ -599,8 +600,7 @@ elif [ "$1" = "-t" ]; then elif [ "$1" = "-c" ]; then echo - echo "Setting the CALLSIGN in the" - echo "configuration file for CubeSatSim" + echo "Setting the CALLSIGN" echo # echo -e "Current sim.cfg configuration file:" From 0509073dcbc6f402f30bbb6b192d7336b7a01f31 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 19:05:08 -0400 Subject: [PATCH 1357/1744] Update config -c restart --- config | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/config b/config index dbbaae6e..eb21fb9e 100755 --- a/config +++ b/config @@ -632,25 +632,13 @@ elif [ "$1" = "-c" ]; then if [ -z $callsign ] ; then callsign="$1" echo "Keeping value of" $callsign - norestart=1 else - + restart=1 echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" 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 - echo - else - echo -## echo "Rebooting CubeSatSim with new configuration file" -## echo - reboot=1 -## sudo reboot now -# sudo systemctl restart cubesatsim - fi elif [ "$1" = "-r" ]; then From 56a366ab16003b7cf4e63ab3e0d57d1a4369affb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 19:08:00 -0400 Subject: [PATCH 1358/1744] Update config print is on same line --- config | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/config b/config index eb21fb9e..34d1121d 100755 --- a/config +++ b/config @@ -612,8 +612,7 @@ elif [ "$1" = "-c" ]; then oldcallsign="$1" - echo "Current value of CALLSIGN is" - echo $oldcallsign + echo "Current value of CALLSIGN is" $oldcallsign echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14} @@ -655,8 +654,7 @@ elif [ "$1" = "-r" ]; then set -- $value echo - echo "Current value of Reset Count is" - echo $2 + echo "Current value of Reset Count is" $2 echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} @@ -710,8 +708,7 @@ elif [ "$1" = "-l" ]; then set -- $value echo - echo "Current value of latitude is" - echo $3 + echo "Current value of latitude is" $3 echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} @@ -734,8 +731,7 @@ elif [ "$1" = "-l" ]; then fi echo - echo "Current value of longitude is" - echo $4 + echo "Current value of longitude is" $4 echo echo -e "Enter longitude (decimal degrees, positive is east): " @@ -1064,8 +1060,7 @@ elif [ "$1" = "-q" ]; then set -- $value echo - echo "Current value of squelch is" - echo $6 + echo "Current value of squelch is" $6 echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} @@ -1121,10 +1116,8 @@ elif [ "$1" = "-P" ]; then set -- $value echo - echo "Current value of RX PL is" - echo ${10} - echo "Current value of TX PL is" - echo ${11} + echo "Current value of RX PL is" ${10} + echo "Current value of TX PL is" ${11} echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} From 18108d7f6d5bc8fa628f9ac4867ebf663adb4630 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 19:16:50 -0400 Subject: [PATCH 1359/1744] Update config -l add params --- config | 71 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 41 insertions(+), 30 deletions(-) diff --git a/config b/config index 34d1121d..41a91dda 100755 --- a/config +++ b/config @@ -699,7 +699,6 @@ elif [ "$1" = "-l" ]; then echo "configuration file for CubeSatSim" echo "(Only used for APRS telemetry)" echo - echo "Return keeps current value." # echo -e "Current sim.cfg configuration file:" # echo @@ -713,42 +712,59 @@ elif [ "$1" = "-l" ]; then # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} - echo -e "Enter latitude (decimal degrees, positive is north): " + if [ -z "$param2" ] ; then - read lat + echo "Return keeps current value." + echo + echo -e "Enter latitude (decimal degrees, positive is north): " + + read lat + + if [ -z $lat ] ; then + + lat="$3" + echo "Keeping value of" $lat + fi + + echo + echo "Current value of longitude is" $4 + echo + + echo -e "Enter longitude (decimal degrees, positive is east): " + + read long + + if [ -z $long ] ; then + + long="$4" + echo "Keeping value of" $long + fi - if [ -z $lat ] ; then - lat="$3" - echo "Keeping value of" $lat + else + lat="$param2" + echo "Changing Latitude to" $lat + if [ -z "$param3" ] ; then + lon="$3" + echo "Keeping Longitude of" $lon + else + long="$param3" + echo "Changing Longitude to" $long + fi fi - if ! [[ $lat =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + if ! [[ $long =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then echo "Error: not a number!" - lat="$3" - echo "Keeping value of" $lat - fi - - echo - echo "Current value of longitude is" $4 - echo - - echo -e "Enter longitude (decimal degrees, positive is east): " - - read long - - if [ -z $long ] ; then - long="$4" echo "Keeping value of" $long - fi + fi - if ! [[ $long =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + if ! [[ $lat =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then echo "Error: not a number!" - long="$4" - echo "Keeping value of" $long + lat="$3" + echo "Keeping value of" $lat fi echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" @@ -758,12 +774,7 @@ elif [ "$1" = "-l" ]; then if [ "$norestart" = "1" ]; then echo else -## echo -## echo "Rebooting CubeSatSim with new configuration file" -## echo reboot=1 -## sudo reboot now -# sudo systemctl restart cubesatsim fi elif [ "$1" = "-S" ]; then From 7886061135a8cf48f7429eb4961f79eed0244f45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 22:36:39 -0400 Subject: [PATCH 1360/1744] Create config.yaml --- OliveTin/config.yaml | 77 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 OliveTin/config.yaml diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml new file mode 100644 index 00000000..24e5b35c --- /dev/null +++ b/OliveTin/config.yaml @@ -0,0 +1,77 @@ +actions: + - title: "Change Mode to APRS" + shell: /home/pi/CubeSatSim/config -a + onclick: execution-dialog + + - title: "Show Config" + shell: /home/pi/CubeSatSim/config + onclick: execution-dialog + + - title: echo a message + icon: smile + shell: echo {{ message }} + arguments: + - name: message + default: Hello World + type: ascii_sentence + onclick: execution-dialog + + - title: Save text to file + shell: echo "$CONTENT" > file.txt + arguments: + - name: content + type: ascii_sentence + onclick: execution-dialog + + - title: "Change Mode to Battery Saver" + shell: bash -c "/home/pi/CubeSatSim/config -B <<< y" + onclick: execution-dialog + + - title: "Turn Doppler Mode OFF" + shell: /home/pi/CubeSatSim/config -K no + onclick: execution-dialog + + - title: "Turn Simulated Doppler Mode ON" + shell: /home/pi/CubeSatSim/config -K sim + onclick: execution-dialog + + - title: "Turn Radio Control Dppler Mode ON" + shell: /home/pi/CubeSatSim/config -K rig + onclick: execution-dialog + + - title: "Change TX and RX Frequency" + icon: smile + shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} + onclick: execution-dialog + arguments: + - name: tx + type: ascii_sentence + - name: rx + type: ascii_sentence + + - title: "Change Callsign" + icon: smile + shell: /home/pi/CubeSatSim/config -c {{ callsign }} + onclick: execution-dialog + arguments: + - name: callsign + type: ascii_sentence + + - title: "Change Latitude and Longitude" + icon: smile + shell: /home/pi/CubeSatSim/config -l {{ lat }} {{ lon }} + onclick: execution-dialog + arguments: + - name: lat + type: ascii_sentence + - name: lon + type: ascii_sentence + + - title: "Generic Config Command" + icon: smile + shell: /home/pi/CubeSatSim/config {{ params }} + onclick: execution-dialog + arguments: + - name: params + type: ascii_sentence + From bdfe828ceb6c8feaca044f3fb65c8b41dba20198 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 22:43:11 -0400 Subject: [PATCH 1361/1744] Update install OliveTin and config.yaml --- install | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install b/install index 9dd12e3d..b84dcf38 100755 --- a/install +++ b/install @@ -741,6 +741,23 @@ else FLAG=1 fi +FILE=/etc/OliveTin/config.yaml +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/OliveTin/config.yaml /etc/OliveTin/config.yaml) ]]; then + echo "changed config.yaml" + sudo cp /home/pi/CubeSatSim/OliveTin/config.yaml /etc/OliveTin/config.yaml + else + echo "no change to config.yaml" + fi +else + echo "creating config.yaml" + cd /tmp + wget https://github.com/OliveTin/OliveTin/releases/download/3000.18.1/OliveTin_linux_armv7.deb + sudo dpkg -i OliveTin_linux_armv7.deb + sudo cp /home/pi/CubeSatSim/OliveTin/config.yaml /etc/OliveTin/config.yaml + sudo systemctl enable --now OliveTin +fi + FILE=/etc/asound.conf if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/asound.conf /etc/asound.conf) ]]; then From 716156911347291084c782897408a67bac7b2be2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 22:48:29 -0400 Subject: [PATCH 1362/1744] Update config.yaml add more buttons --- OliveTin/config.yaml | 61 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 47 insertions(+), 14 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 24e5b35c..c5e89033 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,26 +1,43 @@ actions: + + - title: "Show CubeSatSim Config" + shell: /home/pi/CubeSatSim/config + onclick: execution-dialog + - title: "Change Mode to APRS" shell: /home/pi/CubeSatSim/config -a onclick: execution-dialog - - title: "Show Config" - shell: /home/pi/CubeSatSim/config + - title: "Change Mode to FSK" + shell: /home/pi/CubeSatSim/config -f onclick: execution-dialog - - title: echo a message - icon: smile - shell: echo {{ message }} - arguments: - - name: message - default: Hello World - type: ascii_sentence + - title: "Change Mode to BPSK" + shell: /home/pi/CubeSatSim/config -b onclick: execution-dialog - - title: Save text to file - shell: echo "$CONTENT" > file.txt - arguments: - - name: content - type: ascii_sentence + - title: "Change Mode to SSTV" + shell: /home/pi/CubeSatSim/config -s + onclick: execution-dialog + + - title: "Change Mode to CW" + shell: /home/pi/CubeSatSim/config -m + onclick: execution-dialog + + - title: "Change Mode to Repeater" + shell: /home/pi/CubeSatSim/config -e + onclick: execution-dialog + + - title: "Change Mode to FUNcube" + shell: /home/pi/CubeSatSim/config -j + onclick: execution-dialog + + - title: "Change Mode to Pacsat" + shell: /home/pi/CubeSatSim/config -G + onclick: execution-dialog + + - title: "Change Mode to Pacsat Ground" + shell: /home/pi/CubeSatSim/config -I onclick: execution-dialog - title: "Change Mode to Battery Saver" @@ -75,3 +92,19 @@ actions: - name: params type: ascii_sentence + - title: "Generic Bash Command" + icon: smile + shell: {{ params }} + onclick: execution-dialog + arguments: + - name: params + type: ascii_sentence + + - title: "Generic Sudo Command" + icon: smile + shell: sudo {{ params }} + onclick: execution-dialog + arguments: + - name: params + type: ascii_sentence + From 191c75431e5688a58a439fc9d73ccbde7de73f2f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 22:52:24 -0400 Subject: [PATCH 1363/1744] Update log add -o for OliveTan --- log | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/log b/log index 8963b64f..ed19ccc3 100755 --- a/log +++ b/log @@ -11,6 +11,7 @@ if [ "$1" = "-h" ] ; then echo " -r frequency control" echo " -f frequency display" echo " -b pushbutton" + echo " -o OliveTin" echo "Default is the log is dumpted to the screen and written to a file." echo "If an additional r is included, the log is realtime, and exits with a Control-C" echo @@ -51,7 +52,8 @@ if [ "$REALTIME" = "1" ] ; then done elif [ "$1" = "-b" ]; then sudo journalctl -b all -af -u pushbutton # > /home/pi/CubeSatSim/logb.txt - cat /home/pi/CubeSatSim/logb.txt + elif [ "$1" = "-o" ]; then + sudo journalctl -b all -af -u OliveTin # > /home/pi/CubeSatSim/logb.txt else sudo journalctl -b all -af -u cubesatsim # > /home/pi/CubeSatSim/log.txt # cat /home/pi/CubeSatSim/log.txt @@ -83,7 +85,10 @@ else sudo journalctl -b all -a -u pushbutton > /home/pi/CubeSatSim/logb.txt cat /home/pi/CubeSatSim/logb.txt echo -e "\nPushbutton Log file also saved as /home/pi/CubeSatSim/logb.txt" - + elif [ "$1" = "-o" ]; then + sudo journalctl -b all -a -u OliveTin > /home/pi/CubeSatSim/logo.txt + cat /home/pi/CubeSatSim/logo.txt + echo -e "\nOliveTin Log file also saved as /home/pi/CubeSatSim/logo.txt" else sudo journalctl -b all -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt From a909a51dbdfd11948b56444ec5433cab5ff9c345 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 22:58:07 -0400 Subject: [PATCH 1364/1744] Update config.yaml remove extra blank line --- OliveTin/config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index c5e89033..de8d6e99 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,5 +1,4 @@ actions: - - title: "Show CubeSatSim Config" shell: /home/pi/CubeSatSim/config onclick: execution-dialog From 017afe682c67ca88b57d0148bc6e9c525bbe051c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 23:30:55 -0400 Subject: [PATCH 1365/1744] fix config.yml --- OliveTin/config.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index de8d6e99..7e167264 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,4 +1,9 @@ actions: + - title: Say Hello + shell: echo "Hello World!" + icon: smile + onclick: execution-dialog + - title: "Show CubeSatSim Config" shell: /home/pi/CubeSatSim/config onclick: execution-dialog @@ -91,19 +96,10 @@ actions: - name: params type: ascii_sentence - - title: "Generic Bash Command" - icon: smile - shell: {{ params }} - onclick: execution-dialog - arguments: - - name: params - type: ascii_sentence - - - title: "Generic Sudo Command" + - title: "Generic Sudo Command" icon: smile shell: sudo {{ params }} onclick: execution-dialog arguments: - name: params type: ascii_sentence - From 9b081c8a514a9f1c6481ef7c76f49cbdb9e78b1b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 23:35:32 -0400 Subject: [PATCH 1366/1744] Update config.yaml log --- OliveTin/config.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 7e167264..9ff93f9f 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -103,3 +103,12 @@ actions: arguments: - name: params type: ascii_sentence + + - title: "Show CubeSatSim Log Realtime" + shell: /home/pi/CubeSatSim/log -c r + onclick: execution-dialog + + - title: "Show CubeSatSim Log" + shell: /home/pi/CubeSatSim/log -c + onclick: execution-dialog + From 8ef59663111d3bad9da11ab48b8f0120cb9326d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 23:38:05 -0400 Subject: [PATCH 1367/1744] Update config.yaml more logs --- OliveTin/config.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 9ff93f9f..fb419a3c 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -105,10 +105,17 @@ actions: type: ascii_sentence - title: "Show CubeSatSim Log Realtime" - shell: /home/pi/CubeSatSim/log -c r + shell: /home/pi/CubeSatSim/log -d r onclick: execution-dialog - title: "Show CubeSatSim Log" - shell: /home/pi/CubeSatSim/log -c + shell: /home/pi/CubeSatSim/log -d onclick: execution-dialog + - title: "Show Command and ControlLog Realtime" + shell: /home/pi/CubeSatSim/log -c r + onclick: execution-dialog + + - title: "Show Command and Control Log" + shell: /home/pi/CubeSatSim/log -c + onclick: execution-dialog From 29852c51902b29050096c7b9e01a9572d94ce3d4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 23:39:54 -0400 Subject: [PATCH 1368/1744] Update config.yaml add 60 second timeout for realtime log --- OliveTin/config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index fb419a3c..be1b5ca8 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -107,7 +107,8 @@ actions: - title: "Show CubeSatSim Log Realtime" shell: /home/pi/CubeSatSim/log -d r onclick: execution-dialog - + timeout: 60 + - title: "Show CubeSatSim Log" shell: /home/pi/CubeSatSim/log -d onclick: execution-dialog @@ -115,6 +116,7 @@ actions: - title: "Show Command and ControlLog Realtime" shell: /home/pi/CubeSatSim/log -c r onclick: execution-dialog + timeout: 60 - title: "Show Command and Control Log" shell: /home/pi/CubeSatSim/log -c From 19dfc93116c02b0463951bdcc876ba9db6083f48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 31 Jul 2026 23:54:09 -0400 Subject: [PATCH 1369/1744] Update config.yaml add folders --- OliveTin/config.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index be1b5ca8..6db2da7d 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -121,3 +121,22 @@ actions: - title: "Show Command and Control Log" shell: /home/pi/CubeSatSim/log -c onclick: execution-dialog + +dashboards: + - title: CubeSatSim Dashboard + contents: + - title: Fieldset 1 + type: fieldset + contents: + - title: Mode Changes + contents: + - title: "Change Mode to APRS" + - title: "Change Mode to FSK" + + - title: Config + contents: + - title: "Change Mode to CW" + + - title: Settings + contents: + - title: "Change Mode to FUNcube" From 851dc44fa476b89601824c82ba933a436415a737 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:02:14 -0400 Subject: [PATCH 1370/1744] Update config.yaml add dashboard --- OliveTin/config.yaml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 6db2da7d..4f464a16 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -40,7 +40,7 @@ actions: shell: /home/pi/CubeSatSim/config -G onclick: execution-dialog - - title: "Change Mode to Pacsat Ground" + - title: "Change Mode to Pacsat Ground Station" shell: /home/pi/CubeSatSim/config -I onclick: execution-dialog @@ -125,18 +125,21 @@ actions: dashboards: - title: CubeSatSim Dashboard contents: - - title: Fieldset 1 - type: fieldset + - title: "Show CubeSatSim Config" + - title: Mode Changes contents: - - title: Mode Changes - contents: - - title: "Change Mode to APRS" - - title: "Change Mode to FSK" - - - title: Config - contents: - - title: "Change Mode to CW" - - - title: Settings - contents: - - title: "Change Mode to FUNcube" + - title: "Change Mode to APRS" + - title: "Change Mode to FSK" + - title: "Change Mode to BPSK" + - title: "Change Mode to SSTV" + - title: "Change Mode to CW" + - title: "Change Mode to FUNcube" + - title: "Change Mode to Repeater" + - title: "Change Mode to Pacsat" + - title: "Change Mode to Pacsat Ground Station" + - title: Settings + contents: + - title: "Change Mode to Battery Saver" + - title: Logs + contents: + - title: "Show Command and Control Log" From 41e3ed137a9fa735685769d8bd3f68d621034fee Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:04:22 -0400 Subject: [PATCH 1371/1744] Update config.yaml --- OliveTin/config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 4f464a16..17cb9452 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -125,7 +125,9 @@ actions: dashboards: - title: CubeSatSim Dashboard contents: - - title: "Show CubeSatSim Config" + - title: Show Configuration + contents: + - title: "Show CubeSatSim Config" - title: Mode Changes contents: - title: "Change Mode to APRS" From 36f7e667ca660c364261e25c982b451104ac77db Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:08:54 -0400 Subject: [PATCH 1372/1744] Update config.yaml --- OliveTin/config.yaml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 17cb9452..0a0ea60c 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -88,22 +88,6 @@ actions: - name: lon type: ascii_sentence - - title: "Generic Config Command" - icon: smile - shell: /home/pi/CubeSatSim/config {{ params }} - onclick: execution-dialog - arguments: - - name: params - type: ascii_sentence - - - title: "Generic Sudo Command" - icon: smile - shell: sudo {{ params }} - onclick: execution-dialog - arguments: - - name: params - type: ascii_sentence - - title: "Show CubeSatSim Log Realtime" shell: /home/pi/CubeSatSim/log -d r onclick: execution-dialog @@ -139,9 +123,20 @@ dashboards: - title: "Change Mode to Repeater" - title: "Change Mode to Pacsat" - title: "Change Mode to Pacsat Ground Station" + - title: Settings contents: - title: "Change Mode to Battery Saver" + - title: "Turn Doppler Mode OFF" + - title: "Turn Simulated Doppler Mode ON" + - title: "Turn Radio Control Doppler Mode ON" + - title: "Change TX and RX Frequency" + - title: "Change Callsign" + - title: "Change Latitude and Longitude" + - title: Logs contents: + - title: "Show CubSatSim Log" + - title: "Show CubeSatSIm Log" - title: "Show Command and Control Log" + - title: "Show Command and Control Log Realtime" From e1e396df37d5baa1bb7fe5e5b671551862a349df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:10:25 -0400 Subject: [PATCH 1373/1744] Update config.yaml --- OliveTin/config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 0a0ea60c..7f046935 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -97,7 +97,7 @@ actions: shell: /home/pi/CubeSatSim/log -d onclick: execution-dialog - - title: "Show Command and ControlLog Realtime" + - title: "Show Command and Control Log Realtime" shell: /home/pi/CubeSatSim/log -c r onclick: execution-dialog timeout: 60 @@ -136,7 +136,7 @@ dashboards: - title: Logs contents: - - title: "Show CubSatSim Log" - - title: "Show CubeSatSIm Log" + - title: "Show CubeSatSim Log" + - title: "Show CubeSatSim Log Realtime" - title: "Show Command and Control Log" - title: "Show Command and Control Log Realtime" From d86173959ec943c6f581e7e9a92c2d7812f64022 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:12:16 -0400 Subject: [PATCH 1374/1744] Update config.yaml --- OliveTin/config.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 7f046935..cd0ab002 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,9 +1,4 @@ actions: - - title: Say Hello - shell: echo "Hello World!" - icon: smile - onclick: execution-dialog - - title: "Show CubeSatSim Config" shell: /home/pi/CubeSatSim/config onclick: execution-dialog From 1a0402c7c03a176cfb91cb22c4e55d4ad72df5de Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:13:11 -0400 Subject: [PATCH 1375/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index cd0ab002..c7864fa9 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -51,7 +51,7 @@ actions: shell: /home/pi/CubeSatSim/config -K sim onclick: execution-dialog - - title: "Turn Radio Control Dppler Mode ON" + - title: "Turn Radio Control Doppler Mode ON" shell: /home/pi/CubeSatSim/config -K rig onclick: execution-dialog From b4b0fce8e32ff375f95c662c86aeed52ee49df33 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:16:31 -0400 Subject: [PATCH 1376/1744] Update config.yaml --- OliveTin/config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index c7864fa9..853416fa 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -101,6 +101,14 @@ actions: shell: /home/pi/CubeSatSim/log -c onclick: execution-dialog + - title: "Restart CubeSatSim" + shell: sudo reboot now + onclick: execution-dialog + + - title: "Shutdown CubeSatSim" + shell: sudo shutdown now + onclick: execution-dialog + dashboards: - title: CubeSatSim Dashboard contents: @@ -135,3 +143,8 @@ dashboards: - title: "Show CubeSatSim Log Realtime" - title: "Show Command and Control Log" - title: "Show Command and Control Log Realtime" + + - title: Restart and Shutdown + contents: + - title: "Restart CubeSatSim" + - title: "Shutdown CubeSatSim" From e9e42fc56720e22b1a85fe1e97f1d0f9c9931169 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:18:06 -0400 Subject: [PATCH 1377/1744] Update config.yaml fix indent --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 853416fa..8c75ce94 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -105,7 +105,7 @@ actions: shell: sudo reboot now onclick: execution-dialog - - title: "Shutdown CubeSatSim" + - title: "Shutdown CubeSatSim" shell: sudo shutdown now onclick: execution-dialog From f0a3771fe104aa59e53451b2a75de67fa63ca774 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 00:19:20 -0400 Subject: [PATCH 1378/1744] Update config.yaml add echo --- OliveTin/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 8c75ce94..33495eb1 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -102,11 +102,11 @@ actions: onclick: execution-dialog - title: "Restart CubeSatSim" - shell: sudo reboot now + shell: echo "Restarting CubeSatSim now!" && sudo reboot now onclick: execution-dialog - title: "Shutdown CubeSatSim" - shell: sudo shutdown now + shell: echo "Shutting Down CubeSatSim now!" && sudo shutdown now onclick: execution-dialog dashboards: From 51496f3a294eb2b532b05ff0b8c27b8849c53d61 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:11:25 -0400 Subject: [PATCH 1379/1744] Update config.yaml --- OliveTin/config.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 33495eb1..308aff5e 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -109,6 +109,18 @@ actions: shell: echo "Shutting Down CubeSatSim now!" && sudo shutdown now onclick: execution-dialog + - title: "Restart CubeSatSim Software" + shell: /home/pi/CubeSatSim/config -i + onclick: execution-dialog + + - title: "Scan I2C Bus" + shell: /home/pi/CubeSatSim/config -S + onclick: execution-dialog + + - title: "Clear Logs and Restart" + shell: /home/pi/CubeSatSim/config -C + onclick: execution-dialog + dashboards: - title: CubeSatSim Dashboard contents: @@ -143,8 +155,14 @@ dashboards: - title: "Show CubeSatSim Log Realtime" - title: "Show Command and Control Log" - title: "Show Command and Control Log Realtime" + + - title: Diagnostics + contents: + - title: "Scan I2C Bus" - title: Restart and Shutdown contents: - title: "Restart CubeSatSim" - title: "Shutdown CubeSatSim" + - title: "Restart CubeSatSim Software" + - title: "Clear Logs and Restart" From 485c221af76d2b946e2dc024af21a35c04324a94 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:22:32 -0400 Subject: [PATCH 1380/1744] Update config.yaml --- OliveTin/config.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 308aff5e..953925d7 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -120,6 +120,26 @@ actions: - title: "Clear Logs and Restart" shell: /home/pi/CubeSatSim/config -C onclick: execution-dialog + timeout: 60 + + - title: "Read Squelch" + shell: /home/pi/CubeSatSim/config -Q + onclick: execution-dialog + timeout: 15 + + - title: "Display Payload Sensor Data" + shell: /home/pi/CubeSatSim/config -p + onclick: execution-dialog + timeout: 15 + + - title: "Display Voltage and Current Data" + shell: /home/pi/CubeSatSim/config -p + onclick: execution-dialog + timeout: 15 + + - title: "Reset the Pacsat Configuration" + shell: /home/pi/CubeSatSim/config -k + onclick: execution-dialog dashboards: - title: CubeSatSim Dashboard @@ -148,6 +168,7 @@ dashboards: - title: "Change TX and RX Frequency" - title: "Change Callsign" - title: "Change Latitude and Longitude" + - title: "Reset the Pacsat Configuration" - title: Logs contents: @@ -159,6 +180,9 @@ dashboards: - title: Diagnostics contents: - title: "Scan I2C Bus" + - title: "Read Squelch" + - title: "Display Payload Sensor Data" + - title: "Display Voltage and Current Data" - title: Restart and Shutdown contents: From 3163533c1da1d49b6de1e4997ded79acaa4604a0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:25:01 -0400 Subject: [PATCH 1381/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 953925d7..edd8dfd1 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -133,7 +133,7 @@ actions: timeout: 15 - title: "Display Voltage and Current Data" - shell: /home/pi/CubeSatSim/config -p + shell: /home/pi/CubeSatSim/config -v onclick: execution-dialog timeout: 15 From 0c9286a6cfd9de7e66dbc4fbbe76f4f796797905 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:33:31 -0400 Subject: [PATCH 1382/1744] Update config -t with param --- config | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/config b/config index 41a91dda..42bb9f89 100755 --- a/config +++ b/config @@ -553,28 +553,32 @@ elif [ "$1" = "-s" ]; then elif [ "$1" = "-t" ]; then echo - echo "Editing the Simulated Telemetry setting in" - echo "the configuration file for CubeSatSim" + echo "Setting the Simulated Telemetry setting" echo value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - if [ "$5" = "yes" ] || [ "$5" = "y" ]; then - echo "Simulated Telemetry is ON" + if [ -z "$param2" ] ; then + + if [ "$5" = "yes" ] || [ "$5" = "y" ]; then + echo "Simulated Telemetry is ON" + else + echo "Simulated Telemetry is OFF" + fi + + echo + + # $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14} + + echo "Do you want Simulated Telemetry ON (y/n) " + read sim + echo else - echo "Simulated Telemetry is OFF" + sim="$param2" fi - - echo - -# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14} - - echo "Do you want Simulated Telemetry ON (y/n) " - read sim - echo - + if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then sim="yes" echo "Simulated Telemetry is ON" @@ -583,19 +587,15 @@ elif [ "$1" = "-t" ]; then echo "Simulated Telemetry is OFF" echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures fi - + # 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} ${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 reboot=1 -## sudo reboot now -# sudo restart cubesatsim elif [ "$1" = "-c" ]; then From 3184a5335038bdad7b1724f803ac33d595638380 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:35:00 -0400 Subject: [PATCH 1383/1744] Update config.yaml --- OliveTin/config.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index edd8dfd1..4048e000 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -116,11 +116,11 @@ actions: - title: "Scan I2C Bus" shell: /home/pi/CubeSatSim/config -S onclick: execution-dialog - + timeout: 60 + - title: "Clear Logs and Restart" shell: /home/pi/CubeSatSim/config -C onclick: execution-dialog - timeout: 60 - title: "Read Squelch" shell: /home/pi/CubeSatSim/config -Q @@ -140,6 +140,14 @@ actions: - title: "Reset the Pacsat Configuration" shell: /home/pi/CubeSatSim/config -k onclick: execution-dialog + + - title: "Turning Simulated Telemetry ON" + shell: /home/pi/CubeSatSim/config -t yes + onclick: execution-dialog + + - title: "Turning Simulated Telemetry OFF" + shell: /home/pi/CubeSatSim/config -t no + onclick: execution-dialog dashboards: - title: CubeSatSim Dashboard @@ -169,6 +177,8 @@ dashboards: - title: "Change Callsign" - title: "Change Latitude and Longitude" - title: "Reset the Pacsat Configuration" + - title: "Turning Simulated Telemetry ON" + - title: "Turning Simulated Telemetry OFF" - title: Logs contents: From 4b323d084ddb81cd22546cf0678dfd32bb11d6ba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:42:54 -0400 Subject: [PATCH 1384/1744] Update config fix -M --- config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config b/config index 42bb9f89..7a8c9f2c 100755 --- a/config +++ b/config @@ -1583,10 +1583,11 @@ elif [ "$1" = "-j" ]; then elif [ "$1" = "-M" ]; then - if [ $fail ]; then - MODE=$fail - else +# if [ $fail ]; then +# MODE=$fail +# else + if [ -z "$param2" ] ; then FILE=/home/pi/CubeSatSim/failure_mode.txt if [ -f "$FILE" ]; then if [[ $(grep "\-1" $FILE) ]]; then @@ -1659,6 +1660,8 @@ elif [ "$1" = "-M" ]; then echo "Enter the failure number to set: 0 - 11" read MODE echo + else + MODE="$param2" fi if [ "$MODE" = "0" ]; then From 53735827d59b402718b305952aa19fc464164aa2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:45:39 -0400 Subject: [PATCH 1385/1744] Update config fix fail= --- config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index 7a8c9f2c..e0321693 100755 --- a/config +++ b/config @@ -147,10 +147,10 @@ else if [ "$2" = "-n" ] ; then echo "Reboot disabled" noreboot=1 - else - fail=$2 - fi - +# else +# fail=$2 +# fi +# fi # echo "No reboot" From ebbeed69e694d08967633b596fe96941af80358f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:48:23 -0400 Subject: [PATCH 1386/1744] Update config missing fi --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index e0321693..3f302a07 100755 --- a/config +++ b/config @@ -149,7 +149,7 @@ else noreboot=1 # else # fail=$2 -# fi + fi # fi From ff22275cf70ee2e8ddf3fa2b4f5030283f37a6b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:52:53 -0400 Subject: [PATCH 1387/1744] Update config fix noreboot --- config | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/config b/config index 3f302a07..562cdbb8 100755 --- a/config +++ b/config @@ -141,17 +141,22 @@ sudo modprobe snd-aloop if [ "$2" = "-n" ] ; then # if [ -z "$2" ] ; then - noreboot=0 + echo "Reboot disabled" + noreboot=1 param2="" else - if [ "$2" = "-n" ] ; then - echo "Reboot disabled" - noreboot=1 + noreboot=0 +fi + +#else +# if [ "$2" = "-n" ] ; then +# echo "Reboot disabled" +# noreboot=1 # else # fail=$2 - fi +# fi # -fi +# fi # echo "No reboot" # echo $noreboot From 99c841972181150cd81659c336ae40aadb1f6bf0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 10:58:41 -0400 Subject: [PATCH 1388/1744] Update config -H param --- config | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/config b/config index 562cdbb8..43e49279 100755 --- a/config +++ b/config @@ -1303,28 +1303,30 @@ elif [ "$1" = "-o" ]; then elif [ "$1" = "-H" ]; then # echo - echo "Editing the Balloon mode setting in" - echo "the configuration file for CubeSatSim" + echo "Setting Balloon mode" echo value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - if [ "$9" = "yes" ] || [ "$9" = "y" ]; then - echo "Balloon mode is ON" + if [ -z "$param2" ] ; then + if [ "$9" = "yes" ] || [ "$9" = "y" ]; then + echo "Balloon mode is ON" + else + echo "Balloon mode is OFF" + fi + + echo + + # 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 + echo else - echo "Balloon mode is OFF" + hab="$param2" fi - - echo - -# 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 - echo - if [ "$hab" = "y" ] || [ "$hab" = "yes" ] ; then hab="yes" echo "Balloon mode is ON" From f7d3d771c2e320ca66e7b3d937d2909a85866a22 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:00:12 -0400 Subject: [PATCH 1389/1744] Update config.yaml --- OliveTin/config.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 4048e000..d1109490 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -147,7 +147,15 @@ actions: - title: "Turning Simulated Telemetry OFF" shell: /home/pi/CubeSatSim/config -t no - onclick: execution-dialog + onclick: execution-dialog + + - title: "Turning Balloon Mode ON" + shell: /home/pi/CubeSatSim/config -H yes + onclick: execution-dialog + + - title: "Turning Balloon Mode OFF" + shell: /home/pi/CubeSatSim/config -H no + onclick: execution-dialog dashboards: - title: CubeSatSim Dashboard @@ -179,6 +187,8 @@ dashboards: - title: "Reset the Pacsat Configuration" - title: "Turning Simulated Telemetry ON" - title: "Turning Simulated Telemetry OFF" + - title: "Turning Balloon Mode ON" + - title: "Turning Balloon Mode OFF" - title: Logs contents: From de31271eecd2394d269d778c5bc864d29a484180 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:05:36 -0400 Subject: [PATCH 1390/1744] Update config.yaml add timeout: 5 --- OliveTin/config.yaml | 47 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index d1109490..16a7f523 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -2,63 +2,78 @@ actions: - title: "Show CubeSatSim Config" shell: /home/pi/CubeSatSim/config onclick: execution-dialog + timeout: 5 - title: "Change Mode to APRS" shell: /home/pi/CubeSatSim/config -a onclick: execution-dialog + timeout: 5 - title: "Change Mode to FSK" shell: /home/pi/CubeSatSim/config -f onclick: execution-dialog + timeout: 5 - title: "Change Mode to BPSK" shell: /home/pi/CubeSatSim/config -b onclick: execution-dialog + timeout: 5 - title: "Change Mode to SSTV" shell: /home/pi/CubeSatSim/config -s onclick: execution-dialog + timeout: 5 - title: "Change Mode to CW" shell: /home/pi/CubeSatSim/config -m onclick: execution-dialog + timeout: 5 - title: "Change Mode to Repeater" shell: /home/pi/CubeSatSim/config -e onclick: execution-dialog + timeout: 5 - title: "Change Mode to FUNcube" shell: /home/pi/CubeSatSim/config -j onclick: execution-dialog + timeout: 5 - title: "Change Mode to Pacsat" shell: /home/pi/CubeSatSim/config -G onclick: execution-dialog + timeout: 5 - title: "Change Mode to Pacsat Ground Station" shell: /home/pi/CubeSatSim/config -I onclick: execution-dialog + timeout: 5 - title: "Change Mode to Battery Saver" shell: bash -c "/home/pi/CubeSatSim/config -B <<< y" onclick: execution-dialog + timeout: 5 - title: "Turn Doppler Mode OFF" shell: /home/pi/CubeSatSim/config -K no onclick: execution-dialog + timeout: 5 - title: "Turn Simulated Doppler Mode ON" shell: /home/pi/CubeSatSim/config -K sim onclick: execution-dialog + timeout: 5 - title: "Turn Radio Control Doppler Mode ON" shell: /home/pi/CubeSatSim/config -K rig onclick: execution-dialog + timeout: 5 - title: "Change TX and RX Frequency" icon: smile shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} onclick: execution-dialog + timeout: 5 arguments: - name: tx type: ascii_sentence @@ -69,6 +84,7 @@ actions: icon: smile shell: /home/pi/CubeSatSim/config -c {{ callsign }} onclick: execution-dialog + timeout: 5 arguments: - name: callsign type: ascii_sentence @@ -77,6 +93,7 @@ actions: icon: smile shell: /home/pi/CubeSatSim/config -l {{ lat }} {{ lon }} onclick: execution-dialog + timeout: 5 arguments: - name: lat type: ascii_sentence @@ -86,11 +103,13 @@ actions: - title: "Show CubeSatSim Log Realtime" shell: /home/pi/CubeSatSim/log -d r onclick: execution-dialog + timeout: 5 timeout: 60 - title: "Show CubeSatSim Log" shell: /home/pi/CubeSatSim/log -d onclick: execution-dialog + timeout: 5 - title: "Show Command and Control Log Realtime" shell: /home/pi/CubeSatSim/log -c r @@ -100,18 +119,22 @@ actions: - title: "Show Command and Control Log" shell: /home/pi/CubeSatSim/log -c onclick: execution-dialog + timeout: 5 - title: "Restart CubeSatSim" shell: echo "Restarting CubeSatSim now!" && sudo reboot now - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Shutdown CubeSatSim" shell: echo "Shutting Down CubeSatSim now!" && sudo shutdown now - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Restart CubeSatSim Software" shell: /home/pi/CubeSatSim/config -i - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Scan I2C Bus" shell: /home/pi/CubeSatSim/config -S @@ -120,7 +143,8 @@ actions: - title: "Clear Logs and Restart" shell: /home/pi/CubeSatSim/config -C - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Read Squelch" shell: /home/pi/CubeSatSim/config -Q @@ -139,23 +163,28 @@ actions: - title: "Reset the Pacsat Configuration" shell: /home/pi/CubeSatSim/config -k - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Turning Simulated Telemetry ON" shell: /home/pi/CubeSatSim/config -t yes - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Turning Simulated Telemetry OFF" shell: /home/pi/CubeSatSim/config -t no - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Turning Balloon Mode ON" shell: /home/pi/CubeSatSim/config -H yes - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 - title: "Turning Balloon Mode OFF" shell: /home/pi/CubeSatSim/config -H no - onclick: execution-dialog + onclick: execution-dialog + timeout: 5 dashboards: - title: CubeSatSim Dashboard From 9ed8867bb5d62456b40ebc051db32bb673d6e6eb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:07:01 -0400 Subject: [PATCH 1391/1744] Update config.yaml extra timeout --- OliveTin/config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 16a7f523..589b11ce 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -103,7 +103,6 @@ actions: - title: "Show CubeSatSim Log Realtime" shell: /home/pi/CubeSatSim/log -d r onclick: execution-dialog - timeout: 5 timeout: 60 - title: "Show CubeSatSim Log" From 58d9b4693b63864bc0e2fa404143a145153c05da Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:17:16 -0400 Subject: [PATCH 1392/1744] Update config -T param --- config | 123 +++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 76 insertions(+), 47 deletions(-) diff --git a/config b/config index 43e49279..43252bcd 100755 --- a/config +++ b/config @@ -823,62 +823,91 @@ elif [ "$1" = "-T" ]; then echo "Change command and control state" echo - FILE=/home/pi/CubeSatSim/command_control - if [ -f "$FILE" ]; then - echo "Radio command and control is ON" - echo - echo "Do you want to turn command and control to OFF (y/n) " - read reset - echo + if [ -z "$param2" ] ; then + FILE=/home/pi/CubeSatSim/command_control + if [ -f "$FILE" ]; then + echo "Radio command and control is ON" + echo + echo "Do you want to turn command and control to OFF (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Turning command and control OFF" + sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1 + # reboot=1 + echo "restarting command and control" + sudo systemctl restart command + echo "restarting transmit" + sudo systemctl restart transmit + ## sudo reboot now + fi + + else + echo "Radio command and control is OFF" + echo + echo "Do you want to set command and control to ON (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + + if [ "$1" != "n" ] ; then + echo "Turning command and control ON" + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "RX Frequency is: " + echo -n ${8} + echo " MHz" + echo + + sudo touch /home/pi/CubeSatSim/command_control + echo "restarting command and control" + # reboot=1 + sudo systemctl restart command + echo "restarting transmit" + sudo systemctl restart transmit + ## sudo reboot now + else + echo "Can't turn on Command and control in Transmit Commands mode." + fi + fi + + fi + else + reset="$param2" if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Turning command and control ON" + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + + echo -n "RX Frequency is: " + echo -n ${8} + echo " MHz" + echo + + sudo touch /home/pi/CubeSatSim/command_control + echo "restarting command and control" + sudo systemctl restart command + echo "restarting transmit" + sudo systemctl restart transmit + else echo "Turning command and control OFF" sudo rm /home/pi/CubeSatSim/command_control > /dev/null 2>&1 -# reboot=1 echo "restarting command and control" sudo systemctl restart command echo "restarting transmit" sudo systemctl restart transmit -## sudo reboot now fi - - else - echo "Radio command and control is OFF" - echo - echo "Do you want to set command and control to ON (y/n) " - read reset - echo - - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - - value=`cat /home/pi/CubeSatSim/.mode` - echo "$value" > /dev/null - set -- $value - - if [ "$1" != "n" ] ; then - echo "Turning command and control ON" - - value=`cat /home/pi/CubeSatSim/sim.cfg` - echo "$value" > /dev/null - set -- $value - - echo -n "RX Frequency is: " - echo -n ${8} - echo " MHz" - echo - - sudo touch /home/pi/CubeSatSim/command_control - echo "restarting command and control" -# reboot=1 - sudo systemctl restart command - echo "restarting transmit" - sudo systemctl restart transmit -## sudo reboot now - else - echo "Can't turn on Command and control in Transmit Commands mode." - fi - fi - fi elif [ "$1" = "-d" ]; then From cb27f3079af2690a6fc00b55bd0b51345da90a3c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:18:02 -0400 Subject: [PATCH 1393/1744] Update config.yaml --- OliveTin/config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 589b11ce..2d092ef5 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -184,6 +184,16 @@ actions: shell: /home/pi/CubeSatSim/config -H no onclick: execution-dialog timeout: 5 + + - title: "Turning Command and Control ON" + shell: /home/pi/CubeSatSim/config -T yes + onclick: execution-dialog + timeout: 5 + + - title: "Turning BCommand and Control OFF" + shell: /home/pi/CubeSatSim/config -T no + onclick: execution-dialog + timeout: 5 dashboards: - title: CubeSatSim Dashboard From b0de709f3c80fe35847db3d61e627f7f8c380246 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:20:34 -0400 Subject: [PATCH 1394/1744] Update config.yaml --- OliveTin/config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 2d092ef5..ad109695 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -190,7 +190,7 @@ actions: onclick: execution-dialog timeout: 5 - - title: "Turning BCommand and Control OFF" + - title: "Turning Command and Control OFF" shell: /home/pi/CubeSatSim/config -T no onclick: execution-dialog timeout: 5 @@ -227,6 +227,8 @@ dashboards: - title: "Turning Simulated Telemetry OFF" - title: "Turning Balloon Mode ON" - title: "Turning Balloon Mode OFF" + - title: "Turning Command and Control ON" + - title: "Turning Command and Control OFF" - title: Logs contents: From 73ce51696ff2482f055875cda494296e56eae87b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:26:21 -0400 Subject: [PATCH 1395/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index ad109695..f11e7edf 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -70,7 +70,7 @@ actions: timeout: 5 - title: "Change TX and RX Frequency" - icon: smile + icon: ToggleOffIcon shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} onclick: execution-dialog timeout: 5 From b7bbb0c54fe8436b95d4fbde1a665805a986bf05 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:27:33 -0400 Subject: [PATCH 1396/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index f11e7edf..2545040a 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -70,7 +70,7 @@ actions: timeout: 5 - title: "Change TX and RX Frequency" - icon: ToggleOffIcon + icon: ugeicons:ToggleOffIcon shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} onclick: execution-dialog timeout: 5 From 6e63474ffca49159a7a0597207c3d8876705f954 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:28:20 -0400 Subject: [PATCH 1397/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 2545040a..f8b61f5a 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -70,7 +70,7 @@ actions: timeout: 5 - title: "Change TX and RX Frequency" - icon: ugeicons:ToggleOffIcon + icon: hugeicons:ToggleOffIcon shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} onclick: execution-dialog timeout: 5 From 359042e3f5c8e994c0d74a7623f66b268c9c50d9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:39:07 -0400 Subject: [PATCH 1398/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index f8b61f5a..75de10c3 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -70,7 +70,7 @@ actions: timeout: 5 - title: "Change TX and RX Frequency" - icon: hugeicons:ToggleOffIcon + icon: "⭕" shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} onclick: execution-dialog timeout: 5 From df169c080042ea04e4fe0f3fe3d047cde08a7cbd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:42:12 -0400 Subject: [PATCH 1399/1744] Update config.yaml --- OliveTin/config.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 75de10c3..ffe92339 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -56,11 +56,13 @@ actions: - title: "Turn Doppler Mode OFF" shell: /home/pi/CubeSatSim/config -K no + icon: "❌" onclick: execution-dialog timeout: 5 - title: "Turn Simulated Doppler Mode ON" - shell: /home/pi/CubeSatSim/config -K sim + shell: /home/pi/CubeSatSim/config -K sim + icon: "🟢" onclick: execution-dialog timeout: 5 From 1c66e0e0c2ff122e48e57aec64e85109947058bd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:44:18 -0400 Subject: [PATCH 1400/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index ffe92339..bf6d1e59 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -83,7 +83,7 @@ actions: type: ascii_sentence - title: "Change Callsign" - icon: smile + icon: "⚙" shell: /home/pi/CubeSatSim/config -c {{ callsign }} onclick: execution-dialog timeout: 5 From 81339a5d9a6463b524cbdd2d1f3be90db7e953d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:57:54 -0400 Subject: [PATCH 1401/1744] Update config -B param --- config | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/config b/config index 43252bcd..50b795c0 100755 --- a/config +++ b/config @@ -1043,24 +1043,32 @@ elif [ "$1" = "-B" ]; then echo echo "Manually setting Safe Mode (battery saver mode)" echo - - FILE=/home/pi/CubeSatSim/battery_saver - if [ -f "$FILE" ]; then - echo "Safe Mode! Battery saver mode is ON." - mode=1 - else - echo "Safe Mode is OFF." - echo "Battery saver mode is OFF." - mode=0 - fi - - echo - - echo "Do you want Safe Mode (battery saver mode) ON (y/n) " - read saver - echo -## reboot=0 + if [ -z "$param2" ] ; then + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + echo "Safe Mode! Battery saver mode is ON." + mode=1 + else + echo "Safe Mode is OFF." + echo "Battery saver mode is OFF." + mode=0 + fi + + echo + + echo "Do you want Safe Mode (battery saver mode) ON (y/n) " + read saver + echo + else + FILE=/home/pi/CubeSatSim/battery_saver + if [ -f "$FILE" ]; then + mode=1 + else + mode=0 + fi + saver="$param2" + fi if [ "$saver" = "y" ] || [ "$saver" = "yes" ] ; then if [ "$mode" = "0" ] ; then From d7947ff498317b478b6ee90f6cffaa7fbbef3883 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 11:59:14 -0400 Subject: [PATCH 1402/1744] Update config.yaml --- OliveTin/config.yaml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index bf6d1e59..d234d824 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -49,25 +49,33 @@ actions: onclick: execution-dialog timeout: 5 - - title: "Change Mode to Battery Saver" - shell: bash -c "/home/pi/CubeSatSim/config -B <<< y" + - title: "Turn Battery Saver Mode ON" + shell: bash -c "/home/pi/CubeSatSim/config -B yes" + icon: "🟢" # green ball + onclick: execution-dialog + timeout: 5 + + - title: "Turn Battery Saver Mode OFF" + shell: bash -c "/home/pi/CubeSatSim/config -B no" + icon: "❌" # red X onclick: execution-dialog timeout: 5 - title: "Turn Doppler Mode OFF" shell: /home/pi/CubeSatSim/config -K no - icon: "❌" + icon: "❌" # red X onclick: execution-dialog timeout: 5 - title: "Turn Simulated Doppler Mode ON" shell: /home/pi/CubeSatSim/config -K sim - icon: "🟢" + icon: "🟢" # green ball onclick: execution-dialog timeout: 5 - title: "Turn Radio Control Doppler Mode ON" - shell: /home/pi/CubeSatSim/config -K rig + shell: /home/pi/CubeSatSim/config -K rig + icon: "🟢" # green ball onclick: execution-dialog timeout: 5 @@ -169,31 +177,37 @@ actions: - title: "Turning Simulated Telemetry ON" shell: /home/pi/CubeSatSim/config -t yes + icon: "🟢" # green ball onclick: execution-dialog timeout: 5 - title: "Turning Simulated Telemetry OFF" shell: /home/pi/CubeSatSim/config -t no + icon: "❌" # red X onclick: execution-dialog timeout: 5 - title: "Turning Balloon Mode ON" shell: /home/pi/CubeSatSim/config -H yes + icon: "🟢" # green ball onclick: execution-dialog timeout: 5 - title: "Turning Balloon Mode OFF" shell: /home/pi/CubeSatSim/config -H no + icon: "❌" # red X onclick: execution-dialog timeout: 5 - title: "Turning Command and Control ON" shell: /home/pi/CubeSatSim/config -T yes + icon: "🟢" # green ball onclick: execution-dialog timeout: 5 - title: "Turning Command and Control OFF" shell: /home/pi/CubeSatSim/config -T no + icon: "❌" # red X onclick: execution-dialog timeout: 5 @@ -217,7 +231,8 @@ dashboards: - title: Settings contents: - - title: "Change Mode to Battery Saver" + - title: "Turn Battery Saver Mode ON" + - title: "Turn Battery Saver Mode OFF" - title: "Turn Doppler Mode OFF" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" From 76760e726d8f048382264af0cda615089c4408b4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:02:42 -0400 Subject: [PATCH 1403/1744] Update config.yaml --- OliveTin/config.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index d234d824..9b53af22 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -46,6 +46,7 @@ actions: - title: "Change Mode to Pacsat Ground Station" shell: /home/pi/CubeSatSim/config -I + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 @@ -80,7 +81,7 @@ actions: timeout: 5 - title: "Change TX and RX Frequency" - icon: "⭕" + icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} onclick: execution-dialog timeout: 5 @@ -91,7 +92,7 @@ actions: type: ascii_sentence - title: "Change Callsign" - icon: "⚙" + icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -c {{ callsign }} onclick: execution-dialog timeout: 5 @@ -100,7 +101,7 @@ actions: type: ascii_sentence - title: "Change Latitude and Longitude" - icon: smile + icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -l {{ lat }} {{ lon }} onclick: execution-dialog timeout: 5 @@ -171,6 +172,7 @@ actions: timeout: 15 - title: "Reset the Pacsat Configuration" + icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -k onclick: execution-dialog timeout: 5 From 680deeb6f89b5ac1dc272d88bfd4678eb2330322 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:05:23 -0400 Subject: [PATCH 1404/1744] Update config.yaml --- OliveTin/config.yaml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 9b53af22..392d1823 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,46 +1,55 @@ actions: - title: "Show CubeSatSim Config" - shell: /home/pi/CubeSatSim/config + shell: /home/pi/CubeSatSim/config + icon: "⚙" # gear onclick: execution-dialog timeout: 5 - title: "Change Mode to APRS" - shell: /home/pi/CubeSatSim/config -a + shell: /home/pi/CubeSatSim/config -a + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 - title: "Change Mode to FSK" - shell: /home/pi/CubeSatSim/config -f + shell: /home/pi/CubeSatSim/config -f + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 - title: "Change Mode to BPSK" - shell: /home/pi/CubeSatSim/config -b + shell: /home/pi/CubeSatSim/config -b + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 - title: "Change Mode to SSTV" - shell: /home/pi/CubeSatSim/config -s + shell: /home/pi/CubeSatSim/config -s + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 - title: "Change Mode to CW" - shell: /home/pi/CubeSatSim/config -m + shell: /home/pi/CubeSatSim/config -m + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 - title: "Change Mode to Repeater" - shell: /home/pi/CubeSatSim/config -e + shell: /home/pi/CubeSatSim/config -e + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 - title: "Change Mode to FUNcube" - shell: /home/pi/CubeSatSim/config -j + shell: /home/pi/CubeSatSim/config -j + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 - title: "Change Mode to Pacsat" - shell: /home/pi/CubeSatSim/config -G + shell: /home/pi/CubeSatSim/config -G + icon: "🛰" # satellite onclick: execution-dialog timeout: 5 @@ -113,6 +122,7 @@ actions: - title: "Show CubeSatSim Log Realtime" shell: /home/pi/CubeSatSim/log -d r + icon: logs onclick: execution-dialog timeout: 60 From 2ad77caa89272f78173956d2b6574a181d8c0299 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:09:01 -0400 Subject: [PATCH 1405/1744] Update config.yaml --- OliveTin/config.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 392d1823..c55465aa 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -128,56 +128,67 @@ actions: - title: "Show CubeSatSim Log" shell: /home/pi/CubeSatSim/log -d + icon: logs onclick: execution-dialog timeout: 5 - title: "Show Command and Control Log Realtime" shell: /home/pi/CubeSatSim/log -c r + icon: logs onclick: execution-dialog timeout: 60 - title: "Show Command and Control Log" shell: /home/pi/CubeSatSim/log -c + icon: logs onclick: execution-dialog timeout: 5 - title: "Restart CubeSatSim" shell: echo "Restarting CubeSatSim now!" && sudo reboot now + icon: restart onclick: execution-dialog timeout: 5 - title: "Shutdown CubeSatSim" shell: echo "Shutting Down CubeSatSim now!" && sudo shutdown now + icon: restart onclick: execution-dialog timeout: 5 - title: "Restart CubeSatSim Software" shell: /home/pi/CubeSatSim/config -i + icon: restart onclick: execution-dialog timeout: 5 - title: "Scan I2C Bus" shell: /home/pi/CubeSatSim/config -S + icon: restart onclick: execution-dialog timeout: 60 - title: "Clear Logs and Restart" shell: /home/pi/CubeSatSim/config -C + icon: restart onclick: execution-dialog timeout: 5 - title: "Read Squelch" shell: /home/pi/CubeSatSim/config -Q + icon: logs onclick: execution-dialog timeout: 15 - title: "Display Payload Sensor Data" shell: /home/pi/CubeSatSim/config -p + icon: logs onclick: execution-dialog timeout: 15 - title: "Display Voltage and Current Data" shell: /home/pi/CubeSatSim/config -v + icon: logs onclick: execution-dialog timeout: 15 From 2cccf2fe3237b9482e6c12dccf1fb20cb2c079b6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:10:32 -0400 Subject: [PATCH 1406/1744] Update config.yaml --- OliveTin/config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index c55465aa..a8739027 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -164,7 +164,7 @@ actions: - title: "Scan I2C Bus" shell: /home/pi/CubeSatSim/config -S - icon: restart + icon: logs onclick: execution-dialog timeout: 60 @@ -271,6 +271,7 @@ dashboards: - title: "Turning Command and Control OFF" - title: Logs + icon: logs contents: - title: "Show CubeSatSim Log" - title: "Show CubeSatSim Log Realtime" From 447d47d18a8740cb1abdbea75af1e5cfb95d5c95 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:21:26 -0400 Subject: [PATCH 1407/1744] Update config.yaml --- OliveTin/config.yaml | 111 +++++++++++++++++++++++++++++++++---------- 1 file changed, 87 insertions(+), 24 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index a8739027..7bf204e4 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -131,6 +131,66 @@ actions: icon: logs onclick: execution-dialog timeout: 5 + + - title: "Show CubeSatSim Transmit Log Realtime" + shell: /home/pi/CubeSatSim/log -t r + icon: logs + onclick: execution-dialog + timeout: 60 + + - title: "Show CubeSatSim Transmit Log" + shell: /home/pi/CubeSatSim/log -t + icon: logs + onclick: execution-dialog + timeout: 5 + + - title: "Show CubeSatSim Frequency Control Log Realtime" + shell: /home/pi/CubeSatSim/log -r r + icon: logs + onclick: execution-dialog + timeout: 60 + + - title: "Show CubeSatSim Frequency Control Log" + shell: /home/pi/CubeSatSim/log -r + icon: logs + onclick: execution-dialog + timeout: 5 + + - title: "Show CubeSatSim Frequency Display Log Realtime" + shell: /home/pi/CubeSatSim/log -f r + icon: logs + onclick: execution-dialog + timeout: 60 + + - title: "Show CubeSatSim Frequency Display Log" + shell: /home/pi/CubeSatSim/log -f + icon: logs + onclick: execution-dialog + timeout: 5 + + - title: "Show CubeSatSim Pacsat Log Realtime" + shell: /home/pi/CubeSatSim/log -p r + icon: logs + onclick: execution-dialog + timeout: 60 + + - title: "Show CubeSatSim Pacsat Log" + shell: /home/pi/CubeSatSim/log -p + icon: logs + onclick: execution-dialog + timeout: 5 + + - title: "Show CubeSatSim Pushbutton Log Realtime" + shell: /home/pi/CubeSatSim/log -b r + icon: logs + onclick: execution-dialog + timeout: 60 + + - title: "Show CubeSatSim Pushbutton Log" + shell: /home/pi/CubeSatSim/log -b + icon: logs + onclick: execution-dialog + timeout: 5 - title: "Show Command and Control Log Realtime" shell: /home/pi/CubeSatSim/log -c r @@ -198,37 +258,37 @@ actions: onclick: execution-dialog timeout: 5 - - title: "Turning Simulated Telemetry ON" + - title: "Turn Simulated Telemetry ON" shell: /home/pi/CubeSatSim/config -t yes icon: "🟢" # green ball onclick: execution-dialog timeout: 5 - - title: "Turning Simulated Telemetry OFF" + - title: "Turn Simulated Telemetry OFF" shell: /home/pi/CubeSatSim/config -t no icon: "❌" # red X onclick: execution-dialog timeout: 5 - - title: "Turning Balloon Mode ON" + - title: "Turn Balloon Mode ON" shell: /home/pi/CubeSatSim/config -H yes icon: "🟢" # green ball onclick: execution-dialog timeout: 5 - - title: "Turning Balloon Mode OFF" + - title: "Turn Balloon Mode OFF" shell: /home/pi/CubeSatSim/config -H no icon: "❌" # red X onclick: execution-dialog timeout: 5 - - title: "Turning Command and Control ON" + - title: "Turn Command and Control ON" shell: /home/pi/CubeSatSim/config -T yes icon: "🟢" # green ball onclick: execution-dialog timeout: 5 - - title: "Turning Command and Control OFF" + - title: "Turn Command and Control OFF" shell: /home/pi/CubeSatSim/config -T no icon: "❌" # red X onclick: execution-dialog @@ -254,30 +314,33 @@ dashboards: - title: Settings contents: - - title: "Turn Battery Saver Mode ON" - - title: "Turn Battery Saver Mode OFF" - - title: "Turn Doppler Mode OFF" - - title: "Turn Simulated Doppler Mode ON" - - title: "Turn Radio Control Doppler Mode ON" - - title: "Change TX and RX Frequency" - title: "Change Callsign" - title: "Change Latitude and Longitude" + - title: "Change TX and RX Frequency" - title: "Reset the Pacsat Configuration" - - title: "Turning Simulated Telemetry ON" - - title: "Turning Simulated Telemetry OFF" - - title: "Turning Balloon Mode ON" - - title: "Turning Balloon Mode OFF" - - title: "Turning Command and Control ON" - - title: "Turning Command and Control OFF" + - title: "Turn Simulated Doppler Mode ON" + - title: "Turn Radio Control Doppler Mode ON" + - title: "Turn Doppler Mode OFF" + - title: "Turn Command and Control ON" + - title: "Turn Command and Control OFF" + - title: "Turn Battery Saver Mode ON" + - title: "Turn Battery Saver Mode OFF" + - title: "Turn Simulated Telemetry ON" + - title: "Turn Simulated Telemetry OFF" + - title: "Turn Balloon Mode ON" + - title: "Turn Balloon Mode OFF" - title: Logs - icon: logs contents: - - title: "Show CubeSatSim Log" - - title: "Show CubeSatSim Log Realtime" - - title: "Show Command and Control Log" - - title: "Show Command and Control Log Realtime" - + - title: Static Logs + contents: + - title: "Show CubeSatSim Log" + - title: "Show Command and Control Log" + - title: Realtime Logs + contents: + - title: "Show CubeSatSim Log Realtime" + - title: "Show Command and Control Log Realtime" + - title: Diagnostics contents: - title: "Scan I2C Bus" From 6f396d87de9c24f0cc00b7d3e298884f072f1796 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:39:45 -0400 Subject: [PATCH 1408/1744] Update config.yaml --- OliveTin/config.yaml | 48 +++++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 7bf204e4..67417734 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -120,85 +120,85 @@ actions: - name: lon type: ascii_sentence - - title: "Show CubeSatSim Log Realtime" + - title: "Realtime CubeSatSim Log" shell: /home/pi/CubeSatSim/log -d r icon: logs onclick: execution-dialog timeout: 60 - - title: "Show CubeSatSim Log" + - title: "CubeSatSim Log" shell: /home/pi/CubeSatSim/log -d icon: logs onclick: execution-dialog timeout: 5 - - title: "Show CubeSatSim Transmit Log Realtime" + - title: "Realtime CubeSatSim Transmit Log" shell: /home/pi/CubeSatSim/log -t r icon: logs onclick: execution-dialog timeout: 60 - - title: "Show CubeSatSim Transmit Log" + - title: "CubeSatSim Transmit Log" shell: /home/pi/CubeSatSim/log -t icon: logs onclick: execution-dialog timeout: 5 - - title: "Show CubeSatSim Frequency Control Log Realtime" + - title: "Realtime CubeSatSim Frequency Control Log" shell: /home/pi/CubeSatSim/log -r r icon: logs onclick: execution-dialog timeout: 60 - - title: "Show CubeSatSim Frequency Control Log" + - title: "CubeSatSim Frequency Control Log" shell: /home/pi/CubeSatSim/log -r icon: logs onclick: execution-dialog timeout: 5 - - title: "Show CubeSatSim Frequency Display Log Realtime" + - title: "Realtime CubeSatSim Frequency Display Log" shell: /home/pi/CubeSatSim/log -f r icon: logs onclick: execution-dialog timeout: 60 - - title: "Show CubeSatSim Frequency Display Log" + - title: "CubeSatSim Frequency Display Log" shell: /home/pi/CubeSatSim/log -f icon: logs onclick: execution-dialog timeout: 5 - - title: "Show CubeSatSim Pacsat Log Realtime" + - title: "Realtime CubeSatSim Pacsat Log" shell: /home/pi/CubeSatSim/log -p r icon: logs onclick: execution-dialog timeout: 60 - - title: "Show CubeSatSim Pacsat Log" + - title: "CubeSatSim Pacsat Log" shell: /home/pi/CubeSatSim/log -p icon: logs onclick: execution-dialog timeout: 5 - - title: "Show CubeSatSim Pushbutton Log Realtime" + - title: "Realtime CubeSatSim Pushbutton Log" shell: /home/pi/CubeSatSim/log -b r icon: logs onclick: execution-dialog timeout: 60 - - title: "Show CubeSatSim Pushbutton Log" + - title: "CubeSatSim Pushbutton Log" shell: /home/pi/CubeSatSim/log -b icon: logs onclick: execution-dialog timeout: 5 - - title: "Show Command and Control Log Realtime" + - title: "Realtime Command and Control Log" shell: /home/pi/CubeSatSim/log -c r icon: logs onclick: execution-dialog timeout: 60 - - title: "Show Command and Control Log" + - title: "Command and Control Log" shell: /home/pi/CubeSatSim/log -c icon: logs onclick: execution-dialog @@ -334,12 +334,24 @@ dashboards: contents: - title: Static Logs contents: - - title: "Show CubeSatSim Log" - - title: "Show Command and Control Log" + - title: "CubeSatSim Log" + - title: "Transmit Log" + - title: "Command and Control Log" + - title: "Pacsat Log" + - title: "Frequency Control Log" + - title: "Frequency Display Log" + - title: "Pushbutton Log" + - title: "OliveTin Log" - title: Realtime Logs contents: - - title: "Show CubeSatSim Log Realtime" - - title: "Show Command and Control Log Realtime" + - title: "Realtime CubeSatSim Log" + - title: "Realtime Transmit Log" + - title: "Realtime Command and Control Log" + - title: "Realtime Pacsat Log" + - title: "Realtime Frequency Control Log" + - title: "Realtime Frequency Display Log" + - title: "Realtime Pushbutton Log" + - title: "Realtime OliveTin Log" - title: Diagnostics contents: From 8f357becde3acb6981093bf23e5fda5e2e3703a9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:43:56 -0400 Subject: [PATCH 1409/1744] Update config.yaml --- OliveTin/config.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 67417734..a2b3434e 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -126,67 +126,67 @@ actions: onclick: execution-dialog timeout: 60 - - title: "CubeSatSim Log" + - title: "Log" shell: /home/pi/CubeSatSim/log -d icon: logs onclick: execution-dialog timeout: 5 - - title: "Realtime CubeSatSim Transmit Log" + - title: "Realtime Transmit Log" shell: /home/pi/CubeSatSim/log -t r icon: logs onclick: execution-dialog timeout: 60 - - title: "CubeSatSim Transmit Log" + - title: "Transmit Log" shell: /home/pi/CubeSatSim/log -t icon: logs onclick: execution-dialog timeout: 5 - - title: "Realtime CubeSatSim Frequency Control Log" + - title: "Realtime Frequency Control Log" shell: /home/pi/CubeSatSim/log -r r icon: logs onclick: execution-dialog timeout: 60 - - title: "CubeSatSim Frequency Control Log" + - title: "Frequency Control Log" shell: /home/pi/CubeSatSim/log -r icon: logs onclick: execution-dialog timeout: 5 - - title: "Realtime CubeSatSim Frequency Display Log" + - title: "Realtime Frequency Display Log" shell: /home/pi/CubeSatSim/log -f r icon: logs onclick: execution-dialog timeout: 60 - - title: "CubeSatSim Frequency Display Log" + - title: "Frequency Display Log" shell: /home/pi/CubeSatSim/log -f icon: logs onclick: execution-dialog timeout: 5 - - title: "Realtime CubeSatSim Pacsat Log" + - title: "Realtime Pacsat Log" shell: /home/pi/CubeSatSim/log -p r icon: logs onclick: execution-dialog timeout: 60 - - title: "CubeSatSim Pacsat Log" + - title: "Pacsat Log" shell: /home/pi/CubeSatSim/log -p icon: logs onclick: execution-dialog timeout: 5 - - title: "Realtime CubeSatSim Pushbutton Log" + - title: "Realtime Pushbutton Log" shell: /home/pi/CubeSatSim/log -b r icon: logs onclick: execution-dialog timeout: 60 - - title: "CubeSatSim Pushbutton Log" + - title: "Pushbutton Log" shell: /home/pi/CubeSatSim/log -b icon: logs onclick: execution-dialog From 712ebd402f683aa710a18bd3b9bebcecf8aecb75 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 12:44:58 -0400 Subject: [PATCH 1410/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index a2b3434e..8a3cff40 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -126,7 +126,7 @@ actions: onclick: execution-dialog timeout: 60 - - title: "Log" + - title: "CubeSatSim Log" shell: /home/pi/CubeSatSim/log -d icon: logs onclick: execution-dialog From d4153abf7a1bcba2ade0b293a050d00bb11da85c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 13:51:11 -0400 Subject: [PATCH 1411/1744] Update config.yaml add navigation links --- OliveTin/config.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 8a3cff40..03ca55e4 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -366,3 +366,16 @@ dashboards: - title: "Shutdown CubeSatSim" - title: "Restart CubeSatSim Software" - title: "Clear Logs and Restart" + +additionalNavigationLinks: + - title: CubeSatSim Wiki + url: https://CubeSatSim.org/wiki + target: _blank + + - title: CubeSatSim Code + url: https://CubeSatSim.org/code + target: _blank + + - title: CubeSatSim YouTube Videos + url: https://www.youtube.com/@ku2y + target: _blank From cc00779660ecdeb94c6dd22059d27cb68ce451bd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 13:54:46 -0400 Subject: [PATCH 1412/1744] Create OliveTin.service default --- systemd/OliveTin.service | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 systemd/OliveTin.service diff --git a/systemd/OliveTin.service b/systemd/OliveTin.service new file mode 100644 index 00000000..f0c6d1b8 --- /dev/null +++ b/systemd/OliveTin.service @@ -0,0 +1,14 @@ +[Unit] +Description=OliveTin + +Requires=network-online.target +After=network-online.target +Requires=local-fs.target +After=local-fs.target + +[Service] +ExecStart=/usr/local/bin/OliveTin +Restart=always + +[Install] +WantedBy=multi-user.target From 295129f941b89013eb307563680ebdecda129729 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 13:55:24 -0400 Subject: [PATCH 1413/1744] Update OliveTin.service port 8080 --- systemd/OliveTin.service | 1 + 1 file changed, 1 insertion(+) diff --git a/systemd/OliveTin.service b/systemd/OliveTin.service index f0c6d1b8..5a99fe3e 100644 --- a/systemd/OliveTin.service +++ b/systemd/OliveTin.service @@ -9,6 +9,7 @@ After=local-fs.target [Service] ExecStart=/usr/local/bin/OliveTin Restart=always +Environment="PORT=8080" [Install] WantedBy=multi-user.target From 5d6d3fdcb009ec1646da6a6db6303f0f458646c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 13:58:10 -0400 Subject: [PATCH 1414/1744] Update config.yaml --- OliveTin/config.yaml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 03ca55e4..4c410fc6 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,3 +1,16 @@ +additionalNavigationLinks: + - title: CubeSatSim Wiki + url: https://CubeSatSim.org/wiki + target: _blank + + - title: CubeSatSim Code + url: https://CubeSatSim.org/code + target: _blank + + - title: CubeSatSim YouTube Videos + url: https://www.youtube.com/@ku2y + target: _blank + actions: - title: "Show CubeSatSim Config" shell: /home/pi/CubeSatSim/config @@ -366,16 +379,4 @@ dashboards: - title: "Shutdown CubeSatSim" - title: "Restart CubeSatSim Software" - title: "Clear Logs and Restart" - -additionalNavigationLinks: - - title: CubeSatSim Wiki - url: https://CubeSatSim.org/wiki - target: _blank - - - title: CubeSatSim Code - url: https://CubeSatSim.org/code - target: _blank - - title: CubeSatSim YouTube Videos - url: https://www.youtube.com/@ku2y - target: _blank From 29fae4256c8c07d8b98cdec2c56ef28b5c41fc7a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 14:02:28 -0400 Subject: [PATCH 1415/1744] Update install OliveTin systemd --- install | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/install b/install index b84dcf38..cad45f9a 100755 --- a/install +++ b/install @@ -746,6 +746,7 @@ if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/OliveTin/config.yaml /etc/OliveTin/config.yaml) ]]; then echo "changed config.yaml" sudo cp /home/pi/CubeSatSim/OliveTin/config.yaml /etc/OliveTin/config.yaml + sudo systemctl restart OliveTin else echo "no change to config.yaml" fi @@ -758,6 +759,23 @@ else sudo systemctl enable --now OliveTin fi +FILE=/etc/systemd/system/OliveTin.service +if [ -f "$FILE" ]; then + if [[ $(diff /home/pi/CubeSatSim/systemd/OliveTin.service /etc/systemd/system/OliveTin.service) ]]; then + echo "changed OliveTin.service." + sudo cp /home/pi/CubeSatSim/systemd/OliveTin.service /etc/systemd/system/OliveTin.service + sudo systemctl restart OliveTin + FLAG=1 + else + echo "no change to OliveTin.service." + fi +else + echo "creating OliveTin.service." + sudo cp /home/pi/CubeSatSim/systemd/OliveTin.service /etc/systemd/system/OliveTin.service + sudo systemctl enable OliveTin + FLAG=1 +fi + FILE=/etc/asound.conf if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/asound.conf /etc/asound.conf) ]]; then From 14555fc466b707c764aac6e615f1766c69306300 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 14:03:18 -0400 Subject: [PATCH 1416/1744] Update OliveTin.service port 80 --- systemd/OliveTin.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/OliveTin.service b/systemd/OliveTin.service index 5a99fe3e..60742dbe 100644 --- a/systemd/OliveTin.service +++ b/systemd/OliveTin.service @@ -9,7 +9,7 @@ After=local-fs.target [Service] ExecStart=/usr/local/bin/OliveTin Restart=always -Environment="PORT=8080" +Environment="PORT=80" [Install] WantedBy=multi-user.target From de6255d6e0cd8803b68068f38d98918782b009b4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 14:06:39 -0400 Subject: [PATCH 1417/1744] Update install daemon-reload for OliveTin --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index cad45f9a..1411f13e 100755 --- a/install +++ b/install @@ -746,6 +746,7 @@ if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/OliveTin/config.yaml /etc/OliveTin/config.yaml) ]]; then echo "changed config.yaml" sudo cp /home/pi/CubeSatSim/OliveTin/config.yaml /etc/OliveTin/config.yaml + sudo systemctl daemon-reload sudo systemctl restart OliveTin else echo "no change to config.yaml" From 76b61c8673227bce94b9c4d95a10e4a0a9890559 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 14:33:00 -0400 Subject: [PATCH 1418/1744] Update config.yaml remove navigation links --- OliveTin/config.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 4c410fc6..5824be16 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -2,6 +2,8 @@ additionalNavigationLinks: - title: CubeSatSim Wiki url: https://CubeSatSim.org/wiki target: _blank + +showNavigation: false - title: CubeSatSim Code url: https://CubeSatSim.org/code From cec59c8510582930ad62ac9bdc18cc26df80bfda Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 15:49:35 -0400 Subject: [PATCH 1419/1744] Update config.yaml change order --- OliveTin/config.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 5824be16..44e97406 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,10 +1,9 @@ +showNavigation: false additionalNavigationLinks: - title: CubeSatSim Wiki url: https://CubeSatSim.org/wiki target: _blank - -showNavigation: false - + - title: CubeSatSim Code url: https://CubeSatSim.org/code target: _blank From 608d51d5147128974506058259a12836de30c298 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:05:37 -0400 Subject: [PATCH 1420/1744] Update config.yaml general command --- OliveTin/config.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 44e97406..aecc1426 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -18,6 +18,21 @@ actions: icon: "⚙" # gear onclick: execution-dialog timeout: 5 + + - title: "Show All Commands" + shell: /home/pi/CubeSatSim/config -h + icon: "⚙" # gear + onclick: execution-dialog + timeout: 5 + + - title: "General CubeSatSim Config" + shell: /home/pi/CubeSatSim/config {{ config }} + icon: "⚙" # gear + onclick: execution-dialog + timeout: 5 + arguments: + - name: config + type: ascii_sentence - title: "Change Mode to APRS" shell: /home/pi/CubeSatSim/config -a @@ -343,6 +358,8 @@ dashboards: - title: "Turn Simulated Telemetry OFF" - title: "Turn Balloon Mode ON" - title: "Turn Balloon Mode OFF" + - title: "Show All Commands" + - title: "General CubeSatSim Config" - title: Logs contents: From a9b003648317701f04f320fb550b8f52d3bd97ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:06:46 -0400 Subject: [PATCH 1421/1744] Update config.yaml fix indent --- OliveTin/config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index aecc1426..a0f89e54 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -30,9 +30,9 @@ actions: icon: "⚙" # gear onclick: execution-dialog timeout: 5 - arguments: - - name: config - type: ascii_sentence + arguments: + - name: config + type: ascii_sentence - title: "Change Mode to APRS" shell: /home/pi/CubeSatSim/config -a From e53b90313a909fc51b9ee24901f2918814ca1a53 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:12:22 -0400 Subject: [PATCH 1422/1744] Update config -r with params --- config | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/config b/config index 50b795c0..e75ddae4 100755 --- a/config +++ b/config @@ -647,10 +647,8 @@ elif [ "$1" = "-c" ]; then elif [ "$1" = "-r" ]; then echo - echo "Editing the Reset Count in the" - echo "configuration file for CubeSatSim" + echo "Set the Reset Count for FoxTelem" echo - echo "Return keeps current value." # echo -e "Current sim.cfg configuration file:" # echo @@ -664,9 +662,14 @@ elif [ "$1" = "-r" ]; then # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} - echo -e "Enter Reset Count (integer): " - - read resets + if [ -z "$param2" ] ; then + echo "Return keeps current value." + echo -e "Enter Reset Count (integer): " + read resets + else + resets="$param2" + echo "Reset Count set to" $$param2 + fi if [ -z $resets ] ; then resets="$2" @@ -689,12 +692,7 @@ elif [ "$1" = "-r" ]; then if [ "$norestart" = "1" ]; then echo else -## echo -## echo "Rebooting CubeSatSim with new configuration file" -## echo reboot=1 -## sudo reboot now -# sudo systemctl restart cubesatsim fi elif [ "$1" = "-l" ]; then From fdee941a0d9d256232373113dab85733e51d30a0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:34:54 -0400 Subject: [PATCH 1423/1744] Update config.yaml add reset count --- OliveTin/config.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index a0f89e54..35948c69 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -21,7 +21,7 @@ actions: - title: "Show All Commands" shell: /home/pi/CubeSatSim/config -h - icon: "⚙" # gear + icon: logs onclick: execution-dialog timeout: 5 @@ -322,6 +322,15 @@ actions: icon: "❌" # red X onclick: execution-dialog timeout: 5 + + - title: "Set Reset Count" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -r {{ resets }} + onclick: execution-dialog + timeout: 5 + arguments: + - name: resets + type: ascii_sentence dashboards: - title: CubeSatSim Dashboard From 0e86996504ef91b5e3d2b2a96b4916fbf585c40f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:36:28 -0400 Subject: [PATCH 1424/1744] Update config print reset count --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index e75ddae4..0c330882 100755 --- a/config +++ b/config @@ -668,7 +668,7 @@ elif [ "$1" = "-r" ]; then read resets else resets="$param2" - echo "Reset Count set to" $$param2 + echo "Reset Count set to" $param2 fi if [ -z $resets ] ; then From dcbd95f84a362e58aa3a3356d27dd620b85a4601 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:36:59 -0400 Subject: [PATCH 1425/1744] Update config.yaml --- OliveTin/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 35948c69..66454c81 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -355,6 +355,7 @@ dashboards: - title: "Change Callsign" - title: "Change Latitude and Longitude" - title: "Change TX and RX Frequency" + - title: "Set Reset Count" - title: "Reset the Pacsat Configuration" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" From 32e6d5a93b7d4480bb1596ddd531cece8ebc0152 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:47:08 -0400 Subject: [PATCH 1426/1744] Update config -d param --- config | 103 ++++++++++++++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 49 deletions(-) diff --git a/config b/config index 0c330882..fcbd172b 100755 --- a/config +++ b/config @@ -920,66 +920,71 @@ elif [ "$1" = "-d" ]; then echo "Direwolf will not run unless one is plugged in." fi - FILE=/home/pi/CubeSatSim/command_control_direwolf - if [ -f "$FILE" ]; then - echo "Radio command and control with Direwolf for DTMF and APRS is ON" - echo - echo "Do you want to turn Direwolf OFF and do Carrier command and control (y/n) " - read reset - echo - - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Command and control Direwolf set to OFF" - sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null 2>&1 -# reboot=1 -## echo "rebooting" - sudo systemctl restart command -## sudo reboot now + if [ -z "$param2" ] ; then + + FILE=/home/pi/CubeSatSim/command_control_direwolf + if [ -f "$FILE" ]; then + echo "Radio command and control with Direwolf for DTMF and APRS is ON" + echo + echo "Do you want to turn Direwolf OFF and do Carrier command and control (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Command and control Direwolf set to OFF" + sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null 2>&1 + sudo systemctl restart command + fi + + else + echo "Radio command and control with Direwolf for DTMF and APRS is OFF so carrier command and control is enabled" + echo + echo "Do you want to set command and control with Direwolf for DTMF and APRS to ON (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Command and control Direwolf set to ON" + sudo touch /home/pi/CubeSatSim/command_control_direwolf + sudo systemctl restart command + if [[ $(arecord -l | grep card) ]]; then + restart=1 + fi + fi + fi - else - echo "Radio command and control with Direwolf for DTMF and APRS is OFF so carrier command and control is enabled" - echo - echo "Do you want to set command and control with Direwolf for DTMF and APRS to ON (y/n) " - read reset - echo - + FILE=/home/pi/CubeSatSim/command_control + if [ -f "$FILE" ]; then + echo + else + echo "Radio command and control is OFF" + echo + echo "Do you want to set command and control to ON (y/n) " + read reset + echo + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "Command and control set to ON" + sudo touch /home/pi/CubeSatSim/command_control + echo "restarting command and control" + sudo systemctl restart command + fi + fi + else + reset="$param2" if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then echo "Command and control Direwolf set to ON" sudo touch /home/pi/CubeSatSim/command_control_direwolf -## echo "rebooting" -# reboot=1 sudo systemctl restart command if [[ $(arecord -l | grep card) ]]; then restart=1 -### echo "restarting cubesatsim software" -### sudo systemctl restart cubesatsim fi -## sudo reboot now - fi - - fi - - FILE=/home/pi/CubeSatSim/command_control - if [ -f "$FILE" ]; then - echo - - else - echo "Radio command and control is OFF" - echo - echo "Do you want to set command and control to ON (y/n) " - read reset - echo - - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "Command and control set to ON" - sudo touch /home/pi/CubeSatSim/command_control - echo "restarting command and control" -# reboot=1 + else + echo "Command and control Direwolf set to OFF" + sudo rm /home/pi/CubeSatSim/command_control_direwolf > /dev/null 2>&1 sudo systemctl restart command -## sudo reboot now fi - fi elif [ "$1" = "-D" ]; then From 4a7c3f3fe1ef40e34c204aa4b4aecdd27cc1910b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 16:49:29 -0400 Subject: [PATCH 1427/1744] Update config.yaml --- OliveTin/config.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 66454c81..5452ea09 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -323,6 +323,18 @@ actions: onclick: execution-dialog timeout: 5 + - title: "Turn Command and Control Direwolf ON" + shell: /home/pi/CubeSatSim/config -d yes + icon: "🟢" # green ball + onclick: execution-dialog + timeout: 5 + + - title: "Turn Command and Control Direwolf OFF" + shell: /home/pi/CubeSatSim/config -d no + icon: "❌" # red X + onclick: execution-dialog + timeout: 5 + - title: "Set Reset Count" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -r {{ resets }} @@ -362,6 +374,8 @@ dashboards: - title: "Turn Doppler Mode OFF" - title: "Turn Command and Control ON" - title: "Turn Command and Control OFF" + - title: "Turn Command and Control Direwolf ON" + - title: "Turn Command and Control Direwolf OFF" - title: "Turn Battery Saver Mode ON" - title: "Turn Battery Saver Mode OFF" - title: "Turn Simulated Telemetry ON" From 353d36713bdeb8b94aa3850720f7abdf9a39a6a8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 18:32:04 -0400 Subject: [PATCH 1428/1744] Update config -R params --- config | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/config b/config index fcbd172b..60cd61d1 100755 --- a/config +++ b/config @@ -1025,14 +1025,19 @@ elif [ "$1" = "-R" ]; then echo "Reset the Commands Count in the file command_count.txt" echo - echo "Current commands count is:" - cat /home/pi/CubeSatSim/command_count.txt - echo + if [ -z "$param2" ] ; then - echo "Do you want to reset the commands count to zero (y/n) " - read reset - echo + echo "Current commands count is:" + cat /home/pi/CubeSatSim/command_count.txt + echo + echo "Do you want to reset the commands count to zero (y/n) " + read reset + echo + else + reset="$param2" + fi + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null 2>&1 echo "Commands count reset to 0" From 60940c49545f607d76a10eb34c39b639abd37c18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 18:36:00 -0400 Subject: [PATCH 1429/1744] Update config.yaml --- OliveTin/config.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 5452ea09..d1f6e9f8 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -287,6 +287,12 @@ actions: onclick: execution-dialog timeout: 5 + - title: "Reset the Commands Count" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -R yes + onclick: execution-dialog + timeout: 5 + - title: "Turn Simulated Telemetry ON" shell: /home/pi/CubeSatSim/config -t yes icon: "🟢" # green ball @@ -335,7 +341,7 @@ actions: onclick: execution-dialog timeout: 5 - - title: "Set Reset Count" + - title: "Set FoxTelem Reset Count" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -r {{ resets }} onclick: execution-dialog @@ -367,7 +373,8 @@ dashboards: - title: "Change Callsign" - title: "Change Latitude and Longitude" - title: "Change TX and RX Frequency" - - title: "Set Reset Count" + - title: "Set FoxTelem Reset Count" + - title: "Reset the Commands Count" - title: "Reset the Pacsat Configuration" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" From 5a681613eae3881af4085936589c68052f3639f7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 18:50:13 -0400 Subject: [PATCH 1430/1744] Update config -q param --- config | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/config b/config index 60cd61d1..5e41b6f7 100755 --- a/config +++ b/config @@ -1112,32 +1112,34 @@ elif [ "$1" = "-B" ]; then elif [ "$1" = "-q" ]; then echo - echo "Editing the Squelch setting in" - echo "the configuration file for CubeSatSim" + echo "Setting the Squelch setting" echo value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - echo - echo "Current value of squelch is" $6 - echo - -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} - - echo -e "Enter squelch (integer 1 - 8): " + if [ -z "$param2" ] ; then - read sq + echo + echo "Current value of squelch is" $6 + echo + + # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} + + echo -e "Enter squelch (integer 1 - 8): " + + read sq + else + sq="$param2" + fi if [ -z $sq ] ; then - sq="$6" echo "Keeping value of" $lat fi if ! [[ $sq =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then - echo "Error: not a number!" sq="$6" echo "Keeping value of" $sq From 7411dcb2a1596932724e49ccc04beee88dc54823 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 18:53:44 -0400 Subject: [PATCH 1431/1744] Update config.yaml --- OliveTin/config.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index d1f6e9f8..73599169 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -15,7 +15,7 @@ additionalNavigationLinks: actions: - title: "Show CubeSatSim Config" shell: /home/pi/CubeSatSim/config - icon: "⚙" # gear + icon: logs onclick: execution-dialog timeout: 5 @@ -349,6 +349,15 @@ actions: arguments: - name: resets type: ascii_sentence + + - title: "Set Squelch Level" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -q {{ squelch }} + onclick: execution-dialog + timeout: 5 + arguments: + - name: squelch + type: ascii_sentence dashboards: - title: CubeSatSim Dashboard @@ -374,6 +383,7 @@ dashboards: - title: "Change Latitude and Longitude" - title: "Change TX and RX Frequency" - title: "Set FoxTelem Reset Count" + - title: "Set Squelch Level" - title: "Reset the Commands Count" - title: "Reset the Pacsat Configuration" - title: "Turn Simulated Doppler Mode ON" From 13f47845bd4a715de380bcd3d84053e2f30f723a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 19:07:19 -0400 Subject: [PATCH 1432/1744] Update config -P with params --- config | 103 ++++++++++++++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 41 deletions(-) diff --git a/config b/config index 5e41b6f7..9a4bf849 100755 --- a/config +++ b/config @@ -1170,58 +1170,79 @@ elif [ "$1" = "-Q" ]; then elif [ "$1" = "-P" ]; then echo - echo "Editing the PL (Private Line) CTCSS/CDCSS setting in" - echo "the configuration file for CubeSatSim" + echo "Setting the PL (Private Line) CTCSS/CDCSS setting" echo value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - echo - echo "Current value of RX PL is" ${10} - echo "Current value of TX PL is" ${11} - echo - -# 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-121:CDCSS (digital)" - - read rxpl - - if [ -z $rxpl ] ; then - - rxpl="${10}" - echo "Keeping value of" $rxpl - else - restart=1 - fi + if [ -z "$param2" ] ; then - if ! [[ $rxpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + echo + echo "Current value of RX PL is" ${10} + echo "Current value of TX PL is" ${11} + echo + + # 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-121:CDCSS (digital)" + + read rxpl + + if [ -z $rxpl ] ; then + + rxpl="${10}" + echo "Keeping value of" $rxpl + else + restart=1 + fi + + if ! [[ $rxpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + + echo "Error: not a number!" + rxpl="${10}" + echo "Keeping value of" $rxpl + else + restart=1 + fi + + echo -e "Enter TX PL value integer 0: None, 01-38: CTCSS (analog, 39-121:CDCSS (digital)" + + read txpl + + if [ -z $txpl ] ; then + + txpl="${11}" + echo "Keeping value of" $txpl + fi + + if ! [[ $txpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + + echo "Error: not a number!" + txpl="${11}" + echo "Keeping value of" $txpl + fi - echo "Error: not a number!" - rxpl="${10}" - echo "Keeping value of" $rxpl else - restart=1 - fi - - echo -e "Enter TX PL value integer 0: None, 01-38: CTCSS (analog, 39-121:CDCSS (digital)" - - read txpl + rxpl="$param2" - if [ -z $txpl ] ; then - - txpl="${11}" - echo "Keeping value of" $txpl + if ! [[ $rxpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + + echo "Error: not a number!" + rxpl="${10}" + echo "Keeping value of" $rxpl + else + restart=1 + fi + if [ -z "$param3" ] ; then + txpl="$param3" + if ! [[ $txpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + echo "Error: not a number!" + txpl="${11}" + echo "Keeping value of" $txpl + fi fi - - if ! [[ $txpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then - - echo "Error: not a number!" - txpl="${11}" - echo "Keeping value of" $txpl - fi # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" From 3969cb6e120d2d5bf7c9177ab1a4fc5699a1e198 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 19:10:11 -0400 Subject: [PATCH 1433/1744] Update config.yaml --- OliveTin/config.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 73599169..9665c878 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -129,6 +129,16 @@ actions: - name: rx type: ascii_sentence + - title: "Set PL (Private Line) CTCSS/CDCSS" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -P {{ pl_tx }} {{ pl_rx }} + onclick: execution-dialog + timeout: 5 + arguments: + - name: pl_tx + type: ascii_sentence + - name: pl_rx + - title: "Change Callsign" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -c {{ callsign }} @@ -263,7 +273,7 @@ actions: onclick: execution-dialog timeout: 5 - - title: "Read Squelch" + - title: "Display Squelch" shell: /home/pi/CubeSatSim/config -Q icon: logs onclick: execution-dialog @@ -384,6 +394,7 @@ dashboards: - title: "Change TX and RX Frequency" - title: "Set FoxTelem Reset Count" - title: "Set Squelch Level" + - title: "Set PL (Private Line) CTCSS/CDCSS" - title: "Reset the Commands Count" - title: "Reset the Pacsat Configuration" - title: "Turn Simulated Doppler Mode ON" @@ -428,7 +439,7 @@ dashboards: - title: Diagnostics contents: - title: "Scan I2C Bus" - - title: "Read Squelch" + - title: "Display Squelch" - title: "Display Payload Sensor Data" - title: "Display Voltage and Current Data" From 20c05ddb59e9ec95f965af9c783a76b58689880b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 19:14:17 -0400 Subject: [PATCH 1434/1744] Update config missing fi --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 9a4bf849..50640a8f 100755 --- a/config +++ b/config @@ -1242,6 +1242,7 @@ elif [ "$1" = "-P" ]; then txpl="${11}" echo "Keeping value of" $txpl fi + fi fi # echo From 3348fbb392878b149b54367829ee5eb974b9625f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 19:20:39 -0400 Subject: [PATCH 1435/1744] Update config fix PL --- config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config b/config index 50640a8f..7b0d5598 100755 --- a/config +++ b/config @@ -1226,7 +1226,7 @@ elif [ "$1" = "-P" ]; then else rxpl="$param2" - + echo "Changing RX PL to" $rxpl if ! [[ $rxpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then echo "Error: not a number!" @@ -1237,14 +1237,17 @@ elif [ "$1" = "-P" ]; then fi if [ -z "$param3" ] ; then txpl="$param3" + echo "Changing TX PL to" $txpl if ! [[ $txpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then echo "Error: not a number!" txpl="${11}" echo "Keeping value of" $txpl fi + else + fi fi - + # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" # echo From 49b42b331927f045e98a62559b21ef40c79c2f06 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 19:22:09 -0400 Subject: [PATCH 1436/1744] Update config extra else --- config | 2 -- 1 file changed, 2 deletions(-) diff --git a/config b/config index 7b0d5598..0121de33 100755 --- a/config +++ b/config @@ -1243,8 +1243,6 @@ elif [ "$1" = "-P" ]; then txpl="${11}" echo "Keeping value of" $txpl fi - else - fi fi From a0d6435d4fa6ba44405fe849ad8a28e1d8079f18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 19:23:27 -0400 Subject: [PATCH 1437/1744] Update config.yaml --- OliveTin/config.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 9665c878..e59de06a 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -131,13 +131,14 @@ actions: - title: "Set PL (Private Line) CTCSS/CDCSS" icon: "⚙" # gear - shell: /home/pi/CubeSatSim/config -P {{ pl_tx }} {{ pl_rx }} + shell: /home/pi/CubeSatSim/config -P {{ pl_rx }} {{ pl_tx }} onclick: execution-dialog timeout: 5 arguments: + - name: pl_rx + type: ascii_sentence - name: pl_tx type: ascii_sentence - - name: pl_rx - title: "Change Callsign" icon: "⚙" # gear From fc425f4c2d2aace8be669a45facb2fce628ff371 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 19:27:06 -0400 Subject: [PATCH 1438/1744] Update config param3 --- config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config b/config index 0121de33..38b7f97b 100755 --- a/config +++ b/config @@ -137,6 +137,8 @@ param2=$2 param3=$3 param4=$4 +echo "param3" $param3 + sudo modprobe snd-aloop if [ "$2" = "-n" ] ; then @@ -1243,6 +1245,9 @@ elif [ "$1" = "-P" ]; then txpl="${11}" echo "Keeping value of" $txpl fi + else + txpl="${11}" + echo "No param3" fi fi From 98b133685df9c099ed2f6e5ed9641539b73ef3aa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 20:41:30 -0400 Subject: [PATCH 1439/1744] Update config fix param3 --- config | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/config b/config index 38b7f97b..4c4c3806 100755 --- a/config +++ b/config @@ -137,8 +137,6 @@ param2=$2 param3=$3 param4=$4 -echo "param3" $param3 - sudo modprobe snd-aloop if [ "$2" = "-n" ] ; then @@ -1238,6 +1236,8 @@ elif [ "$1" = "-P" ]; then restart=1 fi if [ -z "$param3" ] ; then + txpl="${11}" + else txpl="$param3" echo "Changing TX PL to" $txpl if ! [[ $txpl =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then @@ -1245,9 +1245,6 @@ elif [ "$1" = "-P" ]; then txpl="${11}" echo "Keeping value of" $txpl fi - else - txpl="${11}" - echo "No param3" fi fi From 6d6c7123a6442754e92bf9517a063f6af3c32c39 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 20:47:03 -0400 Subject: [PATCH 1440/1744] Update config -o --- config | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/config b/config index 4c4c3806..33f6056a 100755 --- a/config +++ b/config @@ -1271,15 +1271,15 @@ elif [ "$1" = "-F" ]; then echo "$value" > /dev/null set -- $value - echo "Current value of TX frequency is" $7 "MHz" - echo - echo "Current value of RX frequency is" $8 "MHz" - echo - -# echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} - if [ -z "$param2" ] ; then + echo "Current value of TX frequency is" $7 "MHz" + echo + echo "Current value of RX frequency is" $8 "MHz" + echo + + # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} + echo "Return keeps current value." echo "Enter TX frequency in MHz (2m or 70cm band): " @@ -1352,17 +1352,17 @@ elif [ "$1" = "-o" ]; then echo echo "Change telemetry beacon transmit state" echo - + FILE=/home/pi/CubeSatSim/beacon_off if [ -f "$FILE" ]; then - echo "Transmit beacon telemetry is off" + echo "Transmit beacon telemetry is off" echo echo "Turn beacon telemetry ON" sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 sudo systemctl restart transmit else - echo "Transmit beacon telemetry is on" + echo "Transmit beacon telemetry is on" echo echo "Turn beacon telemetry OFF" From 50f57a27d63f77da058e04b37fa044ba0541d73f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 20:48:59 -0400 Subject: [PATCH 1441/1744] Update config.yaml --- OliveTin/config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index e59de06a..bebd9591 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -369,6 +369,12 @@ actions: arguments: - name: squelch type: ascii_sentence + + - title: "Change Telemetry Beacon Transmit State" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -o + onclick: execution-dialog + timeout: 5 dashboards: - title: CubeSatSim Dashboard @@ -398,6 +404,7 @@ dashboards: - title: "Set PL (Private Line) CTCSS/CDCSS" - title: "Reset the Commands Count" - title: "Reset the Pacsat Configuration" + - title: "Change Telemetry Beacon Transmit State" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" - title: "Turn Doppler Mode OFF" From 7825de8cffd4f4574e989686d9e255d1d1acbdd2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 20:52:06 -0400 Subject: [PATCH 1442/1744] Update config -L params --- config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/config b/config index 33f6056a..880746ae 100755 --- a/config +++ b/config @@ -1567,9 +1567,12 @@ elif [ "$1" = "-L" ]; then echo "Setting microphone level for command and control" echo - echo -e "Enter microphone level in percentage (integer 0 - 100): " - - read mic + if [ -z "$param2" ] ; then + echo -e "Enter microphone level in percentage (integer 0 - 100): " + read mic + else + mic="$param2" + fi if ! [ -z $mic ] && [[ $mic =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then echo "Updating mic level" From a41724676797248773937c761d835956743999ca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 20:52:37 -0400 Subject: [PATCH 1443/1744] Update config --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 880746ae..36a52b5b 100755 --- a/config +++ b/config @@ -1564,7 +1564,7 @@ elif [ "$1" = "-A" ]; then elif [ "$1" = "-L" ]; then echo - echo "Setting microphone level for command and control" + echo "Set microphone level for command and control" echo if [ -z "$param2" ] ; then From d7f7a2edb7d296658c422bba9f3cc13f56efaf45 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 20:54:24 -0400 Subject: [PATCH 1444/1744] Update config.yaml --- OliveTin/config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index bebd9591..2b7f6dda 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -370,6 +370,15 @@ actions: - name: squelch type: ascii_sentence + - title: "Set Microphone Level for Command and Control" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -L {{ mic_level }} + onclick: execution-dialog + timeout: 5 + arguments: + - name: mic_level + type: ascii_sentence + - title: "Change Telemetry Beacon Transmit State" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -o @@ -405,6 +414,7 @@ dashboards: - title: "Reset the Commands Count" - title: "Reset the Pacsat Configuration" - title: "Change Telemetry Beacon Transmit State" + - title: "Set Microphone Level for Command and Control" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" - title: "Turn Doppler Mode OFF" From 88c3a2314d4cc6e7f12a3d58c467a7061671d215 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 20:56:00 -0400 Subject: [PATCH 1445/1744] Update config --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 36a52b5b..258bc642 100755 --- a/config +++ b/config @@ -1575,7 +1575,7 @@ elif [ "$1" = "-L" ]; then fi if ! [ -z $mic ] && [[ $mic =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then - echo "Updating mic level" + echo "Updating mic level to" $mic "%" value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set Mic $mic% else echo "Not updating mic level" From 51a717f7119d92ac31ffcdecf20bbbbdbedbb1d4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:19:07 -0400 Subject: [PATCH 1446/1744] Update config simulated failure --- config | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/config b/config index 258bc642..8e7b3d78 100755 --- a/config +++ b/config @@ -1744,19 +1744,12 @@ elif [ "$1" = "-M" ]; then echo else MODE="$param2" +# echo "Setting Simulated Failure" $MODE fi if [ "$MODE" = "0" ]; then echo "Setting No Simulated Failure" MODE=-1 -# elif [ "$MODE" = "12" ]; then - -# if [ "$norestart" = "1" ]; then -# echo -# else -# reboot=1 -# fi - else case $MODE in 1) From 72553336588d118266ac079a28140fc180480c15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:21:03 -0400 Subject: [PATCH 1447/1744] Update config.yaml --- OliveTin/config.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 2b7f6dda..d91c5bb5 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -378,6 +378,15 @@ actions: arguments: - name: mic_level type: ascii_sentence + + - title: "Set Simulated Failure Mode" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -M {{ failure_mode }} + onclick: execution-dialog + timeout: 5 + arguments: + - name: failure_mode + type: ascii_sentence - title: "Change Telemetry Beacon Transmit State" icon: "⚙" # gear @@ -415,6 +424,7 @@ dashboards: - title: "Reset the Pacsat Configuration" - title: "Change Telemetry Beacon Transmit State" - title: "Set Microphone Level for Command and Control" + - title: "Set Simulated Failure Mode" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" - title: "Turn Doppler Mode OFF" @@ -425,7 +435,7 @@ dashboards: - title: "Turn Battery Saver Mode ON" - title: "Turn Battery Saver Mode OFF" - title: "Turn Simulated Telemetry ON" - - title: "Turn Simulated Telemetry OFF" + - title: "Turn Simulated Telemetry OFF" - title: "Turn Balloon Mode ON" - title: "Turn Balloon Mode OFF" - title: "Show All Commands" From e92b7f45676e1e1a351691c2fdcd771cabe244a9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:24:30 -0400 Subject: [PATCH 1448/1744] Update config rm &>/dev/null --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 8e7b3d78..0e766405 100755 --- a/config +++ b/config @@ -1794,7 +1794,7 @@ elif [ "$1" = "-M" ]; then # echo $MODE echo - sudo rm /home/pi/CubeSatSim/failure_mode.txt + sudo rm /home/pi/CubeSatSim/failure_mode.txt &>/dev/null echo $MODE > /home/pi/CubeSatSim/failure_mode.txt echo "Changing simulated failure mode to $MODE" | wall From 98c69e65532e5e62ab8c02e5ab11bd10b293a9d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:30:36 -0400 Subject: [PATCH 1449/1744] Update config -U param --- config | 88 +++++++++++++++++++++++++++++++++------------------------- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/config b/config index 0e766405..37e4edfc 100755 --- a/config +++ b/config @@ -1869,58 +1869,70 @@ elif [ "$1" = "-N" ]; then elif [ "$1" = "-U" ]; then echo - echo "Changing the Random Simulated Failure setting in" - echo "the configuration file for CubeSatSim" + echo "Changing the Random Simulated Failure setting" echo value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value - if [ "${12}" = "yes" ] || [ "${12}" = "y" ]; then - echo "Random Simulated Failure is ON" - else - echo "Random Simulated Failure is OFF" - fi - - echo - -# $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14} + if [ -z "$param2" ] ; then - echo "Do you want Random Simulated Failure ON (y/n) " - read sim - echo - - if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then - sim="yes" - echo "Random Simulated Failure is ON" - echo - echo "A new random failure is selected every" - echo ${13} "seconds." - echo - echo "Enter a new value or Return keeps current value." - - echo "Enter time in seconds (integer): " + if [ "${12}" = "yes" ] || [ "${12}" = "y" ]; then + echo "Random Simulated Failure is ON" + else + echo "Random Simulated Failure is OFF" + fi + + echo + + # $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${12} ${13} ${14} - read time + echo "Do you want Random Simulated Failure ON (y/n) " + read sim + echo + + if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then + sim="yes" + echo "Random Simulated Failure is ON" + echo + echo "A new random failure is selected every" + echo ${13} "seconds." + echo + echo "Enter a new value or Return keeps current value." + + echo "Enter time in seconds (integer): " + + read time - if [ -z $time ] ; then - time="${13}" - echo "Keeping value of " $time " seconds" - fi + if [ -z $time ] ; then + time="${13}" + echo "Keeping value of " $time " seconds" + fi + + if ! [[ $time =~ ^[0-9]+$ ]] ; then + echo "Error: not an integer!" + time="${13}" + echo "Keeping value of" $time + fi - if ! [[ $time =~ ^[0-9]+$ ]] ; then - echo "Error: not an integer!" + else + sim="no" + echo "Random Simulated Failure is OFF" time="${13}" - echo "Keeping value of" $time + # echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures fi else - sim="no" - echo "Random Simulated Failure is OFF" - time="${13}" -# echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures - fi + time="$param2" + echo "Set Random Simulated Failure Time to" $time + + if ! [[ $time =~ ^[0-9]+$ ]] ; then + echo "Error: not an integer!" + time="${13}" + echo "Keeping value of" $time + fi + fi # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" From bb420eaefd17e6d28e02dd5a2dead33369666446 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:32:11 -0400 Subject: [PATCH 1450/1744] Update config.yaml --- OliveTin/config.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index d91c5bb5..0f7557c1 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -386,7 +386,16 @@ actions: timeout: 5 arguments: - name: failure_mode - type: ascii_sentence + type: ascii_sentence + + - title: "Set Random Simulated Failure Time" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -U {{ random_time }} + onclick: execution-dialog + timeout: 5 + arguments: + - name: random_time + type: ascii_sentence - title: "Change Telemetry Beacon Transmit State" icon: "⚙" # gear @@ -425,6 +434,7 @@ dashboards: - title: "Change Telemetry Beacon Transmit State" - title: "Set Microphone Level for Command and Control" - title: "Set Simulated Failure Mode" + - title: "Set Random Simulated Failure Time" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" - title: "Turn Doppler Mode OFF" From 2acbf212f94c95542652ea5f0808ed2255abe3df Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:39:02 -0400 Subject: [PATCH 1451/1744] Update config -u params --- config | 86 ++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 29 deletions(-) diff --git a/config b/config index 37e4edfc..73933df7 100755 --- a/config +++ b/config @@ -1948,48 +1948,76 @@ elif [ "$1" = "-U" ]; then elif [ "$1" = "-u" ]; then echo - echo "Change gpsd state" + echo "Change gpsd State" echo - if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then - echo "gpsd is inactive" - echo - echo "Do you want to turn gpsd to ON (y/n) " - read reset - echo + if [ -z "$param2" ] ; then - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "gpsd set to ON" - sudo systemctl enable gpsd - sudo systemctl enable gpsd.socket + if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then + echo "gpsd is inactive" echo - echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" - echo - - cat /etc/default/gpsd - + echo "Do you want to turn gpsd to ON (y/n) " + read reset echo - echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to ON" + sudo systemctl enable gpsd + sudo systemctl enable gpsd.socket + echo + echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" + echo + + cat /etc/default/gpsd + + echo + echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + echo + echo "To monitor your gps device, use the gpsmon command." + echo + reboot=1 + fi + + else + echo "gpsd is active" echo - echo "To monitor your gps device, use the gpsmon command." + echo "Do you want to turn gpsd to OFF (y/n) " + read reset echo - reboot=1 + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to OFF" + sudo systemctl disable gpsd + sudo systemctl disable gpsd.socket + reboot=1 + fi + fi - - else - echo "gpsd is active" - echo - echo "Do you want to turn gpsd to OFF (y/n) " - read reset - echo - + else + reset="$param2" if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to ON" + sudo systemctl enable gpsd + sudo systemctl enable gpsd.socket + echo + echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" + echo + + cat /etc/default/gpsd + + echo + echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + echo + echo "To monitor your gps device, use the gpsmon command." + echo + reboot=1 + + else echo "gpsd set to OFF" sudo systemctl disable gpsd sudo systemctl disable gpsd.socket -reboot=1 + reboot=1 fi - fi elif [ "$1" = "-G" ]; then From 0f1c222e470695dcc73c2396466fce7b432a0536 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:39:52 -0400 Subject: [PATCH 1452/1744] Update config.yaml --- OliveTin/config.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 0f7557c1..86f94a10 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -328,6 +328,18 @@ actions: onclick: execution-dialog timeout: 5 + - title: "Turn gpsd ON" + shell: /home/pi/CubeSatSim/config -u yes + icon: "🟢" # green ball + onclick: execution-dialog + timeout: 5 + + - title: "Turn gpsd OFF" + shell: /home/pi/CubeSatSim/config -u no + icon: "❌" # red X + onclick: execution-dialog + timeout: 5 + - title: "Turn Command and Control ON" shell: /home/pi/CubeSatSim/config -T yes icon: "🟢" # green ball @@ -448,6 +460,8 @@ dashboards: - title: "Turn Simulated Telemetry OFF" - title: "Turn Balloon Mode ON" - title: "Turn Balloon Mode OFF" + - title: "Turn gpsd ON" + - title: "Turn gpsd OFF" - title: "Show All Commands" - title: "General CubeSatSim Config" From 2e09c2c92f075d55bd1efa8f64c050a187c99113 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 1 Aug 2026 21:43:05 -0400 Subject: [PATCH 1453/1744] Update config.yaml --- OliveTin/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 86f94a10..4b628c2c 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -332,13 +332,13 @@ actions: shell: /home/pi/CubeSatSim/config -u yes icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Turn gpsd OFF" shell: /home/pi/CubeSatSim/config -u no icon: "❌" # red X onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Turn Command and Control ON" shell: /home/pi/CubeSatSim/config -T yes From 773dca364a330c455e0f54a0721a8904a59c2269 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 10:32:27 -0400 Subject: [PATCH 1454/1744] Update config.yaml --- OliveTin/config.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 4b628c2c..bbdd3700 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -129,6 +129,17 @@ actions: - name: rx type: ascii_sentence + - title: "Connect to WiFi using SSID and Password" + icon: "⚙" # gear + shell: sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" + onclick: execution-dialog + timeout: 10 + arguments: + - name: wifi_ssid + type: ascii_sentence + - name: wifi_password + type: ascii_sentence + - title: "Set PL (Private Line) CTCSS/CDCSS" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -P {{ pl_rx }} {{ pl_tx }} From 97f8d0ded095402266fab04af503727d27860f62 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 10:40:01 -0400 Subject: [PATCH 1455/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index bbdd3700..95c4e6ce 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -131,7 +131,7 @@ actions: - title: "Connect to WiFi using SSID and Password" icon: "⚙" # gear - shell: sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" + shell: sudo nmcli device wifi rescan && sleep 1 && sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" onclick: execution-dialog timeout: 10 arguments: From e37baa9822ed861418d456c8759dc7188acd3926 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 10:52:43 -0400 Subject: [PATCH 1456/1744] Update config.yaml --- OliveTin/config.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 95c4e6ce..c551edb6 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -131,7 +131,7 @@ actions: - title: "Connect to WiFi using SSID and Password" icon: "⚙" # gear - shell: sudo nmcli device wifi rescan && sleep 1 && sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" + shell: echo "If this works, this web page won't work again until you connect to the new WiFi network!" && sudo nmcli device wifi rescan && sleep 1 && sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" onclick: execution-dialog timeout: 10 arguments: @@ -140,6 +140,15 @@ actions: - name: wifi_password type: ascii_sentence + - title: "Change Hostname and Reboot" + icon: "⚙" # gear + shell: sudo hostnamectl set-hostname {{ hostname }} && sudo reboot now + onclick: execution-dialog + timeout: 10 + arguments: + - name: hostname + type: ascii_sentence + - title: "Set PL (Private Line) CTCSS/CDCSS" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -P {{ pl_rx }} {{ pl_tx }} From d7fed536b8b169e12d161df2d9afa503fe2205f2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 11:20:25 -0400 Subject: [PATCH 1457/1744] Update config.yaml --- OliveTin/config.yaml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index c551edb6..706f53d9 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -130,8 +130,8 @@ actions: type: ascii_sentence - title: "Connect to WiFi using SSID and Password" - icon: "⚙" # gear - shell: echo "If this works, this web page won't work again until you connect to the new WiFi network!" && sudo nmcli device wifi rescan && sleep 1 && sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" + icon: "🛜" # wireless + shell: echo "If this works, this web page won't work again until you connect to the new WiFi network!" && echo && sudo nmcli device wifi rescan && sleep 1 && sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" onclick: execution-dialog timeout: 10 arguments: @@ -140,15 +140,27 @@ actions: - name: wifi_password type: ascii_sentence - - title: "Change Hostname and Reboot" - icon: "⚙" # gear - shell: sudo hostnamectl set-hostname {{ hostname }} && sudo reboot now + - title: "Change Hostname and Restart" + icon: "🛜" # wireless + shell: echo "If this works, this web page won't work again until you connect using the new host name after the restart!" && echo && sudo hostnamectl set-hostname {{ hostname }} && sudo reboot now onclick: execution-dialog timeout: 10 arguments: - name: hostname type: ascii_sentence + - title: "Show Available WiFi Networks" + icon: "🛜" # wireless + shell: sudo nmcli device wifi rescan && nmcli device wifi list + onclick: execution-dialog + timeout: 10 + + - title: "Show Network Configuration" + icon: "🛜" # wireless + shell: ifconfig + onclick: execution-dialog + timeout: 5 + - title: "Set PL (Private Line) CTCSS/CDCSS" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -P {{ pl_rx }} {{ pl_tx }} @@ -522,3 +534,11 @@ dashboards: - title: "Restart CubeSatSim Software" - title: "Clear Logs and Restart" + - title: Network Utilities + contents: + - title: "Connect to WiFi using SSID and Password" + - title: "Change Hostname and Restart" + - title: "Show Network Configuration" + - title: "Show Available WiFi Networks" + + From 1c0606bdcb486e087072ace207548b731c6677cf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 11:33:12 -0400 Subject: [PATCH 1458/1744] Update config.yaml --- OliveTin/config.yaml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 706f53d9..7d44d328 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -276,6 +276,21 @@ actions: onclick: execution-dialog timeout: 5 + - title: "Update CubeSatSim Software" + shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && /home/pi/CubeSatSim/update + icon: ⏳ + onclick: execution-dialog + timeout: 600 + + - title: "Update Software CubeSatSim to Branch" + shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && /home/pi/CubeSatSim/update {branch} + icon: ⏳ + onclick: execution-dialog + timeout: 600 + arguments: + - name: branch + type: ascii_sentence + - title: "Restart CubeSatSim" shell: echo "Restarting CubeSatSim now!" && sudo reboot now icon: restart @@ -527,15 +542,14 @@ dashboards: - title: "Display Payload Sensor Data" - title: "Display Voltage and Current Data" - - title: Restart and Shutdown + - title: Utilitites contents: + - title: "Update CubeSatSim Software" + - title: "Update CubeSatSim Software to Branch" - title: "Restart CubeSatSim" - title: "Shutdown CubeSatSim" - title: "Restart CubeSatSim Software" - title: "Clear Logs and Restart" - - - title: Network Utilities - contents: - title: "Connect to WiFi using SSID and Password" - title: "Change Hostname and Restart" - title: "Show Network Configuration" From 0de7354742d9802daf966e85a83a83056a299181 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 11:34:22 -0400 Subject: [PATCH 1459/1744] Update config.yaml --- OliveTin/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 7d44d328..98911a38 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -278,13 +278,13 @@ actions: - title: "Update CubeSatSim Software" shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && /home/pi/CubeSatSim/update - icon: ⏳ + icon: "⏳" onclick: execution-dialog timeout: 600 - title: "Update Software CubeSatSim to Branch" shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && /home/pi/CubeSatSim/update {branch} - icon: ⏳ + icon: "⏳" onclick: execution-dialog timeout: 600 arguments: From 464c490954ffbabd347c6020ea4b34fd7b58261d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 11:35:59 -0400 Subject: [PATCH 1460/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 98911a38..bf7ddef3 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -282,7 +282,7 @@ actions: onclick: execution-dialog timeout: 600 - - title: "Update Software CubeSatSim to Branch" + - title: "Update CubeSatSim Software to Branch" shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && /home/pi/CubeSatSim/update {branch} icon: "⏳" onclick: execution-dialog From e45ecca267d0ca5357bd704813e804e2ecc41c1d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 12:10:24 -0400 Subject: [PATCH 1461/1744] Update config.yaml fix pi user issue --- OliveTin/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index bf7ddef3..20af7096 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -277,13 +277,13 @@ actions: timeout: 5 - title: "Update CubeSatSim Software" - shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && /home/pi/CubeSatSim/update + shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update icon: "⏳" onclick: execution-dialog timeout: 600 - title: "Update CubeSatSim Software to Branch" - shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && /home/pi/CubeSatSim/update {branch} + shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update {branch} icon: "⏳" onclick: execution-dialog timeout: 600 From 90a557ea672b4c8067894f429e616d214c41045c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 12:14:45 -0400 Subject: [PATCH 1462/1744] Update install add reboot notes --- install | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install b/install index 1411f13e..8856bcd7 100755 --- a/install +++ b/install @@ -12,6 +12,10 @@ if [ -f "$FILE" ]; then echo -e "\nUpdate script for CubeSatSim v2.2\n" + echo "You should restart when this update completes with command:" + echo "sudo reboot now" + echo + sudo rm /home/pi/CubeSatSim/telem.wav &>/dev/null sudo rm /home/pi/CubeSatSim/t.txt &>/dev/null sudo rm /home/pi/CubeSatSim/uptime &>/dev/null @@ -36,6 +40,10 @@ else echo -e "\nInstallation script for CubeSatSim v2.2\n" + echo "You should restart when this install completes with command:" + echo "sudo reboot now" + echo + touch /home/pi/CubeSatSim/command_control_direwolf echo "creating $FILE" @@ -980,3 +988,8 @@ else echo "reboot needed for changes to take effect" | wall fi fi + +echo +echo "You should restart to complete this operation with command:" +echo "sudo reboot now" +echo From cc808ae9aa0d1f461b62faf9610b1f9b9675d6d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 12:35:26 -0400 Subject: [PATCH 1463/1744] Update config.yaml --- OliveTin/config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 20af7096..d6d3acc4 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -160,6 +160,12 @@ actions: shell: ifconfig onclick: execution-dialog timeout: 5 + + - title: "Show Audio Devices Speakers and Microphones" + icon: "🔉" # speaker + shell: aplay -l && arecord -l + onclick: execution-dialog + timeout: 5 - title: "Set PL (Private Line) CTCSS/CDCSS" icon: "⚙" # gear @@ -541,6 +547,7 @@ dashboards: - title: "Display Squelch" - title: "Display Payload Sensor Data" - title: "Display Voltage and Current Data" + - title: "List Audio Devices Speakers and Microphones" - title: Utilitites contents: From df955c7823a0991c69d8707c91a7eb82682bf31d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 12:36:28 -0400 Subject: [PATCH 1464/1744] Update config.yaml --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index d6d3acc4..06d7f50f 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -289,7 +289,7 @@ actions: timeout: 600 - title: "Update CubeSatSim Software to Branch" - shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update {branch} + shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update {{ branch }} icon: "⏳" onclick: execution-dialog timeout: 600 From 4c20cbc744eef4a5880ace18609555f8d7b65e29 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 12:39:34 -0400 Subject: [PATCH 1465/1744] Update config.yaml --- OliveTin/config.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 06d7f50f..218bacbb 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -161,11 +161,17 @@ actions: onclick: execution-dialog timeout: 5 - - title: "Show Audio Devices Speakers and Microphones" + - title: "List Audio Devices Speakers and Microphones" icon: "🔉" # speaker shell: aplay -l && arecord -l onclick: execution-dialog - timeout: 5 + timeout: 5 + + - title: "List USB Devices" + icon: "⚙" # gear + shell: lsusb + onclick: execution-dialog + timeout: 5 - title: "Set PL (Private Line) CTCSS/CDCSS" icon: "⚙" # gear @@ -548,6 +554,7 @@ dashboards: - title: "Display Payload Sensor Data" - title: "Display Voltage and Current Data" - title: "List Audio Devices Speakers and Microphones" + - title: "List USB Devices" - title: Utilitites contents: From 18ef502f9deb0b0a673339600dfb349ec2b6107a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 12:45:22 -0400 Subject: [PATCH 1466/1744] Update config.yaml --- OliveTin/config.yaml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 218bacbb..77fc4683 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -195,13 +195,13 @@ actions: - title: "Change Latitude and Longitude" icon: "⚙" # gear - shell: /home/pi/CubeSatSim/config -l {{ lat }} {{ lon }} + shell: /home/pi/CubeSatSim/config -l {{ latitude }} {{ longitude }} onclick: execution-dialog timeout: 5 arguments: - - name: lat + - name: latitude type: ascii_sentence - - name: lon + - name: longitude type: ascii_sentence - title: "Realtime CubeSatSim Log" @@ -288,6 +288,18 @@ actions: onclick: execution-dialog timeout: 5 + - title: "Realtime Web (OliveTin) Log" + shell: /home/pi/CubeSatSim/log -o r + icon: logs + onclick: execution-dialog + timeout: 60 + + - title: "Web (OliveTin) Log" + shell: /home/pi/CubeSatSim/log -o + icon: logs + onclick: execution-dialog + timeout: 5 + - title: "Update CubeSatSim Software" shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update icon: "⏳" @@ -535,7 +547,7 @@ dashboards: - title: "Frequency Control Log" - title: "Frequency Display Log" - title: "Pushbutton Log" - - title: "OliveTin Log" + - title: "Web (OliveTin) Log" - title: Realtime Logs contents: - title: "Realtime CubeSatSim Log" @@ -545,7 +557,7 @@ dashboards: - title: "Realtime Frequency Control Log" - title: "Realtime Frequency Display Log" - title: "Realtime Pushbutton Log" - - title: "Realtime OliveTin Log" + - title: "Realtime Web (OliveTin) Log" - title: Diagnostics contents: From aa272831a610dade777c5946a88b52fd84bcf45c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 12:59:20 -0400 Subject: [PATCH 1467/1744] Update config.yaml --- OliveTin/config.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 77fc4683..66b7f25b 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -155,6 +155,24 @@ actions: onclick: execution-dialog timeout: 10 + - title: "Signin to Raspberry Pi Connect" + icon: "🍓" # strawberry + shell: rpi-connect signin + onclick: execution-dialog + timeout: 60 + + - title: "Signout of Raspberry Pi Connect" + icon: "🍓" # strawberry + shell: rpi-connect signout + onclick: execution-dialog + timeout: 5 + + - title: "Status of Raspberry Pi Connect" + icon: "🍓" # strawberry + shell: rpi-connect doctor + onclick: execution-dialog + timeout: 60 + - title: "Show Network Configuration" icon: "🛜" # wireless shell: ifconfig @@ -580,5 +598,8 @@ dashboards: - title: "Change Hostname and Restart" - title: "Show Network Configuration" - title: "Show Available WiFi Networks" + - title: "Signin to Raspberry Pi Connect" + - title: "Signout of Raspberry Pi Connect" + - title: "Status of Raspberry Pi Connect" From a64a637bc586bde56f4b90d5c7cb9c258f09f764 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 13:00:44 -0400 Subject: [PATCH 1468/1744] Update config.yaml --- OliveTin/config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 66b7f25b..78bf73b7 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -157,19 +157,19 @@ actions: - title: "Signin to Raspberry Pi Connect" icon: "🍓" # strawberry - shell: rpi-connect signin + shell: sudo su pi - rpi-connect signin onclick: execution-dialog timeout: 60 - title: "Signout of Raspberry Pi Connect" icon: "🍓" # strawberry - shell: rpi-connect signout + shell: sudo su pi - rpi-connect signout onclick: execution-dialog timeout: 5 - title: "Status of Raspberry Pi Connect" icon: "🍓" # strawberry - shell: rpi-connect doctor + shell: sudo su pi - rpi-connect doctor onclick: execution-dialog timeout: 60 From f04955302758364ba17910d5af0385b1fed5085e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 13:06:27 -0400 Subject: [PATCH 1469/1744] Update OliveTin.service change to pi --- systemd/OliveTin.service | 1 + 1 file changed, 1 insertion(+) diff --git a/systemd/OliveTin.service b/systemd/OliveTin.service index 60742dbe..5ed48369 100644 --- a/systemd/OliveTin.service +++ b/systemd/OliveTin.service @@ -10,6 +10,7 @@ After=local-fs.target ExecStart=/usr/local/bin/OliveTin Restart=always Environment="PORT=80" +User=pi [Install] WantedBy=multi-user.target From 13deddd895592129db3a0a6fc9d18167f08379ab Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 13:33:29 -0400 Subject: [PATCH 1470/1744] Update config.yaml remove rpi-connect --- OliveTin/config.yaml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 78bf73b7..c38d70d3 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -155,23 +155,23 @@ actions: onclick: execution-dialog timeout: 10 - - title: "Signin to Raspberry Pi Connect" - icon: "🍓" # strawberry - shell: sudo su pi - rpi-connect signin - onclick: execution-dialog - timeout: 60 - - - title: "Signout of Raspberry Pi Connect" - icon: "🍓" # strawberry - shell: sudo su pi - rpi-connect signout - onclick: execution-dialog - timeout: 5 - - - title: "Status of Raspberry Pi Connect" - icon: "🍓" # strawberry - shell: sudo su pi - rpi-connect doctor - onclick: execution-dialog - timeout: 60 +# - title: "Signin to Raspberry Pi Connect" +# icon: "🍓" # strawberry +# shell: sudo su pi - rpi-connect signin +# onclick: execution-dialog +# timeout: 60 + +# - title: "Signout of Raspberry Pi Connect" +# icon: "🍓" # strawberry +# shell: sudo su pi - rpi-connect signout +# onclick: execution-dialog +# timeout: 5 + +# - title: "Status of Raspberry Pi Connect" +# icon: "🍓" # strawberry +# shell: sudo su pi - rpi-connect doctor +# onclick: execution-dialog +# timeout: 60 - title: "Show Network Configuration" icon: "🛜" # wireless @@ -598,8 +598,8 @@ dashboards: - title: "Change Hostname and Restart" - title: "Show Network Configuration" - title: "Show Available WiFi Networks" - - title: "Signin to Raspberry Pi Connect" - - title: "Signout of Raspberry Pi Connect" - - title: "Status of Raspberry Pi Connect" +# - title: "Signin to Raspberry Pi Connect" # OliveTin needs to run as pi +# - title: "Signout of Raspberry Pi Connect" +# - title: "Status of Raspberry Pi Connect" From 4d8eaa77760ebe68759cbaae1d1f869fe5fa7489 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 13:37:58 -0400 Subject: [PATCH 1471/1744] Update OliveTin.service run as root --- systemd/OliveTin.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd/OliveTin.service b/systemd/OliveTin.service index 5ed48369..f2a6777f 100644 --- a/systemd/OliveTin.service +++ b/systemd/OliveTin.service @@ -10,7 +10,7 @@ After=local-fs.target ExecStart=/usr/local/bin/OliveTin Restart=always Environment="PORT=80" -User=pi +# User=pi [Install] WantedBy=multi-user.target From 44e5f3db106181436ed985cf5e68c3566fe407f3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 13:44:22 -0400 Subject: [PATCH 1472/1744] Update config.yaml --- OliveTin/config.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index c38d70d3..46400cea 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -1,4 +1,7 @@ showNavigation: false +pageTitle: CubeSatSim Dashboard +logLevel: "INFO" +showFooter: false additionalNavigationLinks: - title: CubeSatSim Wiki url: https://CubeSatSim.org/wiki From c491e76a1b4e4d6b0c2e7f9cab90c214e69b39b7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 13:47:53 -0400 Subject: [PATCH 1473/1744] Update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 3df2c6bd..b0e6e6d3 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,5 @@ groundstation/direwolf-pacsat-tmp.conf tlm.bin frequency.txt logb.txt +logo.txt +logp.txt From ef522c3166184e39d160c4e043efd9ea1ab94ea1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 16:00:04 -0400 Subject: [PATCH 1474/1744] Update config.yaml add reboot after WiFi change --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 46400cea..9f6ee33f 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -134,7 +134,7 @@ actions: - title: "Connect to WiFi using SSID and Password" icon: "🛜" # wireless - shell: echo "If this works, this web page won't work again until you connect to the new WiFi network!" && echo && sudo nmcli device wifi rescan && sleep 1 && sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" + shell: echo "If this works, this web page won't work again until you connect to the new WiFi network!" && echo && sudo nmcli device wifi rescan && sleep 1 && sudo nmcli device wifi connect "{{ wifi_ssid }}" password "{{ wifi_password }}" && sudo reboot now onclick: execution-dialog timeout: 10 arguments: From cda243a79e32ad06a5eefca2dd9b75f9e0436fbb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 16:04:30 -0400 Subject: [PATCH 1475/1744] Update config add all services and rpi-connect signout --- config | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/config b/config index 73933df7..ed7231d8 100755 --- a/config +++ b/config @@ -1604,8 +1604,10 @@ elif [ "$1" = "-g" ]; then sudo touch /home/pi/CubeSatSim/command_control_direwolf sudo rm /home/pi/CubeSatSim/beacon_off > /dev/null 2>&1 + + sudo rm /home/pi/CubeSatSim/command_count.txt - sudo echo "0" > /home/pi/CubeSatSim/command_count.txt + echo "0" > /home/pi/CubeSatSim/command_count.txt sudo rm /home/pi/CubeSatSim/failure_mode.txt > /dev/null 2>&1 @@ -1614,6 +1616,12 @@ elif [ "$1" = "-g" ]; then sudo systemctl stop cubesatsim sudo systemctl stop transmit sudo systemctl stop command + sudo systemctl stop pacsatsim + sudo systemctl stop frequency + sudo systemctl stop pushbutton + sudo systemctl stop OliveTin + + rpi-connect signout sudo mv -f /home/pi/CubeSatSim/telem.txt /home/pi/CubeSatSim/telem.txt.bk From 7f32bfadc817c9d3b4e5c8881195f2256a1a3c54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 2 Aug 2026 20:28:26 -0400 Subject: [PATCH 1476/1744] Update install add api-connect --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 8856bcd7..5b0feb74 100755 --- a/install +++ b/install @@ -952,7 +952,7 @@ if [ ! -d "/home/pi/Icons" ]; then wget -r -nd --no-parent -A '*' https://cubesatsim.org/icons/ fi -sudo apt install -y raspberrypi-ui-mods +sudo apt install -y raspberrypi-ui-mods rpi-connect sudo apt autoremove -y From 16d781610fbea00db304492c53bfe7496be2e57a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 3 Aug 2026 12:41:08 -0400 Subject: [PATCH 1477/1744] Update install add ttyd install --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 5b0feb74..4ec8dcaa 100755 --- a/install +++ b/install @@ -952,7 +952,7 @@ if [ ! -d "/home/pi/Icons" ]; then wget -r -nd --no-parent -A '*' https://cubesatsim.org/icons/ fi -sudo apt install -y raspberrypi-ui-mods rpi-connect +sudo apt install -y raspberrypi-ui-mods rpi-connect ttyd sudo apt autoremove -y From 2a4f2769b4b42849b1e357780adb9927189e3cf2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 3 Aug 2026 13:37:11 -0400 Subject: [PATCH 1478/1744] Update pushbutton.py change port to 8081 to avoid conflict --- pushbutton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index 348aee6f..996ecb0a 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -150,7 +150,7 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) sleep(2) - subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8080', 'bash']) + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8081', 'bash']) GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) From e576a324f976b56cd880020cfc71dc99a4416efd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 17:27:48 -0400 Subject: [PATCH 1479/1744] Create hotspot.ini --- hotspot.ini | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 hotspot.ini diff --git a/hotspot.ini b/hotspot.ini new file mode 100644 index 00000000..bb8b7d3a --- /dev/null +++ b/hotspot.ini @@ -0,0 +1,11 @@ +[Hotspot] +# WiFi hotspot name +hotspot_ssid=CubeSat +# WiFi hotspot password - note: this password is stored in the clear! +hotspot_password=amsat +# Web Dashboard port number. If 80, no port needs to be entered in browser +dashboard_port=80 +# Web terminal setting during hotspot - note, there is no authentication for this! +web_term_hotspot=yes +# Web terminal setting during WiFi - note: there is no authentication for this! +web_term_wifi=no From 20b8a757b21ee5a1ca80435a4db39a3caa237b03 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 17:34:32 -0400 Subject: [PATCH 1480/1744] Update pushbutton.py add read_config_ini --- pushbutton.py | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 996ecb0a..1ef7688e 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -7,6 +7,38 @@ import subprocess import time import os from time import sleep +import configparser + +def read_config_ini(): + global hotspot_ssid + global hotspot_password + global web_term_hotspot + global web_term_wifi + global dashboard_port + try: + # Initialize the parser + config = configparser.ConfigParser() + + # Read the file + config.read('/home/pi/CubeSatSim/hotspot.ini') + + # Access the values like a dictionary + hotspot_ssid = config['Hotspot']['hotspot_ssid'] + hotspot_password = config['Hotspot']['hotspot_password'] + web_term_hotspot = config['Hotspot']['web_term_hotspot'] + web_term_wifi = config['Hotspot']['web_term_wifi'] + dashboard_port = config.getint('Hotspot', 'dashboard_port') + + print(f"SSID: {hotspot_ssid} Password: {hotspot_password} Term Hotspot: {web_term_hotspot} Term WiFi {web_term_wifi} Port: {dashboard_port}") + + except Exception as e: + print(f"An error occurred: {e}") + print(" failed, setting defaults") + hotspot_ssid = "CubeSat" + hotspot_password = "amsat" + web_term_hotspot = "yes" + web_term_wifi = "no" + dashboard_port = 80 def blink(times): blink_time = 0.1 @@ -142,15 +174,19 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot success = 1 count = 0 while (success != 0) and (count < 5): - result = subprocess.run(['nmcli', 'device', 'wifi', 'hotspot', 'con-name', 'Hotspot', 'ifname', 'wlan0', 'ssid', 'CubeSat', 'password', 'amsatao7'], capture_output=True, text=True) + read_config_ini() + result = subprocess.run(['nmcli', 'device', 'wifi', 'hotspot', 'con-name', 'Hotspot', 'ifname', 'wlan0', 'ssid', hotspot_ssid, 'password', hotspot_password], capture_output=True, text=True) print(result, flush=True) #.stdout) count = count + 1 success = result.returncode sleep(1) + print(f"Starting Wi-Fi Hotspot with SSID: {hotspot_ssid} and password: {hotspot_password}") result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True) print(result, flush=True) sleep(2) - subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8081', 'bash']) + if web_term_hotspot == "yes": + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8081', 'bash']) + print("Starting web terminal on port 8081") GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) From 41e69b1bad9ad1c9cee13238bd7f61a76f3d394b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 17:47:29 -0400 Subject: [PATCH 1481/1744] Update install print setting up journal across boots --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 4ec8dcaa..cee53d6c 100755 --- a/install +++ b/install @@ -266,6 +266,7 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi if [ ! -d "/var/log/journal" ]; then # persistant journal logs across boots + echo "Setting up journal logs across boots" sudo mkdir -p /var/log/journal sudo systemd-tmpfiles --create --prefix /var/log/journal sudo systemctl restart systemd-journal-flush.service From 1bd8662cfc6ded0d83650a23c5798e784df48536 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 17:52:01 -0400 Subject: [PATCH 1482/1744] Update hotspot.ini change to amsatcubesat --- hotspot.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot.ini b/hotspot.ini index bb8b7d3a..87853c70 100644 --- a/hotspot.ini +++ b/hotspot.ini @@ -2,7 +2,7 @@ # WiFi hotspot name hotspot_ssid=CubeSat # WiFi hotspot password - note: this password is stored in the clear! -hotspot_password=amsat +hotspot_password=amsatcubesat # Web Dashboard port number. If 80, no port needs to be entered in browser dashboard_port=80 # Web terminal setting during hotspot - note, there is no authentication for this! From 99fa7b281a1c33533db26ce3879e660da2f63cc2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 22:52:17 -0400 Subject: [PATCH 1483/1744] Update pushbutton.py add web terminal on wifi --- pushbutton.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index 1ef7688e..80ae21e4 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -187,7 +187,9 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot if web_term_hotspot == "yes": subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8081', 'bash']) print("Starting web terminal on port 8081") - +elif web_term_wifi == "yes": + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8081', 'bash']) + print("Starting web terminal on port 8081") GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) while (True): From eba37f68a5e597c32759bcb76ed5144db0b169d3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 22:55:58 -0400 Subject: [PATCH 1484/1744] Update pushbutton.py moved ini check --- pushbutton.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 80ae21e4..590619d7 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -158,6 +158,7 @@ GPIO.output(powerPin, 0) GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) +read_config_ini() if not GPIO.input(push_button): # if pushbutton is held down during boot print("Activating WiFi access point!", flush=True) GPIO.output(powerPin, 1) @@ -173,8 +174,7 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot GPIO.output(powerPin, 0) success = 1 count = 0 - while (success != 0) and (count < 5): - read_config_ini() + while (success != 0) and (count < 5): result = subprocess.run(['nmcli', 'device', 'wifi', 'hotspot', 'con-name', 'Hotspot', 'ifname', 'wlan0', 'ssid', hotspot_ssid, 'password', hotspot_password], capture_output=True, text=True) print(result, flush=True) #.stdout) count = count + 1 From 05f491483ab9e33e6440f08ac1c86ce17ff13fb3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:02:12 -0400 Subject: [PATCH 1485/1744] Update pushbutton.py remove dashboard port --- pushbutton.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 590619d7..f5b1395e 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -14,7 +14,7 @@ def read_config_ini(): global hotspot_password global web_term_hotspot global web_term_wifi - global dashboard_port +# global dashboard_port try: # Initialize the parser config = configparser.ConfigParser() @@ -27,9 +27,9 @@ def read_config_ini(): hotspot_password = config['Hotspot']['hotspot_password'] web_term_hotspot = config['Hotspot']['web_term_hotspot'] web_term_wifi = config['Hotspot']['web_term_wifi'] - dashboard_port = config.getint('Hotspot', 'dashboard_port') +# dashboard_port = config.getint('Hotspot', 'dashboard_port') - print(f"SSID: {hotspot_ssid} Password: {hotspot_password} Term Hotspot: {web_term_hotspot} Term WiFi {web_term_wifi} Port: {dashboard_port}") + print(f"SSID: {hotspot_ssid} Password: {hotspot_password} Term Hotspot: {web_term_hotspot} Term WiFi {web_term_wifi}") # : {dashboard_}") except Exception as e: print(f"An error occurred: {e}") @@ -38,7 +38,7 @@ def read_config_ini(): hotspot_password = "amsat" web_term_hotspot = "yes" web_term_wifi = "no" - dashboard_port = 80 +# dashboard_port = 80 def blink(times): blink_time = 0.1 From 5e601dffa6502fc7fadbb96458a79f19a1dcedf9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:02:45 -0400 Subject: [PATCH 1486/1744] Update hotspot.ini remove dashboard_port --- hotspot.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot.ini b/hotspot.ini index 87853c70..fdbb8c60 100644 --- a/hotspot.ini +++ b/hotspot.ini @@ -4,7 +4,7 @@ hotspot_ssid=CubeSat # WiFi hotspot password - note: this password is stored in the clear! hotspot_password=amsatcubesat # Web Dashboard port number. If 80, no port needs to be entered in browser -dashboard_port=80 +# dashboard_port=80 # Web terminal setting during hotspot - note, there is no authentication for this! web_term_hotspot=yes # Web terminal setting during WiFi - note: there is no authentication for this! From 7b334866331da40cf749ff4d9a82a4fb39046a16 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:12:57 -0400 Subject: [PATCH 1487/1744] Update install always setup log across boots --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index cee53d6c..79d48772 100755 --- a/install +++ b/install @@ -265,13 +265,13 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi - if [ ! -d "/var/log/journal" ]; then # persistant journal logs across boots +# if [ ! -d "/var/log/journal" ]; then # persistant journal logs across boots echo "Setting up journal logs across boots" - sudo mkdir -p /var/log/journal + sudo mkdir -p /var/log/journal &>/dev/null sudo systemd-tmpfiles --create --prefix /var/log/journal sudo systemctl restart systemd-journal-flush.service sudo sed -i 's/Storage=volatile/Storage=persistent/g' /etc/systemd/journald.conf - fi +# fi elif [[ $(grep 'trixie' /etc/os-release) ]]; then From bb4d8603fcaaf13294fcbaa63a5ec08d2d3fa950 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:27:37 -0400 Subject: [PATCH 1488/1744] Rename hotspot.ini to hotspot_ini --- hotspot.ini => hotspot_ini | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hotspot.ini => hotspot_ini (100%) diff --git a/hotspot.ini b/hotspot_ini similarity index 100% rename from hotspot.ini rename to hotspot_ini From ac38c372fb89c8bfd5e6f95165a2f70b7ba9986f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:34:43 -0400 Subject: [PATCH 1489/1744] Update .gitignore add hotspot.ini --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index b0e6e6d3..e2217fcd 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ frequency.txt logb.txt logo.txt logp.txt +hotspot.ini From d3d0940507be3d20757b8e35980afa496f12681a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:38:42 -0400 Subject: [PATCH 1490/1744] Update config -g add hotspot.ini reset --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index ed7231d8..292c5abe 100755 --- a/config +++ b/config @@ -1621,6 +1621,8 @@ elif [ "$1" = "-g" ]; then sudo systemctl stop pushbutton sudo systemctl stop OliveTin + cp /home/pi/CubeSatSim/hotspot_ini /home/pi/CubeSatSim/hotspot.ini + rpi-connect signout sudo mv -f /home/pi/CubeSatSim/telem.txt /home/pi/CubeSatSim/telem.txt.bk From 489abf4f911c45b6519ffbde3223ba3ba942787b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:47:18 -0400 Subject: [PATCH 1491/1744] Update install add frequency.txt --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 79d48772..2c12e96b 100755 --- a/install +++ b/install @@ -49,6 +49,8 @@ else echo "creating $FILE" echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60 no" > /home/pi/CubeSatSim/sim.cfg + echo "434900000 435000000" > frequency.txt + /home/pi/CubeSatSim/config -c -n /home/pi/CubeSatSim/config -l -n From 0475a7cd3c945158cdf3b21e4de4eb4ab28c56f5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 5 Aug 2026 23:49:10 -0400 Subject: [PATCH 1492/1744] Update config -g reset frequency.txt --- config | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/config b/config index 292c5abe..6b541c73 100755 --- a/config +++ b/config @@ -1593,7 +1593,17 @@ elif [ "$1" = "-g" ]; then echo "Resetting" + sudo systemctl stop cubesatsim + sudo systemctl stop transmit + sudo systemctl stop command + sudo systemctl stop pacsatsim + sudo systemctl stop frequency + sudo systemctl stop pushbutton + sudo systemctl stop OliveTin + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60 no" > /home/pi/CubeSatSim/sim.cfg + + echo "434900000 435000000" > frequency.txt sudo echo "b" > /home/pi/CubeSatSim/.mode @@ -1613,14 +1623,6 @@ elif [ "$1" = "-g" ]; then sudo rm /home/pi/CubeSatSim/transmit_dtmf > /dev/null 2>&1 - sudo systemctl stop cubesatsim - sudo systemctl stop transmit - sudo systemctl stop command - sudo systemctl stop pacsatsim - sudo systemctl stop frequency - sudo systemctl stop pushbutton - sudo systemctl stop OliveTin - cp /home/pi/CubeSatSim/hotspot_ini /home/pi/CubeSatSim/hotspot.ini rpi-connect signout From a03ad0ef697f346b08fcbe4c97ae4f22ce530e65 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 09:14:31 -0400 Subject: [PATCH 1493/1744] Update install change to apt-get --- install | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/install b/install index 2c12e96b..ae724b95 100755 --- a/install +++ b/install @@ -356,11 +356,11 @@ else echo "0\n" > /home/pi/CubeSatSim/command_count.txt fi -sudo apt-get update && sudo apt-get dist-upgrade -y +sudo apt-get update && sudo apt-get dist-upgrade -y # if [ $BULLSEYE -eq 1 ]; then -# sudo apt purge -y python3-pip -# sudo apt install -y python3-pip +# sudo apt-get purge -y python3-pip +# sudo apt-get install -y python3-pip # fi cp /home/pi/CubeSatSim/groundstation/pacsat.desktop /home/pi/Desktop/pacsat.desktop @@ -369,7 +369,7 @@ cp /home/pi/CubeSatSim/groundstation/gpredict.desktop /home/pi/Desktop/gpredict. if [ ! -d "/home/pi/venv" ]; then cd - sudo apt install -y python3-venv + sudo apt-getinstall -y python3-venv sudo python3 -m venv venv source /home/pi/venv/bin/activate @@ -440,16 +440,16 @@ if [ ! -d "/home/pi/WiringPi3" ]; then cd WiringPi3 ./build debian mv debian-template/wiringpi*.deb . - sudo apt install ./wiringpi*.deb + sudo apt-get install ./wiringpi*.deb fi cd if [ ! $BULLSEYE -eq 1 ]; then - sudo apt install -y libtiff6 + sudo apt-get install -y libtiff6 fi -sudo apt install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev +sudo apt-get install -y python3-pip python3-smbus libjpeg-dev zlib1g-dev libfreetype6-dev libopenjp2-7 python3-pil python3-serial libusb-1.0-0 libusb-1.0-0-dev if [ $BULLSEYE -eq 1 ] || [ $UPDATE -eq 0 ] ; then @@ -619,7 +619,7 @@ fi if [ ! -d "/home/pi/rpitx" ]; then - sudo apt install -y libraspberrypi-dev + sudo apt-get install -y libraspberrypi-dev cd git clone https://github.com/alanbjohnston/rpitx.git cd rpitx @@ -888,7 +888,7 @@ fi if [ ! -f "/home/pi/fcdctl/fcdctl" ]; then echo "Installing fcdctl to set FUNcubeDongle Pro gain" sudo rm /var/lib/dpkg/info/python3-pip.list - sudo apt install python3-pip --reinstall + sudo apt-get install python3-pip --reinstall sudo apt-get install -y python3-smbus libusb-1.0 cd git clone https://github.com/csete/fcdctl.git @@ -955,9 +955,9 @@ if [ ! -d "/home/pi/Icons" ]; then wget -r -nd --no-parent -A '*' https://cubesatsim.org/icons/ fi -sudo apt install -y raspberrypi-ui-mods rpi-connect ttyd +sudo apt-get install -y raspberrypi-ui-mods rpi-connect ttyd -sudo apt autoremove -y +sudo apt-get autoremove -y if [[ $(gpio -v | grep "Pi 4") ]] && [[ ! $(sudo raspi-config nonint get_browser | grep "chromium") ]] ; then echo "Since Pi 4, changing default browser to Chromium" From 26e7f36baa596e43ab846893bd705e2fbc3cbac9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 10:56:31 -0400 Subject: [PATCH 1494/1744] Update install create hotspot.ini if install --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index ae724b95..eb58f498 100755 --- a/install +++ b/install @@ -51,6 +51,8 @@ else echo "434900000 435000000" > frequency.txt + cp /home/pi/CubeSatSim/hotspot_ini /home/pi/CubeSatSim/hotspot.ini + /home/pi/CubeSatSim/config -c -n /home/pi/CubeSatSim/config -l -n From 40aa027c65e43e08374756f2b2eb1a20418f396e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 11:01:45 -0400 Subject: [PATCH 1495/1744] Update install create hotspot.ini --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 2c12e96b..8d237d5b 100755 --- a/install +++ b/install @@ -51,6 +51,8 @@ else echo "434900000 435000000" > frequency.txt + cp /home/pi/CubeSatSim/hotspot_ini /home/pi/CubeSatSim/hotspot.ini + /home/pi/CubeSatSim/config -c -n /home/pi/CubeSatSim/config -l -n From a210b4538a8c82a1f51fe8c040b459524c76fac7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 11:15:51 -0400 Subject: [PATCH 1496/1744] Update main.h replace source with . --- main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.h b/main.h index 60e534b8..01bd4d91 100644 --- a/main.h +++ b/main.h @@ -203,7 +203,7 @@ char sensor_string[SENSOR_FIELDS][32]; int test_i2c_bus(int bus); //const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/python/voltcurrent.py "; -const char pythonVenv[] = "source /home/pi/venv/bin/activate"; +const char pythonVenv[] = ". /home/pi/venv/bin/activate"; const char pythonCmd[] = "/home/pi/venv/bin/python3 -u /home/pi/CubeSatSim/ina219.py "; char pythonStr[100], pythonConfigStr[100], busStr[10]; int map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; From 76a3e12b6f433f784e6b63259d667833ce21ff67 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 11:27:45 -0400 Subject: [PATCH 1497/1744] Update config only reboot doppler if CW mode --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 6b541c73..39aece98 100755 --- a/config +++ b/config @@ -117,7 +117,7 @@ function check_restart { reboot=1 # echo "Need to reboot" fi - elif [ "$MODE" == "m" ] || [ "$DOPPLER" == "1" ] ; then + elif [ "$MODE" == "m" ] && [ "$DOPPLER" == "1" ] ; then reboot=1 else restart=1 From a33cdedc1b2569c487837a335efa725925cfef16 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 12:15:49 -0400 Subject: [PATCH 1498/1744] Update main.h change to venv.sh --- main.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.h b/main.h index 01bd4d91..15f522dc 100644 --- a/main.h +++ b/main.h @@ -203,7 +203,7 @@ char sensor_string[SENSOR_FIELDS][32]; int test_i2c_bus(int bus); //const char pythonCmd[] = "python3 -u /home/pi/CubeSatSim/python/voltcurrent.py "; -const char pythonVenv[] = ". /home/pi/venv/bin/activate"; +const char pythonVenv[] = "/home/pi/CubeSatSim/venv.sh"; const char pythonCmd[] = "/home/pi/venv/bin/python3 -u /home/pi/CubeSatSim/ina219.py "; char pythonStr[100], pythonConfigStr[100], busStr[10]; int map[8] = {0, 1, 2, 3, 4, 5, 6, 7}; From 0c3ce95a1a7c34243cac548d197b5f1adf91624e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 12:16:52 -0400 Subject: [PATCH 1499/1744] Update telem.c remove venv --- telem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telem.c b/telem.c index e8a498e4..57248b93 100644 --- a/telem.c +++ b/telem.c @@ -31,7 +31,7 @@ int main(int argc, char *argv[]) { char cmdbuffer[1000]; - FILE *file2 = sopen(pythonVenv); // activate venv +// FILE *file2 = sopen(pythonVenv); // activate venv FILE *file1 = sopen(pythonConfigStr); // try new function fgets(cmdbuffer, 1000, file1); From 1002915a9997c797eb2b9a4372feb886727b8563 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 12:17:59 -0400 Subject: [PATCH 1500/1744] Update config add venv --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 39aece98..b283d456 100755 --- a/config +++ b/config @@ -1433,6 +1433,7 @@ elif [ "$1" = "-v" ]; then echo "Real-time output from the INA219 voltage and current sensors:" echo + /home/pi/CubeSatSim/venv.sh /home/pi/CubeSatSim/telem elif [ "$1" = "-e" ]; then From e4e2cf0a5717681a6f039066a2cc249706e9c825 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 6 Aug 2026 12:19:06 -0400 Subject: [PATCH 1501/1744] venv as script --- venv.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 venv.sh diff --git a/venv.sh b/venv.sh new file mode 100755 index 00000000..c286ba1d --- /dev/null +++ b/venv.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +. /home/pi/venv/bin/activate From 58257d5b6e1221f4fc879e265d87061c9eb05c34 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 12:30:17 -0400 Subject: [PATCH 1502/1744] Update install update to pacsat ground 47a --- install | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/install b/install index eb58f498..99881cc4 100755 --- a/install +++ b/install @@ -596,9 +596,9 @@ sudo raspi-config nonint do_vnc 0 if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then cd /tmp - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_46q.tar.gz - tar -xzf PacsatGround_unix_0_46q.tar.gz -C /home/pi/Desktop - rm PacsatGround_unix_0_46q.tar.gz + wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_47a.tar.gz + tar -xzf PacsatGround_unix_0_47a.tar.gz -C /home/pi/Desktop + rm PacsatGround_unix_0_47a.tar.gz # cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ # mkdir /home/pi/PacSatGround sudo usermod -a -G gpio pi From 8fff3eb27a66396caf299f4d4890f5574a643394 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 14:57:26 -0400 Subject: [PATCH 1503/1744] Update install missing space --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index 99881cc4..6c41a546 100755 --- a/install +++ b/install @@ -371,7 +371,7 @@ cp /home/pi/CubeSatSim/groundstation/gpredict.desktop /home/pi/Desktop/gpredict. if [ ! -d "/home/pi/venv" ]; then cd - sudo apt-getinstall -y python3-venv + sudo apt-get install -y python3-venv sudo python3 -m venv venv source /home/pi/venv/bin/activate From 57686f34ac5a498aa16a5e8df6b03757838c0337 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 15:24:32 -0400 Subject: [PATCH 1504/1744] Update install download latest Pacsat Ground Station --- install | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/install b/install index 6c41a546..5ae4eb80 100755 --- a/install +++ b/install @@ -595,12 +595,11 @@ sudo raspi-config nonint do_vnc 0 if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then - cd /tmp - wget https://www.g0kla.com/pacsat/downloads/test/PacsatGround_unix_0_47a.tar.gz - tar -xzf PacsatGround_unix_0_47a.tar.gz -C /home/pi/Desktop - rm PacsatGround_unix_0_47a.tar.gz -# cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/* /home/pi/Desktop/PacsatGround/spacecraft/ -# mkdir /home/pi/PacSatGround + URL="https://www.g0kla.com/pacsat/downloads/test/" + FILENAME=$(wget -q -O - $URL | grep -E -o -m 1 'PacsatGround_unix...........gz' | head -n 1) + echo "Downloading latest PacsatGround Station version" $FILENAME + wget $URL/$FILENAME -O PacsatGround_unix.tar.gz + tar -xzf PacsatGround_unix.tar.gz -C /home/pi/Desktop sudo usermod -a -G gpio pi sudo apt-get install default-jdk -y From 199e5afd98816c6bd8d7b92a6036338647095e19 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 16:21:59 -0400 Subject: [PATCH 1506/1744] Update config change some reboot to restart --- config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index b283d456..3e95caab 100755 --- a/config +++ b/config @@ -600,7 +600,7 @@ elif [ "$1" = "-t" ]; then echo $1 $2 $3 $4 $sim $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} > /home/pi/CubeSatSim/sim.cfg echo - reboot=1 + restart=1 elif [ "$1" = "-c" ]; then @@ -692,7 +692,7 @@ elif [ "$1" = "-r" ]; then if [ "$norestart" = "1" ]; then echo else - reboot=1 + restart=1 fi elif [ "$1" = "-l" ]; then @@ -777,7 +777,7 @@ elif [ "$1" = "-l" ]; then if [ "$norestart" = "1" ]; then echo else - reboot=1 + restart=1 fi elif [ "$1" = "-S" ]; then @@ -1955,7 +1955,7 @@ elif [ "$1" = "-U" ]; then echo if [ "${12}" != "$sim" ] || [ "${13}" != "$time" ] ; then - reboot=1 + restart=1 fi elif [ "$1" = "-u" ]; then From 8c06c7ae07568b33c0c020474b15907b52204ab5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 6 Aug 2026 16:24:24 -0400 Subject: [PATCH 1507/1744] Update log add Transmit and Receive heading --- log | 1 + 1 file changed, 1 insertion(+) diff --git a/log b/log index ed19ccc3..cdb181f1 100755 --- a/log +++ b/log @@ -44,6 +44,7 @@ if [ "$REALTIME" = "1" ] ; then elif [ "$1" = "-r" ]; then sudo journalctl -b all -af -u frequency # > /home/pi/CubeSatSim/logr.txt elif [ "$1" = "-f" ] ; then + echo "Transmit Receive" while true; do cat /home/pi/CubeSatSim/frequency.txt | tr -d '\n' # echo From 4e0cba23b44895d94192cfe380aa0eebeb2b72a8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 7 Aug 2026 10:32:39 -0400 Subject: [PATCH 1508/1744] Update config.yaml increase log timeout --- OliveTin/config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 9f6ee33f..05db8bc3 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -235,7 +235,7 @@ actions: shell: /home/pi/CubeSatSim/log -d icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Realtime Transmit Log" shell: /home/pi/CubeSatSim/log -t r @@ -247,7 +247,7 @@ actions: shell: /home/pi/CubeSatSim/log -t icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Realtime Frequency Control Log" shell: /home/pi/CubeSatSim/log -r r @@ -259,7 +259,7 @@ actions: shell: /home/pi/CubeSatSim/log -r icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Realtime Frequency Display Log" shell: /home/pi/CubeSatSim/log -f r @@ -271,7 +271,7 @@ actions: shell: /home/pi/CubeSatSim/log -f icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Realtime Pacsat Log" shell: /home/pi/CubeSatSim/log -p r @@ -283,7 +283,7 @@ actions: shell: /home/pi/CubeSatSim/log -p icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Realtime Pushbutton Log" shell: /home/pi/CubeSatSim/log -b r @@ -295,7 +295,7 @@ actions: shell: /home/pi/CubeSatSim/log -b icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Realtime Command and Control Log" shell: /home/pi/CubeSatSim/log -c r @@ -307,7 +307,7 @@ actions: shell: /home/pi/CubeSatSim/log -c icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Realtime Web (OliveTin) Log" shell: /home/pi/CubeSatSim/log -o r @@ -319,7 +319,7 @@ actions: shell: /home/pi/CubeSatSim/log -o icon: logs onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Update CubeSatSim Software" shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update From 465462c07bec37bdfda25a682bede0f144245298 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 7 Aug 2026 10:44:25 -0400 Subject: [PATCH 1509/1744] Update log typo --- log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/log b/log index cdb181f1..996c129f 100755 --- a/log +++ b/log @@ -34,7 +34,7 @@ if [ "$REALTIME" = "1" ] ; then # cat /home/pi/CubeSatSim/logt.txt # echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then - sudo journaclt -b all -af -u command # > /home/pi/CubeSatSim/logc.txt + sudo journalctl -b all -af -u command # > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then From 8271b7e4370d141743a2d7d48dc70d9ed4941bce Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 10:28:30 -0400 Subject: [PATCH 1510/1744] Update main.c don't write first tlm.bin --- main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 08478b4a..2faecf0e 100644 --- a/main.c +++ b/main.c @@ -2026,9 +2026,11 @@ void get_tlm_fox() { encodeB(b_min, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); } + int tlm_skip = FALSE if (txAntennaDeployed == 0) { txAntennaDeployed = 1; printf("TX Antenna Deployed!\n"); + tlm_skip = TRUE } if (rxAntennaDeployed == 0) { rxAntennaDeployed = 1; @@ -2044,7 +2046,7 @@ void get_tlm_fox() { encodeB(b, 74 + head_offset, 0xfff); } - if ((mode == PACSAT) || (mode == PACSATGND)) + if (((mode == PACSAT) || (mode == PACSATGND)) && (tlm_skip == FALSE)) { FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); if (telem_binary != NULL) { From 4be7a80a6bcf5e355d3f8cf124aef389b8e3f06c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 10:29:34 -0400 Subject: [PATCH 1511/1744] Update main.c missing ; --- main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 2faecf0e..7c063513 100644 --- a/main.c +++ b/main.c @@ -2026,15 +2026,16 @@ void get_tlm_fox() { encodeB(b_min, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4); } - int tlm_skip = FALSE + int tlm_skip = FALSE; if (txAntennaDeployed == 0) { txAntennaDeployed = 1; printf("TX Antenna Deployed!\n"); - tlm_skip = TRUE + tlm_skip = TRUE; } if (rxAntennaDeployed == 0) { rxAntennaDeployed = 1; printf("RX Antenna Deployed!\n"); + tlm_skip = TRUE; } if (mode == BPSK) { // wod field experiments From 9eecaf8d487f58f5c41b07146728565dbf5af1ec Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 16:25:11 -0400 Subject: [PATCH 1512/1744] Create Payload_BME280_MPU6050_XS_YPR.ino --- .../Payload_BME280_MPU6050_XS_YPR.ino | 904 ++++++++++++++++++ 1 file changed, 904 insertions(+) create mode 100644 stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino diff --git a/stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino b/stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino new file mode 100644 index 00000000..90bdfe66 --- /dev/null +++ b/stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino @@ -0,0 +1,904 @@ +// code for Pico or Pro Micro or STM32 on the CubeSat Simulator STEM Payload board +// works wih CubeSatSim software v1.3.2 or later +// extra sensors can be added in payload_extension.cpp file +// adds absolute orientation yaw, pitch, roll as Sensor 1, 2, and 3. + +#include +#include +#include +//#include +#include "MPU6050_6Axis_MotionApps20.h" +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) +#include +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Arduino Mbed OS RP2040 Boards is used in Arduino IDE +#include +TinyGPSPlus gps; +UART Serial2(8, 9, 0, 0); + +#elif !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards in Arduino IDE +#include +TinyGPSPlus gps; +bool check_for_wifi(); +bool wifi = false; +int led_builtin_pin; + +#else // if Sparkfun Pro Micro or STM32 +#include +#endif + +#define SEALEVELPRESSURE_HPA (1013.25) + +Adafruit_BME280 bme; +//MPU6050 mpu6050(Wire); + +MPU6050 mpu; +int const INTERRUPT_PIN = 6; +bool DMPReady = false; +uint8_t devStatus; +uint8_t MPUIntStatus; // Holds actual interrupt status byte from MPU +uint16_t packetSize; // Expected DMP packet size (default is 42 bytes) +uint8_t FIFOBuffer[64]; // FIFO storage buffer + +Quaternion q; // [w, x, y, z] Quaternion container +VectorFloat gravity; // [x, y, z] Gravity vector +float ypr[3]; // [yaw, pitch, roll] Yaw/Pitch/Roll container and gravity vector +int16_t ax, ay, az; +int16_t gx, gy, gz; +float accelx, accely, accelz, acceleration; +float gyrox, gyroy, gyroz, rotation; +int yaw, pitch, roll; +int reset_count; + +long timer = 0; +int bmePresent; +int RXLED = 17; // The RX LED has a defined Arduino pin +int whiteLED = 9; +int yellowLED = 8; +int Sensor1 = 0; +float Sensor2 = 0; +float temp; +int calibration = 0; + +void ee_prom_word_write(int addr, int val); +short ee_prom_word_read(int addr); +int first_time = true; +int first_read = true; + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) +float T2 = 24; // Temperature data point 1 +float R2 = 169; // Reading data point 1 +float T1 = 6; // Temperature data point 2 +float R1 = 181; // Reading data point 2 +#endif +#if defined __AVR_ATmega32U4__ +float T2 = 26.3; // Temperature data point 1 +float R2 = 167; // Reading data point 1 +float T1 = 2; // Temperature data point 2 +float R1 = 179; // Reading data point 2 +#endif +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) +float T2 = 25; // Temperature data point 1 +float R2 = 671; // Reading data point 1 +float T1 = 15.5; // Temperature data point 2 +float R1 = 695; // Reading data point 2 +#endif + +int sensorValue; +float Temp; +float rest; + +char sensor_end_flag[] = "_END_FLAG_"; +char sensor_start_flag[] = "_START_FLAG_"; +bool show_gps = true; // set to false to not see all messages +float flon = 0.0, flat = 0.0, flalt = 0.0; +void get_gps(); + +extern void payload_setup(); // sensor extension setup function defined in payload_extension.cpp +extern void payload_loop(); // sensor extension read function defined in payload_extension.cpp + +volatile bool MPUInterrupt = false; // Indicates whether MPU6050 interrupt pin has gone high +void DMPDataReady() +{ + MPUInterrupt = true; +} + +void setup() { + + Serial.begin(115200); // Serial Monitor for testing + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + Serial1.setRX(1); + delay(100); + Serial1.setTX(0); + delay(100); +#endif + + Serial1.begin(115200); // for communication with Pi Zero + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards in Arduino IDE + EEPROM.begin(512); +#endif + + delay(2000); + +#if defined (ARDUINO_ARCH_MBED_RP2040) && (ARDUINO_ARCH_RP2040) + Serial.println("Pico with Mbed"); +#elif !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + Serial.println("Pico with RP2040"); +#elif defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + Serial.println("STM32"); +#elif defined __AVR_ATmega32U4__ + Serial.println("Pro Micro"); +#else + Serial.println("Unknown board"); +#endif + + Serial.println("Starting!"); + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + Serial.println("Starting Serial2 for optional GPS on JP12"); +// Serial2.begin(9600); // serial from - some modules need 115200 + Serial2.begin(9600); // serial from GPS or other serial sensor. Some GPS need 115200 + + // set all Pico GPIO connected pins to input + for (int i = 10; i < 22; i++) { + pinMode(i, INPUT); + } + pinMode(26, INPUT); + pinMode(27, INPUT); + pinMode(28, INPUT); + pinMode(15, INPUT_PULLUP); // squelch +#endif + + blink_setup(); + + blink(500); + delay(250); + blink(500); + delay(250); + led_set(whiteLED, HIGH); + delay(250); + led_set(whiteLED, LOW); + led_set(yellowLED, HIGH); + delay(250); + led_set(yellowLED, LOW); + + if (bme.begin(0x76)) { + bmePresent = 1; + } else { + Serial.println("Could not find a valid BME280 sensor, check wiring!"); + bmePresent = 0; + } + +// mpu6050.begin(); + + ax = 0; + ay = 0; + az = 0; + gx = 0; + gy = 0; + gz = 0; + yaw = 0; + pitch = 0; + roll = 0; + accelx = 0; + accely = 0; + accelz = 0; + acceleration = 1.0; + gyrox = 0; + gyroy = 0; + gyroz = 0; + + mpu.initialize(ACCEL_FS::A2G, GYRO_FS::G250DPS); +// mpu.initialize(); + + pinMode(INTERRUPT_PIN, INPUT); + + // Verify connection + if (mpu.testConnection()) + { + Serial.println("MPU6050 connection successful"); + } + else + { + Serial.println("MPU6050 connection failed"); + } + + /* Initializate and configure the DMP*/ + Serial.println(F("Initializing DMP...")); + devStatus = mpu.dmpInitialize(); + + if (eeprom_word_read(0) == 0xA08) + { + Serial.println("Reading gyro and accel offsets from EEPROM\n"); + + int axOffset = eeprom_word_read(1); + int ayOffset = eeprom_word_read(2); + int azOffset = eeprom_word_read(3); + int gxOffset = eeprom_word_read(4); + int gyOffset = eeprom_word_read(5); + int gzOffset = eeprom_word_read(6); + + Serial.println(axOffset, DEC); + Serial.println(ayOffset, DEC); + Serial.println(azOffset, DEC); + Serial.println(gxOffset, DEC); + Serial.println(gyOffset, DEC); + Serial.println(gzOffset, DEC); + + mpu.setXGyroOffset(gxOffset); + mpu.setYGyroOffset(gyOffset); + mpu.setZGyroOffset(gzOffset); + mpu.setXAccelOffset(axOffset); + mpu.setYAccelOffset(ayOffset); + mpu.setZAccelOffset(azOffset); + + mpu.PrintActiveOffsets(); + + Serial.println("\nTemperature calibration data from EEPROM\n"); + + T1 = ((float)eeprom_word_read(7)) / 10.0; + R1 = ((float)eeprom_word_read(8)); + T2 = ((float)eeprom_word_read(9)) / 10.0; + R2 = ((float)eeprom_word_read(10)); + + Serial.println(T1, DEC); + Serial.println(R1, DEC); + Serial.println(" "); + Serial.println(T2, DEC); + Serial.println(R2, DEC); + Serial.println(" "); + + } + else + { + // Serial.println("Calculating gyro offsets\n"); + // mpu6050.calcGyroOffsets(true); + + if (devStatus == 0) + { + // if (first_read == true) { + mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 + mpu.CalibrateGyro(6); + Serial.println("These are the Active offsets: "); + mpu.PrintActiveOffsets(); + + int16_t *offsets; + offsets = mpu.GetActiveOffsets(); + + // A_OFFSET_H_READ_A_OFFS(Data); + Serial.print((float)offsets[0], 5); Serial.print(",\t"); + Serial.print((float)offsets[1], 5); Serial.print(",\t"); + Serial.print((float)offsets[2], 5); Serial.print(",\t"); + + // XG_OFFSET_H_READ_OFFS_USR(Data); + Serial.print((float)offsets[3], 5); Serial.print(",\t"); + Serial.print((float)offsets[4], 5); Serial.print(",\t"); + Serial.print((float)offsets[5], 5); Serial.print("\n\n"); + +// } + +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + Serial.println("Storing gyro and accel offsets in EEPROM\n"); + + eeprom_word_write(0, 0xA08); + /* eeprom_word_write(1, (int)(mpu6050.getGyroXoffset() * 100.0) + 0.5); + eeprom_word_write(2, (int)(mpu6050.getGyroYoffset() * 100.0) + 0.5); + eeprom_word_write(3, (int)(mpu6050.getGyroZoffset() * 100.0) + 0.5); + */ + /* + Serial.println(eeprom_word_read(0), HEX); + Serial.println(((float)eeprom_word_read(1)) / 100.0, DEC); + Serial.println(((float)eeprom_word_read(2)) / 100.0, DEC); + Serial.println(((float)eeprom_word_read(3)) / 100.0, DEC); +*/ + eeprom_word_write(1, offsets[0]); + eeprom_word_write(2, offsets[1]); + eeprom_word_write(3, offsets[2]); + eeprom_word_write(4, offsets[3]); + eeprom_word_write(5, offsets[4]); + eeprom_word_write(6, offsets[5]); + + Serial.println("\nStoring temperature calibration data in EEPROM\n"); + + eeprom_word_write(7, (int)(T1 * 10.0) + 0.5); + eeprom_word_write(8, (int) R1); + eeprom_word_write(9, (int)(T2 * 10.0) + 0.5); + eeprom_word_write(10, (int) R2); + + T1 = ((float)eeprom_word_read(7)) / 10.0; + R1 = ((float)eeprom_word_read(8)); + T2 = ((float)eeprom_word_read(9)) / 10.0; + R2 = ((float)eeprom_word_read(10)); + + Serial.println(T1, DEC); + Serial.println(R1, DEC); + Serial.println(" "); + Serial.println(T2, DEC); + Serial.println(R2, DEC); + Serial.println(" "); + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + if (EEPROM.commit()) { + Serial.println("EEPROM successfully committed\n"); + } else { + Serial.println("ERROR! EEPROM commit failed\n"); + } +#endif +#endif + } + } + + /* Supply your gyro offsets here, scaled for min sensitivity */ +/* mpu.setXGyroOffset(57); + mpu.setYGyroOffset(99); + mpu.setZGyroOffset(19); + mpu.setXAccelOffset(-4922); + mpu.setYAccelOffset(-2136); + mpu.setZAccelOffset(3104); + + mpu.setXGyroOffset(0); + mpu.setYGyroOffset(0); + mpu.setZGyroOffset(0); + mpu.setXAccelOffset(0); + mpu.setYAccelOffset(0); + mpu.setZAccelOffset(0); +*/ + if (devStatus == 0) + { +/* if (first_read == true) { + mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 + mpu.CalibrateGyro(6); + Serial.println("These are the Active offsets: "); + mpu.PrintActiveOffsets(); + } + */ + Serial.println(F("Enabling DMP...")); // Turning ON DMP + mpu.setDMPEnabled(true); + + Serial.print(F("Enabling interrupt detection (Arduino external interrupt ")); + Serial.print(digitalPinToInterrupt(INTERRUPT_PIN)); + Serial.println(F(")...")); + attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), DMPDataReady, RISING); + MPUIntStatus = mpu.getIntStatus(); + + /* Set the DMP Ready flag so the main loop() function knows it is okay to use it */ + Serial.println(F("DMP ready! Waiting for first interrupt...")); + DMPReady = true; + packetSize = mpu.dmpGetFIFOPacketSize(); + // Serial.print(packetSize); + } + else + { + Serial.print(F("DMP Initialization failed (code ")); // Print the error code + Serial.print(devStatus); + Serial.println(F(")")); + // 1 = initial memory load failed + // 2 = DMP configuration updates failed + } + + + payload_setup(); // sensor extension setup function defined in payload_extension.cpp + + reset_count = 100; +} + +void loop() { + + blink(50); + + if (Serial1.available() > 0) { + Serial.print("Received serial data!!!\n"); + delay(10); + while (Serial1.available() > 0) { + char result = Serial1.read(); + Serial.print(result); + } + Serial.println(" "); + } + { +// if (result == '?') + { + if (bmePresent) { + Serial1.print(sensor_start_flag); + Serial1.print("OK BME280 "); + Serial1.print(bme.readTemperature()); + Serial1.print(" "); + Serial1.print(bme.readPressure() / 100.0F); + Serial1.print(" "); + Serial1.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); + Serial1.print(" "); + Serial1.print(bme.readHumidity()); + + Serial.print("OK BME280 "); + temp = bme.readTemperature(); + Serial.print(temp); + Serial.print(" "); + Serial.print(bme.readPressure() / 100.0F); + Serial.print(" "); + Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); + Serial.print(" "); + Serial.print(bme.readHumidity()); + } else + { + Serial1.print(sensor_start_flag); + Serial1.print("OK BME280 0.0 0.0 0.0 0.0"); + + Serial.print("OK BME280 0.0 0.0 0.0 0.0"); + } + + /* + mpu6050.update(); + + Serial1.print(" MPU6050 "); + Serial1.print(mpu6050.getGyroX()); + Serial1.print(" "); + Serial1.print(mpu6050.getGyroY()); + Serial1.print(" "); + Serial1.print(mpu6050.getGyroZ()); + + Serial1.print(" "); + Serial1.print(mpu6050.getAccX()); + Serial1.print(" "); + Serial1.print(mpu6050.getAccY()); + Serial1.print(" "); + Serial1.print(mpu6050.getAccZ()); + + Serial.print(" MPU6050 "); + Serial.print(mpu6050.getGyroX()); + Serial.print(" "); + Serial.print(mpu6050.getGyroY()); + Serial.print(" "); + Serial.print(mpu6050.getGyroZ()); + + Serial.print(" "); + Serial.print(mpu6050.getAccX()); + Serial.print(" "); + Serial.print(mpu6050.getAccY()); + Serial.print(" "); + Serial.print(mpu6050.getAccZ()); +*/ + +// if (MPUInterrupt) { +// if (true) { + + if (mpu.dmpGetCurrentFIFOPacket(FIFOBuffer)) + { + /* Display Euler angles in degrees */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); + + mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); + + accelx = ax / 16384.0; + accely = ay / 16384.0; + accelz = (az - 16384) / 16384.0; + acceleration = sqrt(accelx*accelx + accely*accely + accelz*accelz); + + gyrox = gx / 6.75; + gyroy = gy / 6.75; + gyroz = gz / 6.75; + rotation = sqrt(gyrox*gyrox + gyroy*gyroy + gyroz*gyroz); + + yaw = ypr[0] * 180 / M_PI; + if (yaw < 0) yaw += 360; + pitch = ypr[1] * 180 / M_PI; + if (pitch < 0) pitch += 360; + roll = ypr[2] * 180 / M_PI; + if (roll < 0) roll += 360; + + // Serial.print("_"); Serial.print(yaw); Serial.print("_"); + // } else + // Serial.print("*"); + + MPUInterrupt = false; + } else + // Serial.print("/"); + + Serial1.print(" "); // Don't know why this is needed + Serial1.print(" MPU6050 "); + Serial1.print(gyrox); Serial1.print(" "); + Serial1.print(gyroy); Serial1.print(" "); + Serial1.print(gyroz); Serial1.print(" "); + Serial1.print(accelx); Serial1.print(" "); + Serial1.print(accely); Serial1.print(" "); + Serial1.print(accelz); + + Serial.print(" MPU6050 "); + Serial.print(gyrox); Serial.print(" "); + Serial.print(gyroy); Serial.print(" "); + Serial.print(gyroz); Serial.print(" "); + Serial.print(accelx); Serial.print(" "); + Serial.print(accely); Serial.print(" "); + Serial.print(accelz); + +/* + } else { + Serial1.print("OK MPU6050 0.0 0.0 0.0 0.0 0.0 0.0"); + Serial.print("OK MPU6050 0.0 0.0 0.0 0.0 0.0 0.0"); + } +*/ + sensorValue = read_analog(); + +// Serial.println(sensorValue); + Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); + +// Serial1.print(" GPS 0 0 0 TMP "); + + Serial1.print(" GPS "); + Serial1.print(flat,4); + Serial1.print(" "); + Serial1.print(flon,4); + Serial1.print(" "); + Serial1.print(flalt,2); + + Serial1.print(" TMP "); + Serial1.print(Temp); + +// Serial1.print(" "); +// Serial1.println(Sensor2); + + Serial.print(" GPS "); + Serial.print(flat,4); + Serial.print(" "); + Serial.print(flon,4); + Serial.print(" "); + Serial.print(flalt,2); + +// Serial.print(" GPS 0 0 0 TMP "); + Serial.print(" TMP "); + Serial.print(Temp); +// Serial.print(" "); +// Serial.println(Sensor2); + +// float rotation = 0; +// rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ()); +// float acceleration = 0; +// acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ()); +// Serial.println(" "); +// Serial.print(rotation); +// Serial.print(" "); +// Serial.println(acceleration); + + if (first_read == true) { + first_read = false; + rest = acceleration; + Serial.println(" "); + Serial.print("rest acceleration: "); + Serial.println(rest); + } + + if (acceleration > 1.1 * rest) + led_set(whiteLED, HIGH); + else + led_set(whiteLED, LOW); + + if (rotation > 20) + led_set(yellowLED, HIGH); + else + led_set(yellowLED, LOW); + } + + Serial1.print(" YPR "); + Serial1.print(yaw); + Serial1.print(" "); + Serial1.print(pitch); + Serial1.print(" "); + Serial1.print(roll); + Serial1.print(" "); + + Serial.print(" YPR "); + Serial.print(yaw); + Serial.print(" "); + Serial.print(pitch); + Serial.print(" "); + Serial.print(roll); + Serial.println(" "); + + payload_loop(); // sensor extension read function defined in payload_extension.cpp + +// Serial1.println(" "); + Serial1.println(sensor_end_flag); + Serial.println(" "); + + } + + if (Serial.available() > 0) { + blink(50); + char result = Serial.read(); +// Serial.println(result); +// Serial.println("OK"); +// Serial.println(counter++); +//#if !defined (ARDUINO_ARCH_RP2040) + if (result == 'R' || result == 'r') { +// Serial1.println("OK"); +// delay(100); + Serial.println("Resetting\n"); + first_read = true; + setup(); + } + else if (result == 'D' || result == 'd') { + Serial.println("\nCurrent temperature calibration data\n"); + Serial.println(T1, DEC); + Serial.println(R1, DEC); + Serial.println(" "); + Serial.println(T2, DEC); + Serial.println(R2, DEC); + + Serial.println("\nCurrent raw temperature reading\n"); + Serial.println(sensorValue, DEC); + Serial.println(" "); + } + else if (result == 'C' || result == 'c') { + Serial.println("\nClearing stored gyro and accel offsets in EEPROM\n"); + eeprom_word_write(0, 0x00); +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + + if (EEPROM.commit()) { + Serial.println("EEPROM successfully committed\n"); + } else { + Serial.println("ERROR! EEPROM commit failed\n"); + } +#endif + first_time = true; + setup(); + } + else if (result == 'S' || result == 's') { + Serial.print("\nStoring temperature calibration data point "); // in EEPROM\n"); + Serial.print(calibration + 1); + Serial.print(" in EEPROM\n"); + + Serial.println(temp); + Serial.println(sensorValue); + Serial.println(" "); + + eeprom_word_write(calibration * 2 + 7 , (int)(temp * 10.0) + 0.5); + eeprom_word_write(calibration * 2 + 8, sensorValue); + + if (calibration == 0) { + T1 = temp; + R1 = sensorValue; + calibration = 1; + } else { + T2 = temp; + R2 = sensorValue; + calibration = 0; + } + +// calibration = (calibration + 1) % 2; +// Serial.println(calibration + 1); + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + + if (EEPROM.commit()) { + Serial.println("EEPROM successfully committed\n"); + } else { + Serial.println("ERROR! EEPROM commit failed\n"); + } +#endif + + } +//#endif + } + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + Serial.print("Squelch: "); + Serial.println(digitalRead(15)); + + get_gps(); +#else + delay(1000); // not needed due to gps 1 second polling delay + +#endif +// if (reset_count-- == 0) +// setup(); +} + +void eeprom_word_write(int addr, int val) +{ +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + EEPROM.write(addr * 2, lowByte(val)); + EEPROM.write(addr * 2 + 1, highByte(val)); +#endif +} + +short eeprom_word_read(int addr) +{ + int result = 0; +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + result = ((EEPROM.read(addr * 2 + 1) << 8) | EEPROM.read(addr * 2)); +#endif + return result; +} + +void blink_setup() +{ +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + // initialize digital pin PB1 as an output. + pinMode(PC13, OUTPUT); + pinMode(PB9, OUTPUT); + pinMode(PB8, OUTPUT); +#endif + +#if defined __AVR_ATmega32U4__ + pinMode(RXLED, OUTPUT); // Set RX LED as an output + // TX LED is set as an output behind the scenes + pinMode(whiteLED, OUTPUT); + pinMode(yellowLED,OUTPUT); +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + pinMode(LED_BUILTIN, OUTPUT); + pinMode(18, OUTPUT); // yellow LED (was blue LED on STEM Payload Board v1.3.2) + pinMode(19, OUTPUT); // white LED (was green LED on STEM Payload Board v1.3.2) +#endif + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + if (check_for_wifi()) { + wifi = true; + led_builtin_pin = LED_BUILTIN; // use default GPIO for Pico W + pinMode(LED_BUILTIN, OUTPUT); +// configure_wifi(); + } else { + led_builtin_pin = 25; // manually set GPIO 25 for Pico board +// pinMode(25, OUTPUT); + pinMode(led_builtin_pin, OUTPUT); + } + pinMode(18, OUTPUT); + pinMode(19, OUTPUT); +#endif +} + +void blink(int length) +{ +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + digitalWrite(PC13, LOW); // turn the LED on (HIGH is the voltage level) +#endif + +#if defined __AVR_ATmega32U4__ + digitalWrite(RXLED, LOW); // set the RX LED ON + TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + digitalWrite(LED_BUILTIN, HIGH); // set the built-in LED ON +#endif + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + if (wifi) + digitalWrite(LED_BUILTIN, HIGH); // set the built-in LED ON + else + digitalWrite(led_builtin_pin, HIGH); // set the built-in LED ON +#endif + +delay(length); + +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + digitalWrite(PC13, HIGH); // turn the LED off by making the voltage LOW +#endif + +#if defined __AVR_ATmega32U4__ + digitalWrite(RXLED, HIGH); // set the RX LED OFF + TXLED0; //TX LED macro to turn LED ON +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + digitalWrite(LED_BUILTIN, LOW); // set the built-in LED OFF +#endif + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + if (wifi) + digitalWrite(LED_BUILTIN, LOW); // set the built-in LED ON + else + digitalWrite(led_builtin_pin, LOW); // set the built-in LED ON +#endif +} + +void led_set(int ledPin, bool state) +{ +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + if (ledPin == whiteLED) + digitalWrite(PB9, state); + else if (ledPin == yellowLED) + digitalWrite(PB8, state); +#endif + +#if defined __AVR_ATmega32U4__ + digitalWrite(ledPin, state); +#endif + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + if (ledPin == whiteLED) + digitalWrite(19, state); + else if (ledPin == yellowLED) + digitalWrite(18, state); +#endif +} + +int read_analog() +{ + int sensorValue; + #if defined __AVR_ATmega32U4__ + sensorValue = analogRead(A3); +#endif + +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + sensorValue = analogRead(PA7); +#endif +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + sensorValue = analogRead(28); +#endif + return(sensorValue); +} + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) +bool check_for_wifi() { + + pinMode(29, INPUT); + const float conversion_factor = 3.3f / (1 << 12); + uint16_t result = analogRead(29); +// Serial.printf("ADC3 value: 0x%03x, voltage: %f V\n", result, result * conversion_factor); + + if (result < 0x10) { + Serial.println("\nPico W detected!\n"); + return(true); + } + else { + Serial.println("\nPico detected!\n"); + return(false); + } +} +#endif + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) +void get_gps() { +// Serial.println("Getting GPS data"); + bool newData = false; + unsigned long start = millis(); + +// for (unsigned long start = millis(); millis() - start < 1000;) // 5000;) + while ((millis() - start) < 1000) // 5000;) + { + while (Serial2.available()) + { + char c = Serial2.read(); + if (show_gps) + Serial.write(c); // uncomment this line if you want to see the GPS data flowing + if (gps.encode(c)) // Did a new valid sentence come in? + newData = true; + } + } + if (newData) { + Serial.print("GPS read new data in ms: "); + Serial.println(millis() - start); + +// float flon = 0.0, flat = 0.0, flalt = 0.0; +// unsigned long age; +// starting = millis(); +// gps.f_get_position(&flat, &flon, &age); + + Serial.print(F("Location: ")); + if (gps.location.isValid()) + { + Serial.print(gps.location.lat(), 6); + Serial.print(F(",")); + Serial.print(gps.location.lng(), 6); + + flat = gps.location.lat(); + flon = gps.location.lng(); + flalt = gps.altitude.meters(); + } + else + { + Serial.print(F("INVALID")); + } + Serial.print("\r\n"); + + } else +// Serial.printf("GPS read no new data: %d\n", millis() - start); + ; +} +#endif From 7555f9668c68c6b2cd688fec373561d002c8a746 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 16:25:48 -0400 Subject: [PATCH 1513/1744] Create payload_extension.cpp --- .../payload_extension.cpp | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp diff --git a/stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp b/stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp new file mode 100644 index 00000000..5b8dd2ec --- /dev/null +++ b/stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp @@ -0,0 +1,25 @@ +// Use this template for adding additional sensors +// see Payload_BME280_MPU6050_XS_Extended for an example + +// put your library includes here +#include "Arduino.h" + +// put your globals here + +// put your setup code here +void payload_setup() { + +// Serial.println("Starting new sensor!"); + +} + +// put your loop code here +// Very Important: only use print, not println!! +void payload_loop() { + +/* + Serial1.print(" NEW 0.0"); // send sensor data over serial to Pi Zero + Serial.print(" NEW 0.0"); // send sensor data over serial monitor for testing +*/ + +} From c383b556937785791d3bcf0175a5e2efc817f398 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 16:37:05 -0400 Subject: [PATCH 1514/1744] Update config.yaml add ping and htop --- OliveTin/config.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 05db8bc3..92e6fb70 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -152,6 +152,21 @@ actions: - name: hostname type: ascii_sentence + - title: "Ping a Host or IP address" + icon: 🛜" # wireless + shell: echo "This will run for 15 seconds" && ping {{ hostname_or_ip_address }} + onclick: execution-dialog + timeout: 15 + arguments: + - name: hostname_or_ip_address + type: ascii_sentence + + - title: "See Running Processes (htop)" + icon: logs + shell: echo "You can't interact with this command. It will timeout after 15 seconds" && htop + onclick: execution-dialog + timeout: 15 + - title: "Show Available WiFi Networks" icon: "🛜" # wireless shell: sudo nmcli device wifi rescan && nmcli device wifi list @@ -601,6 +616,8 @@ dashboards: - title: "Change Hostname and Restart" - title: "Show Network Configuration" - title: "Show Available WiFi Networks" + - title: "Ping a Host or IP address" + - title: "See Running Processes" # - title: "Signin to Raspberry Pi Connect" # OliveTin needs to run as pi # - title: "Signout of Raspberry Pi Connect" # - title: "Status of Raspberry Pi Connect" From ac3e9b65673751b1c884134c964d13761aaf8842 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 16:40:52 -0400 Subject: [PATCH 1515/1744] Update config.yaml missing " --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 92e6fb70..fe74ce20 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -153,7 +153,7 @@ actions: type: ascii_sentence - title: "Ping a Host or IP address" - icon: 🛜" # wireless + icon: "🛜" # wireless shell: echo "This will run for 15 seconds" && ping {{ hostname_or_ip_address }} onclick: execution-dialog timeout: 15 From 52e68543aa1c3c562a603df05183bde2d3414e54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 16:42:57 -0400 Subject: [PATCH 1516/1744] Update config.yaml change to top --- OliveTin/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index fe74ce20..b427c28f 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -161,9 +161,9 @@ actions: - name: hostname_or_ip_address type: ascii_sentence - - title: "See Running Processes (htop)" + - title: "See Running Processes" icon: logs - shell: echo "You can't interact with this command. It will timeout after 15 seconds" && htop + shell: echo "This command will timeout after 15 seconds" && top onclick: execution-dialog timeout: 15 From 4bdd754241bebe4d4dbbc54198b3aefe401ab6e0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 16:45:19 -0400 Subject: [PATCH 1517/1744] Update config.yaml remove echos --- OliveTin/config.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index b427c28f..3e9cdf47 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -154,7 +154,8 @@ actions: - title: "Ping a Host or IP address" icon: "🛜" # wireless - shell: echo "This will run for 15 seconds" && ping {{ hostname_or_ip_address }} +# shell: echo "This will run for 15 seconds" && ping {{ hostname_or_ip_address }} + shell: ping {{ hostname_or_ip_address }} onclick: execution-dialog timeout: 15 arguments: @@ -163,7 +164,8 @@ actions: - title: "See Running Processes" icon: logs - shell: echo "This command will timeout after 15 seconds" && top +# shell: echo "This command will timeout after 15 seconds" && top + shell: top onclick: execution-dialog timeout: 15 From f5dbb6ba473f94fcaa55735b8ba5cb0847050722 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 8 Aug 2026 16:48:52 -0400 Subject: [PATCH 1518/1744] Update config.yaml try top again --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 3e9cdf47..969fbf02 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -165,7 +165,7 @@ actions: - title: "See Running Processes" icon: logs # shell: echo "This command will timeout after 15 seconds" && top - shell: top + shell: top -b -n 1 2>&1 onclick: execution-dialog timeout: 15 From 0e7f25e289cdf5ccbdc3c5b257ff4da826c7b4ef Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 09:24:49 -0400 Subject: [PATCH 1519/1744] Update main.c add signal(SIGCHLD, SIG_IGN) --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 7c063513..34d3d9c7 100644 --- a/main.c +++ b/main.c @@ -2410,6 +2410,7 @@ FILE *sopen(const char *program) _exit(127); } /* parent */ + signal(SIGCHLD, SIG_IGN); close(fds[1]); return fdopen(fds[0], "r+"); } From f190a849f88d7261bbbb6fbda4f93f5ae15b376a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 09:33:53 -0400 Subject: [PATCH 1520/1744] Update main.c add signal.h --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 34d3d9c7..447fc278 100644 --- a/main.c +++ b/main.c @@ -20,6 +20,7 @@ */ #include "main.h" +#include //#define HAB // uncomment to change APRS icon from Satellite to Balloon and only BAT telemetry From 047367c11a774257aa56678bd089bb89fb56e533 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 13:47:36 -0400 Subject: [PATCH 1521/1744] Update pushbutton.py add hotspot_always_on and default password --- pushbutton.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index f5b1395e..9d3a9302 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -25,6 +25,7 @@ def read_config_ini(): # Access the values like a dictionary hotspot_ssid = config['Hotspot']['hotspot_ssid'] hotspot_password = config['Hotspot']['hotspot_password'] + hotspot_always_on = config['Hotspot']['hotspot_hotspot_always_on'] web_term_hotspot = config['Hotspot']['web_term_hotspot'] web_term_wifi = config['Hotspot']['web_term_wifi'] # dashboard_port = config.getint('Hotspot', 'dashboard_port') @@ -35,7 +36,8 @@ def read_config_ini(): print(f"An error occurred: {e}") print(" failed, setting defaults") hotspot_ssid = "CubeSat" - hotspot_password = "amsat" + hotspot_password = "amsatcubesat" + hotspot_always_on = "no" web_term_hotspot = "yes" web_term_wifi = "no" # dashboard_port = 80 @@ -159,7 +161,7 @@ GPIO.output(powerPin, 0) GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) read_config_ini() -if not GPIO.input(push_button): # if pushbutton is held down during boot +if not GPIO.input(push_button) || hotspot_always_on = "yes": # if pushbutton is held down during boot or configured always on print("Activating WiFi access point!", flush=True) GPIO.output(powerPin, 1) sleep(0.1) From e67d1a4c996457ede8c8edb9cee9e8526362034a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 13:49:07 -0400 Subject: [PATCH 1522/1744] Update hotspot_ini add hotspot_always_on --- hotspot_ini | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hotspot_ini b/hotspot_ini index fdbb8c60..f3238aa2 100644 --- a/hotspot_ini +++ b/hotspot_ini @@ -3,6 +3,8 @@ hotspot_ssid=CubeSat # WiFi hotspot password - note: this password is stored in the clear! hotspot_password=amsatcubesat +# WiFi hotspot always on regardless of pushbutton +hotspot_always_on=no # Web Dashboard port number. If 80, no port needs to be entered in browser # dashboard_port=80 # Web terminal setting during hotspot - note, there is no authentication for this! From 3210f68435778b8661e78e407b2cc44eccc00b7c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 13:51:01 -0400 Subject: [PATCH 1523/1744] Update pushbutton.py fix or --- pushbutton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index 9d3a9302..88286044 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -161,7 +161,7 @@ GPIO.output(powerPin, 0) GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) read_config_ini() -if not GPIO.input(push_button) || hotspot_always_on = "yes": # if pushbutton is held down during boot or configured always on +if not GPIO.input(push_button) or hotspot_always_on = "yes": # if pushbutton is held down during boot or configured always on print("Activating WiFi access point!", flush=True) GPIO.output(powerPin, 1) sleep(0.1) From 31954dc990f8b90b894b85eca134b99df769fe6e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 13:52:29 -0400 Subject: [PATCH 1524/1744] Update pushbutton.py fix == --- pushbutton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index 88286044..14faae82 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -161,7 +161,7 @@ GPIO.output(powerPin, 0) GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) read_config_ini() -if not GPIO.input(push_button) or hotspot_always_on = "yes": # if pushbutton is held down during boot or configured always on +if not GPIO.input(push_button) or hotspot_always_on == "yes": # if pushbutton is held down during boot or configured always on print("Activating WiFi access point!", flush=True) GPIO.output(powerPin, 1) sleep(0.1) From 1ecf2d5261cbb2c50f39cc0bc1e9e092c20c675c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 14:00:21 -0400 Subject: [PATCH 1525/1744] Update pushbutton.py make always on global --- pushbutton.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pushbutton.py b/pushbutton.py index 14faae82..0451ed8f 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -12,6 +12,7 @@ import configparser def read_config_ini(): global hotspot_ssid global hotspot_password + global hotspot_always_on global web_term_hotspot global web_term_wifi # global dashboard_port From 115685e0ab89c0dcd956466e4836ddfa77395d36 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 14:04:49 -0400 Subject: [PATCH 1526/1744] Update pushbutton.py changed to hotspot_default --- pushbutton.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 0451ed8f..35329e1b 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -12,7 +12,7 @@ import configparser def read_config_ini(): global hotspot_ssid global hotspot_password - global hotspot_always_on + global hotspot_default global web_term_hotspot global web_term_wifi # global dashboard_port @@ -26,7 +26,7 @@ def read_config_ini(): # Access the values like a dictionary hotspot_ssid = config['Hotspot']['hotspot_ssid'] hotspot_password = config['Hotspot']['hotspot_password'] - hotspot_always_on = config['Hotspot']['hotspot_hotspot_always_on'] + hotspot_default = config['Hotspot']['hotspot_default'] web_term_hotspot = config['Hotspot']['web_term_hotspot'] web_term_wifi = config['Hotspot']['web_term_wifi'] # dashboard_port = config.getint('Hotspot', 'dashboard_port') @@ -38,7 +38,7 @@ def read_config_ini(): print(" failed, setting defaults") hotspot_ssid = "CubeSat" hotspot_password = "amsatcubesat" - hotspot_always_on = "no" + hotspot_default = "no" web_term_hotspot = "yes" web_term_wifi = "no" # dashboard_port = 80 @@ -162,7 +162,7 @@ GPIO.output(powerPin, 0) GPIO.setup(push_button, GPIO.IN, pull_up_down=GPIO.PUD_UP) read_config_ini() -if not GPIO.input(push_button) or hotspot_always_on == "yes": # if pushbutton is held down during boot or configured always on +if not GPIO.input(push_button) or hotspot_default == "yes": # if pushbutton is held down during boot or configured as default print("Activating WiFi access point!", flush=True) GPIO.output(powerPin, 1) sleep(0.1) From 1a96ade677ad63d43a9513f4af72e4d7c654c7e3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 14:05:16 -0400 Subject: [PATCH 1527/1744] Update hotspot_ini changed to hotspot_default --- hotspot_ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotspot_ini b/hotspot_ini index f3238aa2..926de3ea 100644 --- a/hotspot_ini +++ b/hotspot_ini @@ -4,7 +4,7 @@ hotspot_ssid=CubeSat # WiFi hotspot password - note: this password is stored in the clear! hotspot_password=amsatcubesat # WiFi hotspot always on regardless of pushbutton -hotspot_always_on=no +hotspot_default=no # Web Dashboard port number. If 80, no port needs to be entered in browser # dashboard_port=80 # Web terminal setting during hotspot - note, there is no authentication for this! From 1938fc808491be1ed26c791ad49d46a0f20bb379 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 14:13:23 -0400 Subject: [PATCH 1528/1744] Update pushbutton.py add hotspot default print --- pushbutton.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushbutton.py b/pushbutton.py index 35329e1b..e8e2de57 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -31,7 +31,7 @@ def read_config_ini(): web_term_wifi = config['Hotspot']['web_term_wifi'] # dashboard_port = config.getint('Hotspot', 'dashboard_port') - print(f"SSID: {hotspot_ssid} Password: {hotspot_password} Term Hotspot: {web_term_hotspot} Term WiFi {web_term_wifi}") # : {dashboard_}") + print(f"SSID: {hotspot_ssid} Password: {hotspot_password} Hotspot Default: {hotspot_default} Term Hotspot: {web_term_hotspot} Term WiFi {web_term_wifi}") # : {dashboard_}") except Exception as e: print(f"An error occurred: {e}") From 5eba77f10068226ad16d10708e642fdd31cee1a7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 15:15:22 -0400 Subject: [PATCH 1529/1744] Update config.yaml directory --- OliveTin/config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 969fbf02..3a994dac 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -169,6 +169,12 @@ actions: onclick: execution-dialog timeout: 15 + - title: "CubeSatSim Directory" + icon: logs + shell: ls -all /home/pi/CubeSatSim + onclick: execution-dialog + timeout: 15 + - title: "Show Available WiFi Networks" icon: "🛜" # wireless shell: sudo nmcli device wifi rescan && nmcli device wifi list @@ -620,6 +626,7 @@ dashboards: - title: "Show Available WiFi Networks" - title: "Ping a Host or IP address" - title: "See Running Processes" + - title: "CubeSatSim Directory" # - title: "Signin to Raspberry Pi Connect" # OliveTin needs to run as pi # - title: "Signout of Raspberry Pi Connect" # - title: "Status of Raspberry Pi Connect" From d28077903f72d527800a74847234c914d3f35345 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 15:57:25 -0400 Subject: [PATCH 1530/1744] Update install add daemon reload for OliveTin --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 5ae4eb80..de70a2b2 100755 --- a/install +++ b/install @@ -777,6 +777,7 @@ if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/systemd/OliveTin.service /etc/systemd/system/OliveTin.service) ]]; then echo "changed OliveTin.service." sudo cp /home/pi/CubeSatSim/systemd/OliveTin.service /etc/systemd/system/OliveTin.service + sudo systemctl daemon-reload sudo systemctl restart OliveTin FLAG=1 else @@ -785,6 +786,7 @@ if [ -f "$FILE" ]; then else echo "creating OliveTin.service." sudo cp /home/pi/CubeSatSim/systemd/OliveTin.service /etc/systemd/system/OliveTin.service + sudo systemctl daemon-reload sudo systemctl enable OliveTin FLAG=1 fi From 86f4c2a21c008d8bc7e5e10dde8b047665f60199 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 16:45:28 -0400 Subject: [PATCH 1531/1744] Update install create hotspot.ini file if not there --- install | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install b/install index de70a2b2..20e0e7af 100755 --- a/install +++ b/install @@ -51,14 +51,18 @@ else echo "434900000 435000000" > frequency.txt - cp /home/pi/CubeSatSim/hotspot_ini /home/pi/CubeSatSim/hotspot.ini - /home/pi/CubeSatSim/config -c -n /home/pi/CubeSatSim/config -l -n fi +FILE=/home/pi/CubeSatSim/hotspot.ini +if [ ! -f "$FILE" ]; then + echo "Creating hotspot.ini configuration file. You can edit it to change Wi-Fi hotspot options" + cp /home/pi/CubeSatSim/hotspot_ini /home/pi/CubeSatSim/hotspot.ini +fi + if [[ $(grep '11.' /etc/debian_version) ]]; then BULLSEYE=1 From 539009103a754e430c9bdf557b258217a768ec2f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 22:38:58 -0400 Subject: [PATCH 1532/1744] Update install add bookworm and bullseye commands --- install | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/install b/install index 20e0e7af..ebb5df2e 100755 --- a/install +++ b/install @@ -161,6 +161,38 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo "force_turbo=1" >> /boot/config.txt'; fi sudo sh -c 'echo "\n" >> /boot/config.txt' + + if [[ $(sudo systemctl is-active NetworkManager | grep inactive) ]]; then + echo "NetworkManager is inactive" + echo "In order to use the Wi-Fi hotspot, NetworkManager needs to be enabled and configured." + echo + echo "Do you want to re-configure your Wi-Fi (y/n) " + read choice + echo + if [ "$choice" = "y" ] || [ "$choice" = "yes" ] ; then + sudo systemctl disable dhcpcd + sudo systemctl enable NetworkManager + echo "Enter your Wi-Fi SSID" + read ssid + echo "Enter your Wi-Fi password" + read password + sudo nmcli dev wifi connect "$ssid" password "$password" + echo "Wi-Fi will be updated after reboot" + else + echo "Not enabling NetworkManager." + fi + fi + + FILE=/usr/bin/ttyd + if [ -f "$FILE" ]; then + echo "$FILE exists." + else + cd /tmp + wget https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.armhf + chmod +x ttyd.armhf + sudo cp ttyd.armhf $FILE + fi + fi if [[ $(grep 'bookworm' /etc/os-release) ]]; then @@ -273,6 +305,14 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi + FILE=/boot/firmware/cmdline.txt + if [[ $(grep "vc4.force_hotplug=1" $FILE) ]]; then + echo "vc4.force_hotplug=1 already in $FILE"; + else + echo "adding vc4.force_hotplug=1 to $FILE"; + sudo sed -i '1s/^/vc4.force_hotplug=1 /' $FILE + fi + # if [ ! -d "/var/log/journal" ]; then # persistant journal logs across boots echo "Setting up journal logs across boots" sudo mkdir -p /var/log/journal &>/dev/null From 9e26be2686de6b271d453cd16963b5691de4be5d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 9 Aug 2026 22:41:00 -0400 Subject: [PATCH 1533/1744] Update install NetworkManager to manage WiFi --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index ebb5df2e..6a44ccc6 100755 --- a/install +++ b/install @@ -172,6 +172,7 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then if [ "$choice" = "y" ] || [ "$choice" = "yes" ] ; then sudo systemctl disable dhcpcd sudo systemctl enable NetworkManager + sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi echo "Enter your Wi-Fi SSID" read ssid echo "Enter your Wi-Fi password" From 8ea3e00fcb2a8635638412ba65b05355bb7bb305 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 08:57:23 -0400 Subject: [PATCH 1534/1744] Update config Doppler works for PacSat mode --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 3e95caab..1bc3da90 100755 --- a/config +++ b/config @@ -289,8 +289,8 @@ RXPL=${10} TXPL=${11} # echo ${14} - if [[ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then - echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, and Repeater modes)" + if [[ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") || "$MODE" == "G") ]] ; then + echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, PacSat, and Repeater modes)" echo -n "TX Frequency is approximately: " echo -n ${7} echo -n " MHz, RX Frequency is: " From 4f57ffe5bf3e669921f125e9ebcade2b4437c4e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 08:58:36 -0400 Subject: [PATCH 1535/1744] Update config extra ) --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 1bc3da90..593ffb82 100755 --- a/config +++ b/config @@ -289,7 +289,7 @@ RXPL=${10} TXPL=${11} # echo ${14} - if [[ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") || "$MODE" == "G") ]] ; then + if [[ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j" || "$MODE" == "G") ]] ; then echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, PacSat, and Repeater modes)" echo -n "TX Frequency is approximately: " echo -n ${7} From 63fd2c5cc4a979d1b53657926893d967119241e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 10:44:27 -0400 Subject: [PATCH 1536/1744] Update install start NetworkManager before cli --- install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install b/install index 96aa5372..c8144caf 100755 --- a/install +++ b/install @@ -172,9 +172,10 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then read choice echo if [ "$choice" = "y" ] || [ "$choice" = "yes" ] ; then + sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi sudo systemctl disable dhcpcd sudo systemctl enable NetworkManager - sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi + sudo systemctl start NetworkManager echo "Enter your Wi-Fi SSID" read ssid echo "Enter your Wi-Fi password" From 446ec06bf4848b42787fdd9a7a75e09090b1e500 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 12:08:00 -0400 Subject: [PATCH 1537/1744] Update frequency.py don't check frequency if doppler off --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index d05b2e82..1191d969 100644 --- a/frequency.py +++ b/frequency.py @@ -788,7 +788,7 @@ except Exception as e: if (doppler_mode == 'off'): tx_freq_hz = txf * 1e6 rx_freq_hz = rxf * 1e6 - check_frequency() +# check_frequency() print("writing sim.cfg frequency to frequency.txt") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{tx_freq_hz:.0f} {rx_freq_hz:.0f}") From 99214c5e245ec5eca2d80f0ef44ea53a4a388473 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 13:46:57 -0400 Subject: [PATCH 1538/1744] Update config.yaml 30 sec for Pacsat modes --- OliveTin/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 3a994dac..4c51402a 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -83,13 +83,13 @@ actions: shell: /home/pi/CubeSatSim/config -G icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Change Mode to Pacsat Ground Station" shell: /home/pi/CubeSatSim/config -I icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 30 - title: "Turn Battery Saver Mode ON" shell: bash -c "/home/pi/CubeSatSim/config -B yes" From bdec980ba388defa6cab74748151ff2a220c963e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 15:25:24 -0400 Subject: [PATCH 1539/1744] Update pushbutton.py add ttyd -W --- pushbutton.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index e8e2de57..bad883e5 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -188,10 +188,10 @@ if not GPIO.input(push_button) or hotspot_default == "yes": # if pushbutton is h print(result, flush=True) sleep(2) if web_term_hotspot == "yes": - subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8081', 'bash']) + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-W', '-p', '8081', 'bash']) print("Starting web terminal on port 8081") elif web_term_wifi == "yes": - subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8081', 'bash']) + subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-W', '-p', '8081', 'bash']) print("Starting web terminal on port 8081") GPIO.setup(powerPin, GPIO.OUT) GPIO.output(powerPin, 1) From b5fc1b78900eaebbd8f3448b9f7f6be7c39f5cb7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 16:59:43 -0400 Subject: [PATCH 1540/1744] Update transmit.py add command_tx for CW doppler --- transmit.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/transmit.py b/transmit.py index 2f1c5c19..135bb6a7 100644 --- a/transmit.py +++ b/transmit.py @@ -1048,17 +1048,18 @@ if __name__ == "__main__": ## ch = 1 for chan in range(7): if (doppler_mode): - try: -# update_doppler() - filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" - print(filename) - file = open(filename) - cw_string = file.readline() - print(cw_string) - cw_transmit_string(cw_string) - except Exception as e: - print(f"An error occurred: {e}") - print("error reading cw string " + str(chan)) + if (command_tx == True): + try: + # update_doppler() + filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" + print(filename) + file = open(filename) + cw_string = file.readline() + print(cw_string) + cw_transmit_string(cw_string) + except Exception as e: + print(f"An error occurred: {e}") + print("error reading cw string " + str(chan)) else: command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" print(command) From 7510ff965d8e853f62d0e3af1ab1d3bb7eb60b44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 22:54:34 -0400 Subject: [PATCH 1541/1744] Update config command_count no \n --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 593ffb82..4027c9a5 100755 --- a/config +++ b/config @@ -1041,7 +1041,7 @@ elif [ "$1" = "-R" ]; then if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then sudo rm /home/pi/CubeSatSim/command_count.txt > /dev/null 2>&1 echo "Commands count reset to 0" - echo "0" > /home/pi/CubeSatSim/command_count.txt + echo -n "0" > /home/pi/CubeSatSim/command_count.txt else echo "Commands count not reset" fi From df685634d0f0293b73a40cbe2a0c824481b1f961 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 22:55:21 -0400 Subject: [PATCH 1542/1744] Update install command_count no \n --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index c8144caf..6333ab96 100755 --- a/install +++ b/install @@ -403,7 +403,7 @@ if [ -f "$FILE" ]; then echo "$FILE exists." else echo "creating $FILE" - echo "0\n" > /home/pi/CubeSatSim/command_count.txt + echo -n "0" > /home/pi/CubeSatSim/command_count.txt fi sudo apt-get update && sudo apt-get dist-upgrade -y From f09e006a59c2b1250cceb0715dba1452d10f8384 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 23:19:39 -0400 Subject: [PATCH 1543/1744] Update config frequency.txt --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 4027c9a5..724209b5 100755 --- a/config +++ b/config @@ -308,7 +308,7 @@ TXPL=${11} elif [ "${14}" = "rig" ] ; then echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " - head -c -11 frequency.txt + head -c -11 /home/pi/CubeSatSim/frequency.txt echo -e "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite" elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" @@ -1604,7 +1604,7 @@ elif [ "$1" = "-g" ]; then echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60 no" > /home/pi/CubeSatSim/sim.cfg - echo "434900000 435000000" > frequency.txt + echo "434900000 435000000" > /home/pi/CubeSatSim/frequency.txt sudo echo "b" > /home/pi/CubeSatSim/.mode From 60ea50e4986b4ab6be676ac5f16d2e7d181f7269 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 10 Aug 2026 23:27:15 -0400 Subject: [PATCH 1544/1744] Update log add sudo rm log files before --- log | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/log b/log index 996c129f..453fc893 100755 --- a/log +++ b/log @@ -64,33 +64,40 @@ if [ "$REALTIME" = "1" ] ; then else if [ "$1" = "-t" ] ; then + sudo rm /home/pi/CubeSatSim/logt.txt sudo journalctl -b all -a -u transmit > /home/pi/CubeSatSim/logt.txt cat /home/pi/CubeSatSim/logt.txt echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then + sudo rm /home/pi/CubeSatSim/logc.txt sudo journalctl -b all -a -u command > /home/pi/CubeSatSim/logc.txt cat /home/pi/CubeSatSim/logc.txt echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then + sudo rm /home/pi/CubeSatSim/logp.txt sudo journalctl -b all -a -u pacsatsim > /home/pi/CubeSatSim/logp.txt cat /home/pi/CubeSatSim/logp.txt echo -e "\nPacSat Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then + sudo rm /home/pi/CubeSatSim/logr.txt sudo journalctl -b all -a -u frequency > /home/pi/CubeSatSim/logr.txt cat /home/pi/CubeSatSim/logr.txt - echo -e "\nFrequency Log file also saved as /home/pi/CubeSatSim/logf.txt" + echo -e "\nFrequency Log file also saved as /home/pi/CubeSatSim/logr.txt" elif [ "$1" = "-f" ] ; then cat /home/pi/CubeSatSim/frequency.txt echo elif [ "$1" = "-b" ]; then + sudo rm /home/pi/CubeSatSim/logb.txt sudo journalctl -b all -a -u pushbutton > /home/pi/CubeSatSim/logb.txt cat /home/pi/CubeSatSim/logb.txt echo -e "\nPushbutton Log file also saved as /home/pi/CubeSatSim/logb.txt" elif [ "$1" = "-o" ]; then + sudo rm /home/pi/CubeSatSim/logo.txt sudo journalctl -b all -a -u OliveTin > /home/pi/CubeSatSim/logo.txt cat /home/pi/CubeSatSim/logo.txt echo -e "\nOliveTin Log file also saved as /home/pi/CubeSatSim/logo.txt" else + sudo rm /home/pi/CubeSatSim/log.txt sudo journalctl -b all -a -u cubesatsim > /home/pi/CubeSatSim/log.txt cat /home/pi/CubeSatSim/log.txt echo -e "\nLog file also saved as /home/pi/CubeSatSim/log.txt" From bbab3082c92a0bd094731c1cab7ddbe531481c81 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 09:15:04 -0400 Subject: [PATCH 1545/1744] Update config.yaml 120 seconds for I2C --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 4c51402a..1f542554 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -381,7 +381,7 @@ actions: shell: /home/pi/CubeSatSim/config -S icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Clear Logs and Restart" shell: /home/pi/CubeSatSim/config -C From f9df21975714d72b3bfdfc53df952d0350aa6135 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 09:28:20 -0400 Subject: [PATCH 1546/1744] Update config.yaml USB to logs --- OliveTin/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 1f542554..a6936683 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -212,7 +212,7 @@ actions: timeout: 5 - title: "List USB Devices" - icon: "⚙" # gear + icon: logs shell: lsusb onclick: execution-dialog timeout: 5 From 853130aea8e0f38a6ce43b0642c1488b9acea1be Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 09:46:42 -0400 Subject: [PATCH 1547/1744] Update config.yaml 10 seconds default --- OliveTin/config.yaml | 86 ++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 43 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index a6936683..8f28307a 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -20,19 +20,19 @@ actions: shell: /home/pi/CubeSatSim/config icon: logs onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Show All Commands" shell: /home/pi/CubeSatSim/config -h icon: logs onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "General CubeSatSim Config" shell: /home/pi/CubeSatSim/config {{ config }} icon: "⚙" # gear onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: config type: ascii_sentence @@ -41,43 +41,43 @@ actions: shell: /home/pi/CubeSatSim/config -a icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change Mode to FSK" shell: /home/pi/CubeSatSim/config -f icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change Mode to BPSK" shell: /home/pi/CubeSatSim/config -b icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change Mode to SSTV" shell: /home/pi/CubeSatSim/config -s icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change Mode to CW" shell: /home/pi/CubeSatSim/config -m icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change Mode to Repeater" shell: /home/pi/CubeSatSim/config -e icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change Mode to FUNcube" shell: /home/pi/CubeSatSim/config -j icon: "🛰" # satellite onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change Mode to Pacsat" shell: /home/pi/CubeSatSim/config -G @@ -95,37 +95,37 @@ actions: shell: bash -c "/home/pi/CubeSatSim/config -B yes" icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Battery Saver Mode OFF" shell: bash -c "/home/pi/CubeSatSim/config -B no" icon: "❌" # red X onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Doppler Mode OFF" shell: /home/pi/CubeSatSim/config -K no icon: "❌" # red X onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Simulated Doppler Mode ON" shell: /home/pi/CubeSatSim/config -K sim icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Radio Control Doppler Mode ON" shell: /home/pi/CubeSatSim/config -K rig icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Change TX and RX Frequency" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -F {{ tx }} {{ rx }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: tx type: ascii_sentence @@ -191,7 +191,7 @@ actions: # icon: "🍓" # strawberry # shell: sudo su pi - rpi-connect signout # onclick: execution-dialog -# timeout: 5 +# timeout: 10 # - title: "Status of Raspberry Pi Connect" # icon: "🍓" # strawberry @@ -203,25 +203,25 @@ actions: icon: "🛜" # wireless shell: ifconfig onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "List Audio Devices Speakers and Microphones" icon: "🔉" # speaker shell: aplay -l && arecord -l onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "List USB Devices" icon: logs shell: lsusb onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Set PL (Private Line) CTCSS/CDCSS" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -P {{ pl_rx }} {{ pl_tx }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: pl_rx type: ascii_sentence @@ -232,7 +232,7 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -c {{ callsign }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: callsign type: ascii_sentence @@ -241,7 +241,7 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -l {{ latitude }} {{ longitude }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: latitude type: ascii_sentence @@ -363,19 +363,19 @@ actions: shell: echo "Restarting CubeSatSim now!" && sudo reboot now icon: restart onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Shutdown CubeSatSim" shell: echo "Shutting Down CubeSatSim now!" && sudo shutdown now icon: restart onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Restart CubeSatSim Software" shell: /home/pi/CubeSatSim/config -i icon: restart onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Scan I2C Bus" shell: /home/pi/CubeSatSim/config -S @@ -387,7 +387,7 @@ actions: shell: /home/pi/CubeSatSim/config -C icon: restart onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Display Squelch" shell: /home/pi/CubeSatSim/config -Q @@ -411,37 +411,37 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -k onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Reset the Commands Count" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -R yes onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Simulated Telemetry ON" shell: /home/pi/CubeSatSim/config -t yes icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Simulated Telemetry OFF" shell: /home/pi/CubeSatSim/config -t no icon: "❌" # red X onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Balloon Mode ON" shell: /home/pi/CubeSatSim/config -H yes icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Balloon Mode OFF" shell: /home/pi/CubeSatSim/config -H no icon: "❌" # red X onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn gpsd ON" shell: /home/pi/CubeSatSim/config -u yes @@ -459,31 +459,31 @@ actions: shell: /home/pi/CubeSatSim/config -T yes icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Command and Control OFF" shell: /home/pi/CubeSatSim/config -T no icon: "❌" # red X onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Command and Control Direwolf ON" shell: /home/pi/CubeSatSim/config -d yes icon: "🟢" # green ball onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Turn Command and Control Direwolf OFF" shell: /home/pi/CubeSatSim/config -d no icon: "❌" # red X onclick: execution-dialog - timeout: 5 + timeout: 10 - title: "Set FoxTelem Reset Count" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -r {{ resets }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: resets type: ascii_sentence @@ -492,7 +492,7 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -q {{ squelch }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: squelch type: ascii_sentence @@ -501,7 +501,7 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -L {{ mic_level }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: mic_level type: ascii_sentence @@ -510,7 +510,7 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -M {{ failure_mode }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: failure_mode type: ascii_sentence @@ -519,7 +519,7 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -U {{ random_time }} onclick: execution-dialog - timeout: 5 + timeout: 10 arguments: - name: random_time type: ascii_sentence @@ -528,7 +528,7 @@ actions: icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -o onclick: execution-dialog - timeout: 5 + timeout: 10 dashboards: - title: CubeSatSim Dashboard From 195ac3651b769019b917de5068a1dd4dbfc57042 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 10:14:45 -0400 Subject: [PATCH 1548/1744] Update config.yaml realtime logs 2 min --- OliveTin/config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 8f28307a..98e66681 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -252,7 +252,7 @@ actions: shell: /home/pi/CubeSatSim/log -d r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "CubeSatSim Log" shell: /home/pi/CubeSatSim/log -d @@ -264,7 +264,7 @@ actions: shell: /home/pi/CubeSatSim/log -t r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Transmit Log" shell: /home/pi/CubeSatSim/log -t @@ -276,7 +276,7 @@ actions: shell: /home/pi/CubeSatSim/log -r r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Frequency Control Log" shell: /home/pi/CubeSatSim/log -r @@ -288,7 +288,7 @@ actions: shell: /home/pi/CubeSatSim/log -f r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Frequency Display Log" shell: /home/pi/CubeSatSim/log -f @@ -300,7 +300,7 @@ actions: shell: /home/pi/CubeSatSim/log -p r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Pacsat Log" shell: /home/pi/CubeSatSim/log -p @@ -312,7 +312,7 @@ actions: shell: /home/pi/CubeSatSim/log -b r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Pushbutton Log" shell: /home/pi/CubeSatSim/log -b @@ -324,7 +324,7 @@ actions: shell: /home/pi/CubeSatSim/log -c r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Command and Control Log" shell: /home/pi/CubeSatSim/log -c @@ -336,7 +336,7 @@ actions: shell: /home/pi/CubeSatSim/log -o r icon: logs onclick: execution-dialog - timeout: 60 + timeout: 120 - title: "Web (OliveTin) Log" shell: /home/pi/CubeSatSim/log -o From d02c3c721a94600287abba3552ed217ad688891b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 15:49:55 -0400 Subject: [PATCH 1549/1744] Update config.yaml turn on and off random mode --- OliveTin/config.yaml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 98e66681..8944788b 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -515,6 +515,24 @@ actions: - name: failure_mode type: ascii_sentence + - title: "Turn Off Simulated Failure Mode" + icon: "❌" # red X + shell: /home/pi/CubeSatSim/config -M 0 + onclick: execution-dialog + timeout: 10 + + - title: "Turn Random Simulated Failure Mode ON" + icon: "🟢" # green ball + shell: /home/pi/CubeSatSim/config -U yes + onclick: execution-dialog + timeout: 10 + + - title: "Turn Random Simulated Failure Mode OFF" + icon: "❌" # red X + shell: /home/pi/CubeSatSim/config -U no + onclick: execution-dialog + timeout: 10 + - title: "Set Random Simulated Failure Time" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -U {{ random_time }} @@ -561,6 +579,8 @@ dashboards: - title: "Change Telemetry Beacon Transmit State" - title: "Set Microphone Level for Command and Control" - title: "Set Simulated Failure Mode" + - title: "Turn Random Simulated Failure Mode ON" + - title: "Turn Random Simulated Failure Mode OFF" - title: "Set Random Simulated Failure Time" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" From 5ad81e1d219ec004ec924200d31da383214388e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 15:54:55 -0400 Subject: [PATCH 1550/1744] Update config.yaml order --- OliveTin/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 8944788b..09ceccc4 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -578,6 +578,8 @@ dashboards: - title: "Reset the Pacsat Configuration" - title: "Change Telemetry Beacon Transmit State" - title: "Set Microphone Level for Command and Control" + - title: "Turn Simulated Telemetry ON" + - title: "Turn Simulated Telemetry OFF" - title: "Set Simulated Failure Mode" - title: "Turn Random Simulated Failure Mode ON" - title: "Turn Random Simulated Failure Mode OFF" @@ -591,8 +593,6 @@ dashboards: - title: "Turn Command and Control Direwolf OFF" - title: "Turn Battery Saver Mode ON" - title: "Turn Battery Saver Mode OFF" - - title: "Turn Simulated Telemetry ON" - - title: "Turn Simulated Telemetry OFF" - title: "Turn Balloon Mode ON" - title: "Turn Balloon Mode OFF" - title: "Turn gpsd ON" From 3602b2f45ee35b9c32db4641e4c8204a082c7c15 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 16:02:00 -0400 Subject: [PATCH 1551/1744] Update config.yaml add sim fail off --- OliveTin/config.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 09ceccc4..856468c0 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -515,7 +515,7 @@ actions: - name: failure_mode type: ascii_sentence - - title: "Turn Off Simulated Failure Mode" + - title: "Turn Simulated Failure Mode OFF" icon: "❌" # red X shell: /home/pi/CubeSatSim/config -M 0 onclick: execution-dialog @@ -581,6 +581,7 @@ dashboards: - title: "Turn Simulated Telemetry ON" - title: "Turn Simulated Telemetry OFF" - title: "Set Simulated Failure Mode" + - title: "Turn Simulated Failure Mode OFF" - title: "Turn Random Simulated Failure Mode ON" - title: "Turn Random Simulated Failure Mode OFF" - title: "Set Random Simulated Failure Time" From a4e3dc603c0af84f0347acfadcc8e65c47ec9909 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 16:18:01 -0400 Subject: [PATCH 1552/1744] Update config fix -U --- config | 60 +++++++++++++++++++++++++++++++--------------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/config b/config index 724209b5..ae63f061 100755 --- a/config +++ b/config @@ -1904,11 +1904,18 @@ elif [ "$1" = "-U" ]; then echo "Do you want Random Simulated Failure ON (y/n) " read sim echo + else + sim="$param2" + fi - if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then - sim="yes" - echo "Random Simulated Failure is ON" - echo + if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then + sim="yes" + echo "Random Simulated Failure is ON" + echo + + + if [ -z "$param3" ] ; then + echo "A new random failure is selected every" echo ${13} "seconds." echo @@ -1917,35 +1924,32 @@ elif [ "$1" = "-U" ]; then echo "Enter time in seconds (integer): " read time - - if [ -z $time ] ; then - time="${13}" - echo "Keeping value of " $time " seconds" - fi - - if ! [[ $time =~ ^[0-9]+$ ]] ; then - echo "Error: not an integer!" - time="${13}" - echo "Keeping value of" $time + else + if [ "$sim" != "0" ] + time="$param3" + echo "Set Random Simulated Failure Time to" $time + else + time="" fi + fi - else - sim="no" - echo "Random Simulated Failure is OFF" + if [ -z $time ] ; then time="${13}" - # echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures + echo "Keeping value of " $time " seconds" fi - - else - time="$param2" - echo "Set Random Simulated Failure Time to" $time - + if ! [[ $time =~ ^[0-9]+$ ]] ; then - echo "Error: not an integer!" - time="${13}" - echo "Keeping value of" $time - fi - fi + echo "Error: not an integer!" + time="${13}" + echo "Keeping value of" $time + fi + + else + sim="no" + echo "Random Simulated Failure is OFF" + time="${13}" +# echo "-1" > /home/pi/CubeSatSim/failure_mode.txt # make sure to turn off any simulated failures + fi # echo echo -e "\nCubeSatSim configuration sim.cfg file updated to: \n" From 60809c87171eed13bc5be11608884fb4fc057134 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 16:18:57 -0400 Subject: [PATCH 1553/1744] Update config missing then --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index ae63f061..e834038e 100755 --- a/config +++ b/config @@ -1925,7 +1925,7 @@ elif [ "$1" = "-U" ]; then read time else - if [ "$sim" != "0" ] + if [ "$sim" != "0" ] ; then time="$param3" echo "Set Random Simulated Failure Time to" $time else From a19799463743e267db698e7007faaab7c14de9cd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 16:20:33 -0400 Subject: [PATCH 1554/1744] Update config remove spaces --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index e834038e..5acf1de3 100755 --- a/config +++ b/config @@ -1935,7 +1935,7 @@ elif [ "$1" = "-U" ]; then if [ -z $time ] ; then time="${13}" - echo "Keeping value of " $time " seconds" + echo "Keeping value of" $time "seconds" fi if ! [[ $time =~ ^[0-9]+$ ]] ; then From a4c869a0db27d0a98ebff19022dae89b4af2fc16 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 16:23:18 -0400 Subject: [PATCH 1555/1744] Update config.yaml random fixes --- OliveTin/config.yaml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 856468c0..3991c4ad 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -523,25 +523,19 @@ actions: - title: "Turn Random Simulated Failure Mode ON" icon: "🟢" # green ball - shell: /home/pi/CubeSatSim/config -U yes + shell: /home/pi/CubeSatSim/config -U yes {{ random_time_in_seconds }} onclick: execution-dialog timeout: 10 - + arguments: + - name: random_time_in_seconds + type: ascii_sentence + - title: "Turn Random Simulated Failure Mode OFF" icon: "❌" # red X shell: /home/pi/CubeSatSim/config -U no onclick: execution-dialog timeout: 10 - - - title: "Set Random Simulated Failure Time" - icon: "⚙" # gear - shell: /home/pi/CubeSatSim/config -U {{ random_time }} - onclick: execution-dialog - timeout: 10 - arguments: - - name: random_time - type: ascii_sentence - + - title: "Change Telemetry Beacon Transmit State" icon: "⚙" # gear shell: /home/pi/CubeSatSim/config -o @@ -584,7 +578,6 @@ dashboards: - title: "Turn Simulated Failure Mode OFF" - title: "Turn Random Simulated Failure Mode ON" - title: "Turn Random Simulated Failure Mode OFF" - - title: "Set Random Simulated Failure Time" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" - title: "Turn Doppler Mode OFF" From 4bfc3784fa29c1b5cf7bfb2f724d1d81dd9ea656 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 16:35:05 -0400 Subject: [PATCH 1556/1744] Update config.yaml add -N --- OliveTin/config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 3991c4ad..d5842019 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -443,6 +443,12 @@ actions: onclick: execution-dialog timeout: 10 + - title: "Next Mode or Failure Mode" + shell: /home/pi/CubeSatSim/config -N + icon: "🟢" # green ball + onclick: execution-dialog + timeout: 10 + - title: "Turn gpsd ON" shell: /home/pi/CubeSatSim/config -u yes icon: "🟢" # green ball @@ -578,6 +584,7 @@ dashboards: - title: "Turn Simulated Failure Mode OFF" - title: "Turn Random Simulated Failure Mode ON" - title: "Turn Random Simulated Failure Mode OFF" + - title: "Next Mode or Failure Mode" - title: "Turn Simulated Doppler Mode ON" - title: "Turn Radio Control Doppler Mode ON" - title: "Turn Doppler Mode OFF" From fd4bf8d99193dfb10397687b8781a14ac20f283d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 11 Aug 2026 17:10:48 -0400 Subject: [PATCH 1557/1744] Update config fix command_count --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 5acf1de3..eeffb51a 100755 --- a/config +++ b/config @@ -1618,7 +1618,7 @@ elif [ "$1" = "-g" ]; then sudo rm /home/pi/CubeSatSim/command_count.txt - echo "0" > /home/pi/CubeSatSim/command_count.txt + echo -n "0" > /home/pi/CubeSatSim/command_count.txt sudo rm /home/pi/CubeSatSim/failure_mode.txt > /dev/null 2>&1 From 417f38ae8763264d66e1c239fa093582256ae7e7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 08:43:54 -0400 Subject: [PATCH 1558/1744] Update pacsat.desktop add Ground Station to Pacsat --- groundstation/pacsat.desktop | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/pacsat.desktop b/groundstation/pacsat.desktop index 7097509e..04cea812 100644 --- a/groundstation/pacsat.desktop +++ b/groundstation/pacsat.desktop @@ -1,6 +1,6 @@ [Desktop Entry] -Name=Pacsat -GenericName=Pacsat Loopback +Name=Pacsat Ground Station +GenericName=Pacsat Ground Station Comment=Pacsat Exec=/usr/bin/x-terminal-emulator --geometry=120x40 -e "/home/pi/CubeSatSim/groundstation/pacsat-run.sh" Icon=/home/pi/Icons/pacsat.png From c5f4cbacbdb187099ca968b99c206c2fe950c6b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 08:54:21 -0400 Subject: [PATCH 1559/1744] Update install --- install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install b/install index 6333ab96..831447c0 100755 --- a/install +++ b/install @@ -653,6 +653,11 @@ if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then fi +FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.commands +if [ ! -f "$FILE" ]; then + cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatSim.commands $FILE +fi + cd if [ ! -d "/home/pi/PiSSTVpp" ]; then From 5fe6ee453c23cb5e0d57e92a83509057bba405f5 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 08:58:12 -0400 Subject: [PATCH 1560/1744] Update install add missing commands file --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index 831447c0..680760e1 100755 --- a/install +++ b/install @@ -655,6 +655,7 @@ fi FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.commands if [ ! -f "$FILE" ]; then + echo "copying missing commands file" cp /home/pi/CubeSatSim/spacecraft/PacSatGround_0.46o/PacSatSim.commands $FILE fi From fc8607b19ff6467c7f10e8bae95550320f0c192d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 11:19:29 -0400 Subject: [PATCH 1561/1744] Update pacsatsim.sh increase dir_max_file_age_in_seconds --- pacsatsim.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6494afbe..6deab389 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -136,6 +136,7 @@ else echo "uplink_open=1" >> pacsat.state echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state + echo "dir_max_file_age_in_seconds = 6048000" >> pacsat.state touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat From ba8bc404ec52673f3b9367f7212bdcf98ec38b7f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 11:24:14 -0400 Subject: [PATCH 1562/1744] Update pacsatsim.sh print pacsat.state --- pacsatsim.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6deab389..d5a6b653 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -136,7 +136,12 @@ else echo "uplink_open=1" >> pacsat.state echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state - echo "dir_max_file_age_in_seconds = 6048000" >> pacsat.state + echo "dir_max_file_age_in_seconds=6048000" >> pacsat.state + + echo + echo "pacsat.state:" + cat pacsat.state + echo touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat From c3fce8618250f7c6c2539e7f01f12d7665c3f5eb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 11:31:34 -0400 Subject: [PATCH 1563/1744] Update pacsatsim.sh set dir age --- pacsatsim.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index d5a6b653..ea5da2c8 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -108,6 +108,13 @@ if [ "$reset" = "0" ] ; then cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . unzip pi_pacsat.zip sudo rm pi_pacsat.zip + + echo "dir_max_file_age_in_seconds = 6048000" >> /home/pi/pi_pacsat/Debug/pacsat.state + + echo + echo "pacsat.state:" + cat /home/pi/pi_pacsat/Debug/pacsat.state + echo fi From 9b6db7346b5eda9e704dd4ea3c67b574e7a6f0bb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 11:41:03 -0400 Subject: [PATCH 1564/1744] Update pacsatsim.sh sed instead of echo --- pacsatsim.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index ea5da2c8..378b1539 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -109,12 +109,12 @@ if [ "$reset" = "0" ] ; then unzip pi_pacsat.zip sudo rm pi_pacsat.zip - echo "dir_max_file_age_in_seconds = 6048000" >> /home/pi/pi_pacsat/Debug/pacsat.state - - echo - echo "pacsat.state:" - cat /home/pi/pi_pacsat/Debug/pacsat.state - echo + sudo sed -i 's/dir_max_file_age_in_seconds=4320000/dir_max_file_age_in_seconds=6048000/g' /home/pi/pi_pacsat/Debug/pacsat.state + + echo + echo "pacsat.state:" + cat /home/pi/pi_pacsat/Debug/pacsat.state + echo fi From b0133be6fb7914fa8f4ac0640d20bc4672523e44 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 11:45:23 -0400 Subject: [PATCH 1565/1744] Update pacsatsim.sh add ftl0_max_upload_age_in_seconds --- pacsatsim.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 378b1539..90f577af 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -110,7 +110,8 @@ if [ "$reset" = "0" ] ; then sudo rm pi_pacsat.zip sudo sed -i 's/dir_max_file_age_in_seconds=4320000/dir_max_file_age_in_seconds=6048000/g' /home/pi/pi_pacsat/Debug/pacsat.state - + sudo sed -i 's/ftl0_max_upload_age_in_seconds=4320000/ftl0_max_upload_age_in_seconds=6048000/g' /home/pi/pi_pacsat/Debug/pacsat.state + echo echo "pacsat.state:" cat /home/pi/pi_pacsat/Debug/pacsat.state From e3142202870cd8d04f9c15be1b310089273c7e37 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 12:00:13 -0400 Subject: [PATCH 1566/1744] Update pacsatsim.sh fix sed --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 90f577af..e7e5d679 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -109,8 +109,8 @@ if [ "$reset" = "0" ] ; then unzip pi_pacsat.zip sudo rm pi_pacsat.zip - sudo sed -i 's/dir_max_file_age_in_seconds=4320000/dir_max_file_age_in_seconds=6048000/g' /home/pi/pi_pacsat/Debug/pacsat.state - sudo sed -i 's/ftl0_max_upload_age_in_seconds=4320000/ftl0_max_upload_age_in_seconds=6048000/g' /home/pi/pi_pacsat/Debug/pacsat.state + sudo sed -i 's/dir_max_file_age_in_seconds=4320000/dir_max_file_age_in_seconds=60480000/g' /home/pi/pi_pacsat/Debug/pacsat.state + sudo sed -i 's/ftl0_max_upload_age_in_seconds=432000/ftl0_max_upload_age_in_seconds=60480000/g' /home/pi/pi_pacsat/Debug/pacsat.state echo echo "pacsat.state:" From f1e162a463de7532989dace42346e2a925e60064 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 12 Aug 2026 16:26:21 -0400 Subject: [PATCH 1567/1744] Update pacsat.sh changed direwolf to -D3 --- groundstation/pacsat.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 891a5e2b..9564c8b1 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -345,7 +345,8 @@ echo cat $DIREWOLF_CONF echo -direwolf -P+ -D1 -qd -r 48000 -c $DIREWOLF_CONF & +# direwolf -P+ -D1 -qd -r 48000 -c $DIREWOLF_CONF & +direwolf -D3 -qd -r 48000 -c $DIREWOLF_CONF & cd /home/pi/Desktop/PacsatGround/ From 90c30cb80b0198aaf34d21d40ce020811a278916 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 09:11:38 -0400 Subject: [PATCH 1568/1744] Update main.c add > /dev/null 2>&1 to auto --- main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.c b/main.c index 447fc278..85737b85 100644 --- a/main.c +++ b/main.c @@ -126,7 +126,7 @@ int main(int argc, char * argv[]) { FILE * sim_mode_auto = popen("touch /home/pi/CubeSatSim/sim_mode_auto", "r"); // store sim_mode_auto flag pclose(sim_mode_auto); } else { - FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto > /dev/null 2>&1", "r"); // remove sim_mode_auto flag pclose(sim_mode_auto); } @@ -416,7 +416,7 @@ int main(int argc, char * argv[]) { if (sim_mode && payload && !sim_config) { sim_mode = FALSE; printf("Turning off Sim Mode since payload is present and Sim Mode not manually configured.\n"); - FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto > /dev/null 2>&1", "r"); // remove sim_mode_auto flag pclose(sim_mode_auto); } } else { @@ -735,7 +735,7 @@ int main(int argc, char * argv[]) { if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode sim_mode = FALSE; fprintf(stderr, "Turning off Sim Mode since battery sensor 2 is present\n"); - FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto > /dev/null 2>&1", "r"); // remove sim_mode_auto flag pclose(sim_mode_auto); } } @@ -744,7 +744,7 @@ int main(int argc, char * argv[]) { if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode sim_mode = FALSE; fprintf(stderr, "Turning off Sim Mode since battery sensor is present\n"); - FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto > /dev/null 2>&1", "r"); // remove sim_mode_auto flag pclose(sim_mode_auto); } } @@ -770,7 +770,7 @@ int main(int argc, char * argv[]) { if (sim_mode && payload && !sim_config) { sim_mode = FALSE; printf("Turning off Sim Mode since payload is present and Sim Mode not manually configured.\n"); - FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag + FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto > /dev/null 2>&1", "r"); // remove sim_mode_auto flag pclose(sim_mode_auto); } From 1ee0ee3120814f784910148da46cc6dd2939f131 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 10:05:58 -0400 Subject: [PATCH 1569/1744] Update install reset pacsatsim if pi_pacsat updated --- install | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/install b/install index 680760e1..053da165 100755 --- a/install +++ b/install @@ -572,28 +572,8 @@ if [ ! -f "$FILE" ]; then cd Debug make clean make all + /home/pi/CubeSatSim/config -k -n -# mkdir /home/pi/PacSat -# mkdir /home/pi/PacSat/pacsat -# mkdir /home/pi/PacSat/pacsat/dir - -# export LD_LIBRARY_PATH=/mnt/usb-disk/ariss/lib:/usr/local/lib/iors_common:$LD_LIBRARY_PATH - -# #value=`cat /home/pi/CubeSatSim/sim.cfg` -# #echo "$value" > /dev/null -# #set -- $value - -# echo "bit_rate=9600" > pacsat.config -# echo "bbs_callsign=AMSAT-12" >> pacsat.config -# echo "broadcast_callsign=AMSAT-11" >> pacsat.config -# echo "digi_callsign=AMSAT-1" >> pacsat.config -# echo "max_frames_in_tx_buffer=5" >> pacsat.config - -# echo "pb_open=1" > pacsat.state -# echo "uplink_open=1" >> pacsat.state -# echo "pb_max_period_for_client_in_seconds=60" >> pacsat.state -# echo "uplink_max_period_for_client_in_seconds=60" >> pacsat.state - else cd /home/pi/pi_pacsat/Debug/ @@ -604,6 +584,7 @@ else echo "updating pi_pacsat" make clean make all + /home/pi/CubeSatSim/config -k -n FLAG=1 fi fi From fd765580c5652a4c4faca214708c9e325e30f0cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 10:13:40 -0400 Subject: [PATCH 1570/1744] Update install move NetworkManager reconfigure to end --- install | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/install b/install index 053da165..08a5ce8d 100755 --- a/install +++ b/install @@ -4,6 +4,7 @@ FLAG=0 checkout=0 BULLSEYE=0 UPDATE=0 +NETWORK=1 FILE=/home/pi/CubeSatSim/cubesatsim # code has already been compiled if [ -f "$FILE" ]; then @@ -166,24 +167,28 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then if [[ $(sudo systemctl is-active NetworkManager | grep inactive) ]]; then echo "NetworkManager is inactive" - echo "In order to use the Wi-Fi hotspot, NetworkManager needs to be enabled and configured." + echo "In order to use the Wi-Fi Hotspot, NetworkManager needs to be enabled and configured." echo - echo "Do you want to re-configure your Wi-Fi (y/n) " + echo "Do you want to enable NetworkManager and re-configure your Wi-Fi (y/n) " read choice echo if [ "$choice" = "y" ] || [ "$choice" = "yes" ] ; then - sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi - sudo systemctl disable dhcpcd - sudo systemctl enable NetworkManager - sudo systemctl start NetworkManager + NETWORK=0 + +# sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi +# sudo systemctl disable dhcpcd +# sudo systemctl enable NetworkManager +# sudo systemctl start NetworkManager +# sudo nmcli dev wifi connect "$ssid" password "$password" + echo "Enter your Wi-Fi SSID" read ssid echo "Enter your Wi-Fi password" read password - sudo nmcli dev wifi connect "$ssid" password "$password" - echo "Wi-Fi will be updated after reboot" + + echo "Wi-Fi will be updated at the end of this install/update. You will need to log back in." else - echo "Not enabling NetworkManager." + echo "Not enabling NetworkManager. Wi-Fi Hotspot feature will not be available." fi fi @@ -1007,6 +1012,16 @@ if [[ $(gpio -v | grep "Pi 5") ]] && [[ ! $(sudo raspi-config nonint get_browser sudo raspi-config nonint do_browser firefox fi + +if [ "$NETWORK" = "0" ] ; then + echo "Enabling NetworkManager. You will need to login again and restart to complete the install/update." + sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi + sudo systemctl disable dhcpcd + sudo systemctl enable NetworkManager + sudo systemctl start NetworkManager + sudo nmcli dev wifi connect "$ssid" password "$password" +fi + if [ "$noreboot" = "0" ] ; then if [ $FLAG -eq 1 ]; then # Not sure if this is needed From 4511af9d721a907a61c26e5497d15b328aad82e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 10:24:19 -0400 Subject: [PATCH 1571/1744] Update install prints --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 08a5ce8d..de778c22 100755 --- a/install +++ b/install @@ -166,7 +166,9 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then sudo sh -c 'echo "\n" >> /boot/config.txt' if [[ $(sudo systemctl is-active NetworkManager | grep inactive) ]]; then + echo echo "NetworkManager is inactive" + echo echo "In order to use the Wi-Fi Hotspot, NetworkManager needs to be enabled and configured." echo echo "Do you want to enable NetworkManager and re-configure your Wi-Fi (y/n) " From d4a17233fc7acedca518af0bed32633ef9554867 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 10:25:27 -0400 Subject: [PATCH 1572/1744] Update install add sleep 5 if updating WiFi --- install | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install b/install index de778c22..27aaf09d 100755 --- a/install +++ b/install @@ -188,7 +188,10 @@ if [[ $(grep '11.' /etc/debian_version) ]]; then echo "Enter your Wi-Fi password" read password + echo echo "Wi-Fi will be updated at the end of this install/update. You will need to log back in." + echo + sleep 5 else echo "Not enabling NetworkManager. Wi-Fi Hotspot feature will not be available." fi From 1a4d2374a7a779cc08861d363a3e5c15898e0c9d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 10:38:44 -0400 Subject: [PATCH 1573/1744] Update pacsat.sh fix config -G -n --- groundstation/pacsat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 9564c8b1..40fbc67c 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -130,7 +130,7 @@ if [ "$loopback" = "1" ] ; then echo echo "Switching to PacSat mode for the Simulated PacSat Satellite" echo - /home/pi/CubeSatSim/config -G n + /home/pi/CubeSatSim/config -G -n # fi if [ ! -d "/home/pi/PacSatGroundLoop" ] ; then From 8a053a900975b84117718cfc3289ea361ab146f0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 14:03:20 -0400 Subject: [PATCH 1574/1744] Update install add sleep 5 to nmcli setup --- install | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/install b/install index 27aaf09d..039c07eb 100755 --- a/install +++ b/install @@ -1021,10 +1021,7 @@ fi if [ "$NETWORK" = "0" ] ; then echo "Enabling NetworkManager. You will need to login again and restart to complete the install/update." sudo sed -i 's/managed=false/managed=true/g' /etc/NetworkManager/NetworkManager.conf # allow nmcli to manage WiFi - sudo systemctl disable dhcpcd - sudo systemctl enable NetworkManager - sudo systemctl start NetworkManager - sudo nmcli dev wifi connect "$ssid" password "$password" + sudo systemctl enable --now NetworkManager && sudo nmcli networking on && sleep 5 && sudo nmcli dev wifi connect "$ssid" password "$password" fi if [ "$noreboot" = "0" ] ; then From 72e7b9226aa44ec5c76acd5baf0cbffa12dc2f1b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 15:11:03 -0400 Subject: [PATCH 1575/1744] Update config.yaml add echo warnings --- OliveTin/config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index d5842019..c17e18ee 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -255,7 +255,7 @@ actions: timeout: 120 - title: "CubeSatSim Log" - shell: /home/pi/CubeSatSim/log -d + shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -d icon: logs onclick: execution-dialog timeout: 30 @@ -267,7 +267,7 @@ actions: timeout: 120 - title: "Transmit Log" - shell: /home/pi/CubeSatSim/log -t + shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -t icon: logs onclick: execution-dialog timeout: 30 @@ -279,7 +279,7 @@ actions: timeout: 120 - title: "Frequency Control Log" - shell: /home/pi/CubeSatSim/log -r + shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -r icon: logs onclick: execution-dialog timeout: 30 @@ -303,7 +303,7 @@ actions: timeout: 120 - title: "Pacsat Log" - shell: /home/pi/CubeSatSim/log -p + shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -p icon: logs onclick: execution-dialog timeout: 30 @@ -315,7 +315,7 @@ actions: timeout: 120 - title: "Pushbutton Log" - shell: /home/pi/CubeSatSim/log -b + shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -b icon: logs onclick: execution-dialog timeout: 30 @@ -327,7 +327,7 @@ actions: timeout: 120 - title: "Command and Control Log" - shell: /home/pi/CubeSatSim/log -c + shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -c icon: logs onclick: execution-dialog timeout: 30 @@ -339,19 +339,19 @@ actions: timeout: 120 - title: "Web (OliveTin) Log" - shell: /home/pi/CubeSatSim/log -o + shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -o icon: logs onclick: execution-dialog timeout: 30 - title: "Update CubeSatSim Software" - shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update + shell: echo "This will take tens of minutes and only works if connected to internet. It might timeout and need to be run again. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update icon: "⏳" onclick: execution-dialog timeout: 600 - title: "Update CubeSatSim Software to Branch" - shell: echo "This will take tens of minutes and only works if connected to internet. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update {{ branch }} + shell: echo "This will take tens of minutes and only works if connected to internet. It might timeout and need to be run again. You should restart when finished!" && sudo su pi - /home/pi/CubeSatSim/update {{ branch }} icon: "⏳" onclick: execution-dialog timeout: 600 From c9976ef99ab8a87ea48d363dff34ce92cf4c9245 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 23:34:30 -0400 Subject: [PATCH 1576/1744] Update transmit.py restart gpsd.socket twice --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 135bb6a7..dc2f2f18 100644 --- a/transmit.py +++ b/transmit.py @@ -294,6 +294,8 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): if (gpsd_status == "active"): print("Restarting gpsd.socket") system("sudo systemctl restart gpsd.socket") + sleep(2) + system("sudo systemctl restart gpsd.socket") except Exception as e: print(f"An error occurred: {e}") print("program_fm failed") From e1b5b0f9b0bad6488b8a10b6036e112880e6419b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 23:36:47 -0400 Subject: [PATCH 1577/1744] Create Payload_BME280_MPU6050_YPR_EEPROM.ino --- .../Payload_BME280_MPU6050_YPR_EEPROM.ino | 904 ++++++++++++++++++ 1 file changed, 904 insertions(+) create mode 100644 stempayload/Payload_BME280_MPU6050_YPR_EEPROM/Payload_BME280_MPU6050_YPR_EEPROM.ino diff --git a/stempayload/Payload_BME280_MPU6050_YPR_EEPROM/Payload_BME280_MPU6050_YPR_EEPROM.ino b/stempayload/Payload_BME280_MPU6050_YPR_EEPROM/Payload_BME280_MPU6050_YPR_EEPROM.ino new file mode 100644 index 00000000..90bdfe66 --- /dev/null +++ b/stempayload/Payload_BME280_MPU6050_YPR_EEPROM/Payload_BME280_MPU6050_YPR_EEPROM.ino @@ -0,0 +1,904 @@ +// code for Pico or Pro Micro or STM32 on the CubeSat Simulator STEM Payload board +// works wih CubeSatSim software v1.3.2 or later +// extra sensors can be added in payload_extension.cpp file +// adds absolute orientation yaw, pitch, roll as Sensor 1, 2, and 3. + +#include +#include +#include +//#include +#include "MPU6050_6Axis_MotionApps20.h" +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) +#include +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Arduino Mbed OS RP2040 Boards is used in Arduino IDE +#include +TinyGPSPlus gps; +UART Serial2(8, 9, 0, 0); + +#elif !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards in Arduino IDE +#include +TinyGPSPlus gps; +bool check_for_wifi(); +bool wifi = false; +int led_builtin_pin; + +#else // if Sparkfun Pro Micro or STM32 +#include +#endif + +#define SEALEVELPRESSURE_HPA (1013.25) + +Adafruit_BME280 bme; +//MPU6050 mpu6050(Wire); + +MPU6050 mpu; +int const INTERRUPT_PIN = 6; +bool DMPReady = false; +uint8_t devStatus; +uint8_t MPUIntStatus; // Holds actual interrupt status byte from MPU +uint16_t packetSize; // Expected DMP packet size (default is 42 bytes) +uint8_t FIFOBuffer[64]; // FIFO storage buffer + +Quaternion q; // [w, x, y, z] Quaternion container +VectorFloat gravity; // [x, y, z] Gravity vector +float ypr[3]; // [yaw, pitch, roll] Yaw/Pitch/Roll container and gravity vector +int16_t ax, ay, az; +int16_t gx, gy, gz; +float accelx, accely, accelz, acceleration; +float gyrox, gyroy, gyroz, rotation; +int yaw, pitch, roll; +int reset_count; + +long timer = 0; +int bmePresent; +int RXLED = 17; // The RX LED has a defined Arduino pin +int whiteLED = 9; +int yellowLED = 8; +int Sensor1 = 0; +float Sensor2 = 0; +float temp; +int calibration = 0; + +void ee_prom_word_write(int addr, int val); +short ee_prom_word_read(int addr); +int first_time = true; +int first_read = true; + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) +float T2 = 24; // Temperature data point 1 +float R2 = 169; // Reading data point 1 +float T1 = 6; // Temperature data point 2 +float R1 = 181; // Reading data point 2 +#endif +#if defined __AVR_ATmega32U4__ +float T2 = 26.3; // Temperature data point 1 +float R2 = 167; // Reading data point 1 +float T1 = 2; // Temperature data point 2 +float R1 = 179; // Reading data point 2 +#endif +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) +float T2 = 25; // Temperature data point 1 +float R2 = 671; // Reading data point 1 +float T1 = 15.5; // Temperature data point 2 +float R1 = 695; // Reading data point 2 +#endif + +int sensorValue; +float Temp; +float rest; + +char sensor_end_flag[] = "_END_FLAG_"; +char sensor_start_flag[] = "_START_FLAG_"; +bool show_gps = true; // set to false to not see all messages +float flon = 0.0, flat = 0.0, flalt = 0.0; +void get_gps(); + +extern void payload_setup(); // sensor extension setup function defined in payload_extension.cpp +extern void payload_loop(); // sensor extension read function defined in payload_extension.cpp + +volatile bool MPUInterrupt = false; // Indicates whether MPU6050 interrupt pin has gone high +void DMPDataReady() +{ + MPUInterrupt = true; +} + +void setup() { + + Serial.begin(115200); // Serial Monitor for testing + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + Serial1.setRX(1); + delay(100); + Serial1.setTX(0); + delay(100); +#endif + + Serial1.begin(115200); // for communication with Pi Zero + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards in Arduino IDE + EEPROM.begin(512); +#endif + + delay(2000); + +#if defined (ARDUINO_ARCH_MBED_RP2040) && (ARDUINO_ARCH_RP2040) + Serial.println("Pico with Mbed"); +#elif !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + Serial.println("Pico with RP2040"); +#elif defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + Serial.println("STM32"); +#elif defined __AVR_ATmega32U4__ + Serial.println("Pro Micro"); +#else + Serial.println("Unknown board"); +#endif + + Serial.println("Starting!"); + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + Serial.println("Starting Serial2 for optional GPS on JP12"); +// Serial2.begin(9600); // serial from - some modules need 115200 + Serial2.begin(9600); // serial from GPS or other serial sensor. Some GPS need 115200 + + // set all Pico GPIO connected pins to input + for (int i = 10; i < 22; i++) { + pinMode(i, INPUT); + } + pinMode(26, INPUT); + pinMode(27, INPUT); + pinMode(28, INPUT); + pinMode(15, INPUT_PULLUP); // squelch +#endif + + blink_setup(); + + blink(500); + delay(250); + blink(500); + delay(250); + led_set(whiteLED, HIGH); + delay(250); + led_set(whiteLED, LOW); + led_set(yellowLED, HIGH); + delay(250); + led_set(yellowLED, LOW); + + if (bme.begin(0x76)) { + bmePresent = 1; + } else { + Serial.println("Could not find a valid BME280 sensor, check wiring!"); + bmePresent = 0; + } + +// mpu6050.begin(); + + ax = 0; + ay = 0; + az = 0; + gx = 0; + gy = 0; + gz = 0; + yaw = 0; + pitch = 0; + roll = 0; + accelx = 0; + accely = 0; + accelz = 0; + acceleration = 1.0; + gyrox = 0; + gyroy = 0; + gyroz = 0; + + mpu.initialize(ACCEL_FS::A2G, GYRO_FS::G250DPS); +// mpu.initialize(); + + pinMode(INTERRUPT_PIN, INPUT); + + // Verify connection + if (mpu.testConnection()) + { + Serial.println("MPU6050 connection successful"); + } + else + { + Serial.println("MPU6050 connection failed"); + } + + /* Initializate and configure the DMP*/ + Serial.println(F("Initializing DMP...")); + devStatus = mpu.dmpInitialize(); + + if (eeprom_word_read(0) == 0xA08) + { + Serial.println("Reading gyro and accel offsets from EEPROM\n"); + + int axOffset = eeprom_word_read(1); + int ayOffset = eeprom_word_read(2); + int azOffset = eeprom_word_read(3); + int gxOffset = eeprom_word_read(4); + int gyOffset = eeprom_word_read(5); + int gzOffset = eeprom_word_read(6); + + Serial.println(axOffset, DEC); + Serial.println(ayOffset, DEC); + Serial.println(azOffset, DEC); + Serial.println(gxOffset, DEC); + Serial.println(gyOffset, DEC); + Serial.println(gzOffset, DEC); + + mpu.setXGyroOffset(gxOffset); + mpu.setYGyroOffset(gyOffset); + mpu.setZGyroOffset(gzOffset); + mpu.setXAccelOffset(axOffset); + mpu.setYAccelOffset(ayOffset); + mpu.setZAccelOffset(azOffset); + + mpu.PrintActiveOffsets(); + + Serial.println("\nTemperature calibration data from EEPROM\n"); + + T1 = ((float)eeprom_word_read(7)) / 10.0; + R1 = ((float)eeprom_word_read(8)); + T2 = ((float)eeprom_word_read(9)) / 10.0; + R2 = ((float)eeprom_word_read(10)); + + Serial.println(T1, DEC); + Serial.println(R1, DEC); + Serial.println(" "); + Serial.println(T2, DEC); + Serial.println(R2, DEC); + Serial.println(" "); + + } + else + { + // Serial.println("Calculating gyro offsets\n"); + // mpu6050.calcGyroOffsets(true); + + if (devStatus == 0) + { + // if (first_read == true) { + mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 + mpu.CalibrateGyro(6); + Serial.println("These are the Active offsets: "); + mpu.PrintActiveOffsets(); + + int16_t *offsets; + offsets = mpu.GetActiveOffsets(); + + // A_OFFSET_H_READ_A_OFFS(Data); + Serial.print((float)offsets[0], 5); Serial.print(",\t"); + Serial.print((float)offsets[1], 5); Serial.print(",\t"); + Serial.print((float)offsets[2], 5); Serial.print(",\t"); + + // XG_OFFSET_H_READ_OFFS_USR(Data); + Serial.print((float)offsets[3], 5); Serial.print(",\t"); + Serial.print((float)offsets[4], 5); Serial.print(",\t"); + Serial.print((float)offsets[5], 5); Serial.print("\n\n"); + +// } + +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + Serial.println("Storing gyro and accel offsets in EEPROM\n"); + + eeprom_word_write(0, 0xA08); + /* eeprom_word_write(1, (int)(mpu6050.getGyroXoffset() * 100.0) + 0.5); + eeprom_word_write(2, (int)(mpu6050.getGyroYoffset() * 100.0) + 0.5); + eeprom_word_write(3, (int)(mpu6050.getGyroZoffset() * 100.0) + 0.5); + */ + /* + Serial.println(eeprom_word_read(0), HEX); + Serial.println(((float)eeprom_word_read(1)) / 100.0, DEC); + Serial.println(((float)eeprom_word_read(2)) / 100.0, DEC); + Serial.println(((float)eeprom_word_read(3)) / 100.0, DEC); +*/ + eeprom_word_write(1, offsets[0]); + eeprom_word_write(2, offsets[1]); + eeprom_word_write(3, offsets[2]); + eeprom_word_write(4, offsets[3]); + eeprom_word_write(5, offsets[4]); + eeprom_word_write(6, offsets[5]); + + Serial.println("\nStoring temperature calibration data in EEPROM\n"); + + eeprom_word_write(7, (int)(T1 * 10.0) + 0.5); + eeprom_word_write(8, (int) R1); + eeprom_word_write(9, (int)(T2 * 10.0) + 0.5); + eeprom_word_write(10, (int) R2); + + T1 = ((float)eeprom_word_read(7)) / 10.0; + R1 = ((float)eeprom_word_read(8)); + T2 = ((float)eeprom_word_read(9)) / 10.0; + R2 = ((float)eeprom_word_read(10)); + + Serial.println(T1, DEC); + Serial.println(R1, DEC); + Serial.println(" "); + Serial.println(T2, DEC); + Serial.println(R2, DEC); + Serial.println(" "); + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + if (EEPROM.commit()) { + Serial.println("EEPROM successfully committed\n"); + } else { + Serial.println("ERROR! EEPROM commit failed\n"); + } +#endif +#endif + } + } + + /* Supply your gyro offsets here, scaled for min sensitivity */ +/* mpu.setXGyroOffset(57); + mpu.setYGyroOffset(99); + mpu.setZGyroOffset(19); + mpu.setXAccelOffset(-4922); + mpu.setYAccelOffset(-2136); + mpu.setZAccelOffset(3104); + + mpu.setXGyroOffset(0); + mpu.setYGyroOffset(0); + mpu.setZGyroOffset(0); + mpu.setXAccelOffset(0); + mpu.setYAccelOffset(0); + mpu.setZAccelOffset(0); +*/ + if (devStatus == 0) + { +/* if (first_read == true) { + mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 + mpu.CalibrateGyro(6); + Serial.println("These are the Active offsets: "); + mpu.PrintActiveOffsets(); + } + */ + Serial.println(F("Enabling DMP...")); // Turning ON DMP + mpu.setDMPEnabled(true); + + Serial.print(F("Enabling interrupt detection (Arduino external interrupt ")); + Serial.print(digitalPinToInterrupt(INTERRUPT_PIN)); + Serial.println(F(")...")); + attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), DMPDataReady, RISING); + MPUIntStatus = mpu.getIntStatus(); + + /* Set the DMP Ready flag so the main loop() function knows it is okay to use it */ + Serial.println(F("DMP ready! Waiting for first interrupt...")); + DMPReady = true; + packetSize = mpu.dmpGetFIFOPacketSize(); + // Serial.print(packetSize); + } + else + { + Serial.print(F("DMP Initialization failed (code ")); // Print the error code + Serial.print(devStatus); + Serial.println(F(")")); + // 1 = initial memory load failed + // 2 = DMP configuration updates failed + } + + + payload_setup(); // sensor extension setup function defined in payload_extension.cpp + + reset_count = 100; +} + +void loop() { + + blink(50); + + if (Serial1.available() > 0) { + Serial.print("Received serial data!!!\n"); + delay(10); + while (Serial1.available() > 0) { + char result = Serial1.read(); + Serial.print(result); + } + Serial.println(" "); + } + { +// if (result == '?') + { + if (bmePresent) { + Serial1.print(sensor_start_flag); + Serial1.print("OK BME280 "); + Serial1.print(bme.readTemperature()); + Serial1.print(" "); + Serial1.print(bme.readPressure() / 100.0F); + Serial1.print(" "); + Serial1.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); + Serial1.print(" "); + Serial1.print(bme.readHumidity()); + + Serial.print("OK BME280 "); + temp = bme.readTemperature(); + Serial.print(temp); + Serial.print(" "); + Serial.print(bme.readPressure() / 100.0F); + Serial.print(" "); + Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); + Serial.print(" "); + Serial.print(bme.readHumidity()); + } else + { + Serial1.print(sensor_start_flag); + Serial1.print("OK BME280 0.0 0.0 0.0 0.0"); + + Serial.print("OK BME280 0.0 0.0 0.0 0.0"); + } + + /* + mpu6050.update(); + + Serial1.print(" MPU6050 "); + Serial1.print(mpu6050.getGyroX()); + Serial1.print(" "); + Serial1.print(mpu6050.getGyroY()); + Serial1.print(" "); + Serial1.print(mpu6050.getGyroZ()); + + Serial1.print(" "); + Serial1.print(mpu6050.getAccX()); + Serial1.print(" "); + Serial1.print(mpu6050.getAccY()); + Serial1.print(" "); + Serial1.print(mpu6050.getAccZ()); + + Serial.print(" MPU6050 "); + Serial.print(mpu6050.getGyroX()); + Serial.print(" "); + Serial.print(mpu6050.getGyroY()); + Serial.print(" "); + Serial.print(mpu6050.getGyroZ()); + + Serial.print(" "); + Serial.print(mpu6050.getAccX()); + Serial.print(" "); + Serial.print(mpu6050.getAccY()); + Serial.print(" "); + Serial.print(mpu6050.getAccZ()); +*/ + +// if (MPUInterrupt) { +// if (true) { + + if (mpu.dmpGetCurrentFIFOPacket(FIFOBuffer)) + { + /* Display Euler angles in degrees */ + mpu.dmpGetQuaternion(&q, FIFOBuffer); + mpu.dmpGetGravity(&gravity, &q); + mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); + + mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); + + accelx = ax / 16384.0; + accely = ay / 16384.0; + accelz = (az - 16384) / 16384.0; + acceleration = sqrt(accelx*accelx + accely*accely + accelz*accelz); + + gyrox = gx / 6.75; + gyroy = gy / 6.75; + gyroz = gz / 6.75; + rotation = sqrt(gyrox*gyrox + gyroy*gyroy + gyroz*gyroz); + + yaw = ypr[0] * 180 / M_PI; + if (yaw < 0) yaw += 360; + pitch = ypr[1] * 180 / M_PI; + if (pitch < 0) pitch += 360; + roll = ypr[2] * 180 / M_PI; + if (roll < 0) roll += 360; + + // Serial.print("_"); Serial.print(yaw); Serial.print("_"); + // } else + // Serial.print("*"); + + MPUInterrupt = false; + } else + // Serial.print("/"); + + Serial1.print(" "); // Don't know why this is needed + Serial1.print(" MPU6050 "); + Serial1.print(gyrox); Serial1.print(" "); + Serial1.print(gyroy); Serial1.print(" "); + Serial1.print(gyroz); Serial1.print(" "); + Serial1.print(accelx); Serial1.print(" "); + Serial1.print(accely); Serial1.print(" "); + Serial1.print(accelz); + + Serial.print(" MPU6050 "); + Serial.print(gyrox); Serial.print(" "); + Serial.print(gyroy); Serial.print(" "); + Serial.print(gyroz); Serial.print(" "); + Serial.print(accelx); Serial.print(" "); + Serial.print(accely); Serial.print(" "); + Serial.print(accelz); + +/* + } else { + Serial1.print("OK MPU6050 0.0 0.0 0.0 0.0 0.0 0.0"); + Serial.print("OK MPU6050 0.0 0.0 0.0 0.0 0.0 0.0"); + } +*/ + sensorValue = read_analog(); + +// Serial.println(sensorValue); + Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); + +// Serial1.print(" GPS 0 0 0 TMP "); + + Serial1.print(" GPS "); + Serial1.print(flat,4); + Serial1.print(" "); + Serial1.print(flon,4); + Serial1.print(" "); + Serial1.print(flalt,2); + + Serial1.print(" TMP "); + Serial1.print(Temp); + +// Serial1.print(" "); +// Serial1.println(Sensor2); + + Serial.print(" GPS "); + Serial.print(flat,4); + Serial.print(" "); + Serial.print(flon,4); + Serial.print(" "); + Serial.print(flalt,2); + +// Serial.print(" GPS 0 0 0 TMP "); + Serial.print(" TMP "); + Serial.print(Temp); +// Serial.print(" "); +// Serial.println(Sensor2); + +// float rotation = 0; +// rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ()); +// float acceleration = 0; +// acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ()); +// Serial.println(" "); +// Serial.print(rotation); +// Serial.print(" "); +// Serial.println(acceleration); + + if (first_read == true) { + first_read = false; + rest = acceleration; + Serial.println(" "); + Serial.print("rest acceleration: "); + Serial.println(rest); + } + + if (acceleration > 1.1 * rest) + led_set(whiteLED, HIGH); + else + led_set(whiteLED, LOW); + + if (rotation > 20) + led_set(yellowLED, HIGH); + else + led_set(yellowLED, LOW); + } + + Serial1.print(" YPR "); + Serial1.print(yaw); + Serial1.print(" "); + Serial1.print(pitch); + Serial1.print(" "); + Serial1.print(roll); + Serial1.print(" "); + + Serial.print(" YPR "); + Serial.print(yaw); + Serial.print(" "); + Serial.print(pitch); + Serial.print(" "); + Serial.print(roll); + Serial.println(" "); + + payload_loop(); // sensor extension read function defined in payload_extension.cpp + +// Serial1.println(" "); + Serial1.println(sensor_end_flag); + Serial.println(" "); + + } + + if (Serial.available() > 0) { + blink(50); + char result = Serial.read(); +// Serial.println(result); +// Serial.println("OK"); +// Serial.println(counter++); +//#if !defined (ARDUINO_ARCH_RP2040) + if (result == 'R' || result == 'r') { +// Serial1.println("OK"); +// delay(100); + Serial.println("Resetting\n"); + first_read = true; + setup(); + } + else if (result == 'D' || result == 'd') { + Serial.println("\nCurrent temperature calibration data\n"); + Serial.println(T1, DEC); + Serial.println(R1, DEC); + Serial.println(" "); + Serial.println(T2, DEC); + Serial.println(R2, DEC); + + Serial.println("\nCurrent raw temperature reading\n"); + Serial.println(sensorValue, DEC); + Serial.println(" "); + } + else if (result == 'C' || result == 'c') { + Serial.println("\nClearing stored gyro and accel offsets in EEPROM\n"); + eeprom_word_write(0, 0x00); +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + + if (EEPROM.commit()) { + Serial.println("EEPROM successfully committed\n"); + } else { + Serial.println("ERROR! EEPROM commit failed\n"); + } +#endif + first_time = true; + setup(); + } + else if (result == 'S' || result == 's') { + Serial.print("\nStoring temperature calibration data point "); // in EEPROM\n"); + Serial.print(calibration + 1); + Serial.print(" in EEPROM\n"); + + Serial.println(temp); + Serial.println(sensorValue); + Serial.println(" "); + + eeprom_word_write(calibration * 2 + 7 , (int)(temp * 10.0) + 0.5); + eeprom_word_write(calibration * 2 + 8, sensorValue); + + if (calibration == 0) { + T1 = temp; + R1 = sensorValue; + calibration = 1; + } else { + T2 = temp; + R2 = sensorValue; + calibration = 0; + } + +// calibration = (calibration + 1) % 2; +// Serial.println(calibration + 1); + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + + if (EEPROM.commit()) { + Serial.println("EEPROM successfully committed\n"); + } else { + Serial.println("ERROR! EEPROM commit failed\n"); + } +#endif + + } +//#endif + } + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + Serial.print("Squelch: "); + Serial.println(digitalRead(15)); + + get_gps(); +#else + delay(1000); // not needed due to gps 1 second polling delay + +#endif +// if (reset_count-- == 0) +// setup(); +} + +void eeprom_word_write(int addr, int val) +{ +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + EEPROM.write(addr * 2, lowByte(val)); + EEPROM.write(addr * 2 + 1, highByte(val)); +#endif +} + +short eeprom_word_read(int addr) +{ + int result = 0; +#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE + result = ((EEPROM.read(addr * 2 + 1) << 8) | EEPROM.read(addr * 2)); +#endif + return result; +} + +void blink_setup() +{ +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + // initialize digital pin PB1 as an output. + pinMode(PC13, OUTPUT); + pinMode(PB9, OUTPUT); + pinMode(PB8, OUTPUT); +#endif + +#if defined __AVR_ATmega32U4__ + pinMode(RXLED, OUTPUT); // Set RX LED as an output + // TX LED is set as an output behind the scenes + pinMode(whiteLED, OUTPUT); + pinMode(yellowLED,OUTPUT); +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + pinMode(LED_BUILTIN, OUTPUT); + pinMode(18, OUTPUT); // yellow LED (was blue LED on STEM Payload Board v1.3.2) + pinMode(19, OUTPUT); // white LED (was green LED on STEM Payload Board v1.3.2) +#endif + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + if (check_for_wifi()) { + wifi = true; + led_builtin_pin = LED_BUILTIN; // use default GPIO for Pico W + pinMode(LED_BUILTIN, OUTPUT); +// configure_wifi(); + } else { + led_builtin_pin = 25; // manually set GPIO 25 for Pico board +// pinMode(25, OUTPUT); + pinMode(led_builtin_pin, OUTPUT); + } + pinMode(18, OUTPUT); + pinMode(19, OUTPUT); +#endif +} + +void blink(int length) +{ +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + digitalWrite(PC13, LOW); // turn the LED on (HIGH is the voltage level) +#endif + +#if defined __AVR_ATmega32U4__ + digitalWrite(RXLED, LOW); // set the RX LED ON + TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + digitalWrite(LED_BUILTIN, HIGH); // set the built-in LED ON +#endif + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + if (wifi) + digitalWrite(LED_BUILTIN, HIGH); // set the built-in LED ON + else + digitalWrite(led_builtin_pin, HIGH); // set the built-in LED ON +#endif + +delay(length); + +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + digitalWrite(PC13, HIGH); // turn the LED off by making the voltage LOW +#endif + +#if defined __AVR_ATmega32U4__ + digitalWrite(RXLED, HIGH); // set the RX LED OFF + TXLED0; //TX LED macro to turn LED ON +#endif + +#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + digitalWrite(LED_BUILTIN, LOW); // set the built-in LED OFF +#endif + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) + if (wifi) + digitalWrite(LED_BUILTIN, LOW); // set the built-in LED ON + else + digitalWrite(led_builtin_pin, LOW); // set the built-in LED ON +#endif +} + +void led_set(int ledPin, bool state) +{ +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + if (ledPin == whiteLED) + digitalWrite(PB9, state); + else if (ledPin == yellowLED) + digitalWrite(PB8, state); +#endif + +#if defined __AVR_ATmega32U4__ + digitalWrite(ledPin, state); +#endif + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + if (ledPin == whiteLED) + digitalWrite(19, state); + else if (ledPin == yellowLED) + digitalWrite(18, state); +#endif +} + +int read_analog() +{ + int sensorValue; + #if defined __AVR_ATmega32U4__ + sensorValue = analogRead(A3); +#endif + +#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) + sensorValue = analogRead(PA7); +#endif +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) + sensorValue = analogRead(28); +#endif + return(sensorValue); +} + +#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) +bool check_for_wifi() { + + pinMode(29, INPUT); + const float conversion_factor = 3.3f / (1 << 12); + uint16_t result = analogRead(29); +// Serial.printf("ADC3 value: 0x%03x, voltage: %f V\n", result, result * conversion_factor); + + if (result < 0x10) { + Serial.println("\nPico W detected!\n"); + return(true); + } + else { + Serial.println("\nPico detected!\n"); + return(false); + } +} +#endif + +#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) +void get_gps() { +// Serial.println("Getting GPS data"); + bool newData = false; + unsigned long start = millis(); + +// for (unsigned long start = millis(); millis() - start < 1000;) // 5000;) + while ((millis() - start) < 1000) // 5000;) + { + while (Serial2.available()) + { + char c = Serial2.read(); + if (show_gps) + Serial.write(c); // uncomment this line if you want to see the GPS data flowing + if (gps.encode(c)) // Did a new valid sentence come in? + newData = true; + } + } + if (newData) { + Serial.print("GPS read new data in ms: "); + Serial.println(millis() - start); + +// float flon = 0.0, flat = 0.0, flalt = 0.0; +// unsigned long age; +// starting = millis(); +// gps.f_get_position(&flat, &flon, &age); + + Serial.print(F("Location: ")); + if (gps.location.isValid()) + { + Serial.print(gps.location.lat(), 6); + Serial.print(F(",")); + Serial.print(gps.location.lng(), 6); + + flat = gps.location.lat(); + flon = gps.location.lng(); + flalt = gps.altitude.meters(); + } + else + { + Serial.print(F("INVALID")); + } + Serial.print("\r\n"); + + } else +// Serial.printf("GPS read no new data: %d\n", millis() - start); + ; +} +#endif From 1d3eea47c224df7aaf5013ad056125305a251cfe Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 23:37:42 -0400 Subject: [PATCH 1578/1744] Create payload_extension.cpp --- .../payload_extension.cpp | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 stempayload/Payload_BME280_MPU6050_YPR_EEPROM/payload_extension.cpp diff --git a/stempayload/Payload_BME280_MPU6050_YPR_EEPROM/payload_extension.cpp b/stempayload/Payload_BME280_MPU6050_YPR_EEPROM/payload_extension.cpp new file mode 100644 index 00000000..5b8dd2ec --- /dev/null +++ b/stempayload/Payload_BME280_MPU6050_YPR_EEPROM/payload_extension.cpp @@ -0,0 +1,25 @@ +// Use this template for adding additional sensors +// see Payload_BME280_MPU6050_XS_Extended for an example + +// put your library includes here +#include "Arduino.h" + +// put your globals here + +// put your setup code here +void payload_setup() { + +// Serial.println("Starting new sensor!"); + +} + +// put your loop code here +// Very Important: only use print, not println!! +void payload_loop() { + +/* + Serial1.print(" NEW 0.0"); // send sensor data over serial to Pi Zero + Serial.print(" NEW 0.0"); // send sensor data over serial monitor for testing +*/ + +} From a55164e9ee39a7768c4d31063352bb39dc136991 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 23:38:28 -0400 Subject: [PATCH 1579/1744] Delete stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino --- .../Payload_BME280_MPU6050_XS_YPR.ino | 904 ------------------ 1 file changed, 904 deletions(-) delete mode 100644 stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino diff --git a/stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino b/stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino deleted file mode 100644 index 90bdfe66..00000000 --- a/stempayload/Payload_BME280_MPU6050_XS_YPR/Payload_BME280_MPU6050_XS_YPR.ino +++ /dev/null @@ -1,904 +0,0 @@ -// code for Pico or Pro Micro or STM32 on the CubeSat Simulator STEM Payload board -// works wih CubeSatSim software v1.3.2 or later -// extra sensors can be added in payload_extension.cpp file -// adds absolute orientation yaw, pitch, roll as Sensor 1, 2, and 3. - -#include -#include -#include -//#include -#include "MPU6050_6Axis_MotionApps20.h" -#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) -#include -#endif - -#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Arduino Mbed OS RP2040 Boards is used in Arduino IDE -#include -TinyGPSPlus gps; -UART Serial2(8, 9, 0, 0); - -#elif !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards in Arduino IDE -#include -TinyGPSPlus gps; -bool check_for_wifi(); -bool wifi = false; -int led_builtin_pin; - -#else // if Sparkfun Pro Micro or STM32 -#include -#endif - -#define SEALEVELPRESSURE_HPA (1013.25) - -Adafruit_BME280 bme; -//MPU6050 mpu6050(Wire); - -MPU6050 mpu; -int const INTERRUPT_PIN = 6; -bool DMPReady = false; -uint8_t devStatus; -uint8_t MPUIntStatus; // Holds actual interrupt status byte from MPU -uint16_t packetSize; // Expected DMP packet size (default is 42 bytes) -uint8_t FIFOBuffer[64]; // FIFO storage buffer - -Quaternion q; // [w, x, y, z] Quaternion container -VectorFloat gravity; // [x, y, z] Gravity vector -float ypr[3]; // [yaw, pitch, roll] Yaw/Pitch/Roll container and gravity vector -int16_t ax, ay, az; -int16_t gx, gy, gz; -float accelx, accely, accelz, acceleration; -float gyrox, gyroy, gyroz, rotation; -int yaw, pitch, roll; -int reset_count; - -long timer = 0; -int bmePresent; -int RXLED = 17; // The RX LED has a defined Arduino pin -int whiteLED = 9; -int yellowLED = 8; -int Sensor1 = 0; -float Sensor2 = 0; -float temp; -int calibration = 0; - -void ee_prom_word_write(int addr, int val); -short ee_prom_word_read(int addr); -int first_time = true; -int first_read = true; - -#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) -float T2 = 24; // Temperature data point 1 -float R2 = 169; // Reading data point 1 -float T1 = 6; // Temperature data point 2 -float R1 = 181; // Reading data point 2 -#endif -#if defined __AVR_ATmega32U4__ -float T2 = 26.3; // Temperature data point 1 -float R2 = 167; // Reading data point 1 -float T1 = 2; // Temperature data point 2 -float R1 = 179; // Reading data point 2 -#endif -#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) -float T2 = 25; // Temperature data point 1 -float R2 = 671; // Reading data point 1 -float T1 = 15.5; // Temperature data point 2 -float R1 = 695; // Reading data point 2 -#endif - -int sensorValue; -float Temp; -float rest; - -char sensor_end_flag[] = "_END_FLAG_"; -char sensor_start_flag[] = "_START_FLAG_"; -bool show_gps = true; // set to false to not see all messages -float flon = 0.0, flat = 0.0, flalt = 0.0; -void get_gps(); - -extern void payload_setup(); // sensor extension setup function defined in payload_extension.cpp -extern void payload_loop(); // sensor extension read function defined in payload_extension.cpp - -volatile bool MPUInterrupt = false; // Indicates whether MPU6050 interrupt pin has gone high -void DMPDataReady() -{ - MPUInterrupt = true; -} - -void setup() { - - Serial.begin(115200); // Serial Monitor for testing - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - Serial1.setRX(1); - delay(100); - Serial1.setTX(0); - delay(100); -#endif - - Serial1.begin(115200); // for communication with Pi Zero - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards in Arduino IDE - EEPROM.begin(512); -#endif - - delay(2000); - -#if defined (ARDUINO_ARCH_MBED_RP2040) && (ARDUINO_ARCH_RP2040) - Serial.println("Pico with Mbed"); -#elif !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - Serial.println("Pico with RP2040"); -#elif defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) - Serial.println("STM32"); -#elif defined __AVR_ATmega32U4__ - Serial.println("Pro Micro"); -#else - Serial.println("Unknown board"); -#endif - - Serial.println("Starting!"); - -#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) - Serial.println("Starting Serial2 for optional GPS on JP12"); -// Serial2.begin(9600); // serial from - some modules need 115200 - Serial2.begin(9600); // serial from GPS or other serial sensor. Some GPS need 115200 - - // set all Pico GPIO connected pins to input - for (int i = 10; i < 22; i++) { - pinMode(i, INPUT); - } - pinMode(26, INPUT); - pinMode(27, INPUT); - pinMode(28, INPUT); - pinMode(15, INPUT_PULLUP); // squelch -#endif - - blink_setup(); - - blink(500); - delay(250); - blink(500); - delay(250); - led_set(whiteLED, HIGH); - delay(250); - led_set(whiteLED, LOW); - led_set(yellowLED, HIGH); - delay(250); - led_set(yellowLED, LOW); - - if (bme.begin(0x76)) { - bmePresent = 1; - } else { - Serial.println("Could not find a valid BME280 sensor, check wiring!"); - bmePresent = 0; - } - -// mpu6050.begin(); - - ax = 0; - ay = 0; - az = 0; - gx = 0; - gy = 0; - gz = 0; - yaw = 0; - pitch = 0; - roll = 0; - accelx = 0; - accely = 0; - accelz = 0; - acceleration = 1.0; - gyrox = 0; - gyroy = 0; - gyroz = 0; - - mpu.initialize(ACCEL_FS::A2G, GYRO_FS::G250DPS); -// mpu.initialize(); - - pinMode(INTERRUPT_PIN, INPUT); - - // Verify connection - if (mpu.testConnection()) - { - Serial.println("MPU6050 connection successful"); - } - else - { - Serial.println("MPU6050 connection failed"); - } - - /* Initializate and configure the DMP*/ - Serial.println(F("Initializing DMP...")); - devStatus = mpu.dmpInitialize(); - - if (eeprom_word_read(0) == 0xA08) - { - Serial.println("Reading gyro and accel offsets from EEPROM\n"); - - int axOffset = eeprom_word_read(1); - int ayOffset = eeprom_word_read(2); - int azOffset = eeprom_word_read(3); - int gxOffset = eeprom_word_read(4); - int gyOffset = eeprom_word_read(5); - int gzOffset = eeprom_word_read(6); - - Serial.println(axOffset, DEC); - Serial.println(ayOffset, DEC); - Serial.println(azOffset, DEC); - Serial.println(gxOffset, DEC); - Serial.println(gyOffset, DEC); - Serial.println(gzOffset, DEC); - - mpu.setXGyroOffset(gxOffset); - mpu.setYGyroOffset(gyOffset); - mpu.setZGyroOffset(gzOffset); - mpu.setXAccelOffset(axOffset); - mpu.setYAccelOffset(ayOffset); - mpu.setZAccelOffset(azOffset); - - mpu.PrintActiveOffsets(); - - Serial.println("\nTemperature calibration data from EEPROM\n"); - - T1 = ((float)eeprom_word_read(7)) / 10.0; - R1 = ((float)eeprom_word_read(8)); - T2 = ((float)eeprom_word_read(9)) / 10.0; - R2 = ((float)eeprom_word_read(10)); - - Serial.println(T1, DEC); - Serial.println(R1, DEC); - Serial.println(" "); - Serial.println(T2, DEC); - Serial.println(R2, DEC); - Serial.println(" "); - - } - else - { - // Serial.println("Calculating gyro offsets\n"); - // mpu6050.calcGyroOffsets(true); - - if (devStatus == 0) - { - // if (first_read == true) { - mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 - mpu.CalibrateGyro(6); - Serial.println("These are the Active offsets: "); - mpu.PrintActiveOffsets(); - - int16_t *offsets; - offsets = mpu.GetActiveOffsets(); - - // A_OFFSET_H_READ_A_OFFS(Data); - Serial.print((float)offsets[0], 5); Serial.print(",\t"); - Serial.print((float)offsets[1], 5); Serial.print(",\t"); - Serial.print((float)offsets[2], 5); Serial.print(",\t"); - - // XG_OFFSET_H_READ_OFFS_USR(Data); - Serial.print((float)offsets[3], 5); Serial.print(",\t"); - Serial.print((float)offsets[4], 5); Serial.print(",\t"); - Serial.print((float)offsets[5], 5); Serial.print("\n\n"); - -// } - -#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE - Serial.println("Storing gyro and accel offsets in EEPROM\n"); - - eeprom_word_write(0, 0xA08); - /* eeprom_word_write(1, (int)(mpu6050.getGyroXoffset() * 100.0) + 0.5); - eeprom_word_write(2, (int)(mpu6050.getGyroYoffset() * 100.0) + 0.5); - eeprom_word_write(3, (int)(mpu6050.getGyroZoffset() * 100.0) + 0.5); - */ - /* - Serial.println(eeprom_word_read(0), HEX); - Serial.println(((float)eeprom_word_read(1)) / 100.0, DEC); - Serial.println(((float)eeprom_word_read(2)) / 100.0, DEC); - Serial.println(((float)eeprom_word_read(3)) / 100.0, DEC); -*/ - eeprom_word_write(1, offsets[0]); - eeprom_word_write(2, offsets[1]); - eeprom_word_write(3, offsets[2]); - eeprom_word_write(4, offsets[3]); - eeprom_word_write(5, offsets[4]); - eeprom_word_write(6, offsets[5]); - - Serial.println("\nStoring temperature calibration data in EEPROM\n"); - - eeprom_word_write(7, (int)(T1 * 10.0) + 0.5); - eeprom_word_write(8, (int) R1); - eeprom_word_write(9, (int)(T2 * 10.0) + 0.5); - eeprom_word_write(10, (int) R2); - - T1 = ((float)eeprom_word_read(7)) / 10.0; - R1 = ((float)eeprom_word_read(8)); - T2 = ((float)eeprom_word_read(9)) / 10.0; - R2 = ((float)eeprom_word_read(10)); - - Serial.println(T1, DEC); - Serial.println(R1, DEC); - Serial.println(" "); - Serial.println(T2, DEC); - Serial.println(R2, DEC); - Serial.println(" "); - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE - if (EEPROM.commit()) { - Serial.println("EEPROM successfully committed\n"); - } else { - Serial.println("ERROR! EEPROM commit failed\n"); - } -#endif -#endif - } - } - - /* Supply your gyro offsets here, scaled for min sensitivity */ -/* mpu.setXGyroOffset(57); - mpu.setYGyroOffset(99); - mpu.setZGyroOffset(19); - mpu.setXAccelOffset(-4922); - mpu.setYAccelOffset(-2136); - mpu.setZAccelOffset(3104); - - mpu.setXGyroOffset(0); - mpu.setYGyroOffset(0); - mpu.setZGyroOffset(0); - mpu.setXAccelOffset(0); - mpu.setYAccelOffset(0); - mpu.setZAccelOffset(0); -*/ - if (devStatus == 0) - { -/* if (first_read == true) { - mpu.CalibrateAccel(6); // Calibration Time: generate offsets and calibrate our MPU6050 - mpu.CalibrateGyro(6); - Serial.println("These are the Active offsets: "); - mpu.PrintActiveOffsets(); - } - */ - Serial.println(F("Enabling DMP...")); // Turning ON DMP - mpu.setDMPEnabled(true); - - Serial.print(F("Enabling interrupt detection (Arduino external interrupt ")); - Serial.print(digitalPinToInterrupt(INTERRUPT_PIN)); - Serial.println(F(")...")); - attachInterrupt(digitalPinToInterrupt(INTERRUPT_PIN), DMPDataReady, RISING); - MPUIntStatus = mpu.getIntStatus(); - - /* Set the DMP Ready flag so the main loop() function knows it is okay to use it */ - Serial.println(F("DMP ready! Waiting for first interrupt...")); - DMPReady = true; - packetSize = mpu.dmpGetFIFOPacketSize(); - // Serial.print(packetSize); - } - else - { - Serial.print(F("DMP Initialization failed (code ")); // Print the error code - Serial.print(devStatus); - Serial.println(F(")")); - // 1 = initial memory load failed - // 2 = DMP configuration updates failed - } - - - payload_setup(); // sensor extension setup function defined in payload_extension.cpp - - reset_count = 100; -} - -void loop() { - - blink(50); - - if (Serial1.available() > 0) { - Serial.print("Received serial data!!!\n"); - delay(10); - while (Serial1.available() > 0) { - char result = Serial1.read(); - Serial.print(result); - } - Serial.println(" "); - } - { -// if (result == '?') - { - if (bmePresent) { - Serial1.print(sensor_start_flag); - Serial1.print("OK BME280 "); - Serial1.print(bme.readTemperature()); - Serial1.print(" "); - Serial1.print(bme.readPressure() / 100.0F); - Serial1.print(" "); - Serial1.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); - Serial1.print(" "); - Serial1.print(bme.readHumidity()); - - Serial.print("OK BME280 "); - temp = bme.readTemperature(); - Serial.print(temp); - Serial.print(" "); - Serial.print(bme.readPressure() / 100.0F); - Serial.print(" "); - Serial.print(bme.readAltitude(SEALEVELPRESSURE_HPA)); - Serial.print(" "); - Serial.print(bme.readHumidity()); - } else - { - Serial1.print(sensor_start_flag); - Serial1.print("OK BME280 0.0 0.0 0.0 0.0"); - - Serial.print("OK BME280 0.0 0.0 0.0 0.0"); - } - - /* - mpu6050.update(); - - Serial1.print(" MPU6050 "); - Serial1.print(mpu6050.getGyroX()); - Serial1.print(" "); - Serial1.print(mpu6050.getGyroY()); - Serial1.print(" "); - Serial1.print(mpu6050.getGyroZ()); - - Serial1.print(" "); - Serial1.print(mpu6050.getAccX()); - Serial1.print(" "); - Serial1.print(mpu6050.getAccY()); - Serial1.print(" "); - Serial1.print(mpu6050.getAccZ()); - - Serial.print(" MPU6050 "); - Serial.print(mpu6050.getGyroX()); - Serial.print(" "); - Serial.print(mpu6050.getGyroY()); - Serial.print(" "); - Serial.print(mpu6050.getGyroZ()); - - Serial.print(" "); - Serial.print(mpu6050.getAccX()); - Serial.print(" "); - Serial.print(mpu6050.getAccY()); - Serial.print(" "); - Serial.print(mpu6050.getAccZ()); -*/ - -// if (MPUInterrupt) { -// if (true) { - - if (mpu.dmpGetCurrentFIFOPacket(FIFOBuffer)) - { - /* Display Euler angles in degrees */ - mpu.dmpGetQuaternion(&q, FIFOBuffer); - mpu.dmpGetGravity(&gravity, &q); - mpu.dmpGetYawPitchRoll(ypr, &q, &gravity); - - mpu.getMotion6(&ax, &ay, &az, &gx, &gy, &gz); - - accelx = ax / 16384.0; - accely = ay / 16384.0; - accelz = (az - 16384) / 16384.0; - acceleration = sqrt(accelx*accelx + accely*accely + accelz*accelz); - - gyrox = gx / 6.75; - gyroy = gy / 6.75; - gyroz = gz / 6.75; - rotation = sqrt(gyrox*gyrox + gyroy*gyroy + gyroz*gyroz); - - yaw = ypr[0] * 180 / M_PI; - if (yaw < 0) yaw += 360; - pitch = ypr[1] * 180 / M_PI; - if (pitch < 0) pitch += 360; - roll = ypr[2] * 180 / M_PI; - if (roll < 0) roll += 360; - - // Serial.print("_"); Serial.print(yaw); Serial.print("_"); - // } else - // Serial.print("*"); - - MPUInterrupt = false; - } else - // Serial.print("/"); - - Serial1.print(" "); // Don't know why this is needed - Serial1.print(" MPU6050 "); - Serial1.print(gyrox); Serial1.print(" "); - Serial1.print(gyroy); Serial1.print(" "); - Serial1.print(gyroz); Serial1.print(" "); - Serial1.print(accelx); Serial1.print(" "); - Serial1.print(accely); Serial1.print(" "); - Serial1.print(accelz); - - Serial.print(" MPU6050 "); - Serial.print(gyrox); Serial.print(" "); - Serial.print(gyroy); Serial.print(" "); - Serial.print(gyroz); Serial.print(" "); - Serial.print(accelx); Serial.print(" "); - Serial.print(accely); Serial.print(" "); - Serial.print(accelz); - -/* - } else { - Serial1.print("OK MPU6050 0.0 0.0 0.0 0.0 0.0 0.0"); - Serial.print("OK MPU6050 0.0 0.0 0.0 0.0 0.0 0.0"); - } -*/ - sensorValue = read_analog(); - -// Serial.println(sensorValue); - Temp = T1 + (sensorValue - R1) *((T2 - T1)/(R2 - R1)); - -// Serial1.print(" GPS 0 0 0 TMP "); - - Serial1.print(" GPS "); - Serial1.print(flat,4); - Serial1.print(" "); - Serial1.print(flon,4); - Serial1.print(" "); - Serial1.print(flalt,2); - - Serial1.print(" TMP "); - Serial1.print(Temp); - -// Serial1.print(" "); -// Serial1.println(Sensor2); - - Serial.print(" GPS "); - Serial.print(flat,4); - Serial.print(" "); - Serial.print(flon,4); - Serial.print(" "); - Serial.print(flalt,2); - -// Serial.print(" GPS 0 0 0 TMP "); - Serial.print(" TMP "); - Serial.print(Temp); -// Serial.print(" "); -// Serial.println(Sensor2); - -// float rotation = 0; -// rotation = sqrt(mpu6050.getGyroX()*mpu6050.getGyroX() + mpu6050.getGyroY()*mpu6050.getGyroY() + mpu6050.getGyroZ()*mpu6050.getGyroZ()); -// float acceleration = 0; -// acceleration = sqrt(mpu6050.getAccX()*mpu6050.getAccX() + mpu6050.getAccY()*mpu6050.getAccY() + mpu6050.getAccZ()*mpu6050.getAccZ()); -// Serial.println(" "); -// Serial.print(rotation); -// Serial.print(" "); -// Serial.println(acceleration); - - if (first_read == true) { - first_read = false; - rest = acceleration; - Serial.println(" "); - Serial.print("rest acceleration: "); - Serial.println(rest); - } - - if (acceleration > 1.1 * rest) - led_set(whiteLED, HIGH); - else - led_set(whiteLED, LOW); - - if (rotation > 20) - led_set(yellowLED, HIGH); - else - led_set(yellowLED, LOW); - } - - Serial1.print(" YPR "); - Serial1.print(yaw); - Serial1.print(" "); - Serial1.print(pitch); - Serial1.print(" "); - Serial1.print(roll); - Serial1.print(" "); - - Serial.print(" YPR "); - Serial.print(yaw); - Serial.print(" "); - Serial.print(pitch); - Serial.print(" "); - Serial.print(roll); - Serial.println(" "); - - payload_loop(); // sensor extension read function defined in payload_extension.cpp - -// Serial1.println(" "); - Serial1.println(sensor_end_flag); - Serial.println(" "); - - } - - if (Serial.available() > 0) { - blink(50); - char result = Serial.read(); -// Serial.println(result); -// Serial.println("OK"); -// Serial.println(counter++); -//#if !defined (ARDUINO_ARCH_RP2040) - if (result == 'R' || result == 'r') { -// Serial1.println("OK"); -// delay(100); - Serial.println("Resetting\n"); - first_read = true; - setup(); - } - else if (result == 'D' || result == 'd') { - Serial.println("\nCurrent temperature calibration data\n"); - Serial.println(T1, DEC); - Serial.println(R1, DEC); - Serial.println(" "); - Serial.println(T2, DEC); - Serial.println(R2, DEC); - - Serial.println("\nCurrent raw temperature reading\n"); - Serial.println(sensorValue, DEC); - Serial.println(" "); - } - else if (result == 'C' || result == 'c') { - Serial.println("\nClearing stored gyro and accel offsets in EEPROM\n"); - eeprom_word_write(0, 0x00); -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE - - if (EEPROM.commit()) { - Serial.println("EEPROM successfully committed\n"); - } else { - Serial.println("ERROR! EEPROM commit failed\n"); - } -#endif - first_time = true; - setup(); - } - else if (result == 'S' || result == 's') { - Serial.print("\nStoring temperature calibration data point "); // in EEPROM\n"); - Serial.print(calibration + 1); - Serial.print(" in EEPROM\n"); - - Serial.println(temp); - Serial.println(sensorValue); - Serial.println(" "); - - eeprom_word_write(calibration * 2 + 7 , (int)(temp * 10.0) + 0.5); - eeprom_word_write(calibration * 2 + 8, sensorValue); - - if (calibration == 0) { - T1 = temp; - R1 = sensorValue; - calibration = 1; - } else { - T2 = temp; - R2 = sensorValue; - calibration = 0; - } - -// calibration = (calibration + 1) % 2; -// Serial.println(calibration + 1); - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE - - if (EEPROM.commit()) { - Serial.println("EEPROM successfully committed\n"); - } else { - Serial.println("ERROR! EEPROM commit failed\n"); - } -#endif - - } -//#endif - } - -#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) - Serial.print("Squelch: "); - Serial.println(digitalRead(15)); - - get_gps(); -#else - delay(1000); // not needed due to gps 1 second polling delay - -#endif -// if (reset_count-- == 0) -// setup(); -} - -void eeprom_word_write(int addr, int val) -{ -#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE - EEPROM.write(addr * 2, lowByte(val)); - EEPROM.write(addr * 2 + 1, highByte(val)); -#endif -} - -short eeprom_word_read(int addr) -{ - int result = 0; -#if !defined(ARDUINO_ARCH_MBED_RP2040) // && defined(ARDUINO_ARCH_RP2040) // if Raspberry Pi RP2040 Boards is used in Arduino IDE - result = ((EEPROM.read(addr * 2 + 1) << 8) | EEPROM.read(addr * 2)); -#endif - return result; -} - -void blink_setup() -{ -#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) - // initialize digital pin PB1 as an output. - pinMode(PC13, OUTPUT); - pinMode(PB9, OUTPUT); - pinMode(PB8, OUTPUT); -#endif - -#if defined __AVR_ATmega32U4__ - pinMode(RXLED, OUTPUT); // Set RX LED as an output - // TX LED is set as an output behind the scenes - pinMode(whiteLED, OUTPUT); - pinMode(yellowLED,OUTPUT); -#endif - -#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - pinMode(LED_BUILTIN, OUTPUT); - pinMode(18, OUTPUT); // yellow LED (was blue LED on STEM Payload Board v1.3.2) - pinMode(19, OUTPUT); // white LED (was green LED on STEM Payload Board v1.3.2) -#endif - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - if (check_for_wifi()) { - wifi = true; - led_builtin_pin = LED_BUILTIN; // use default GPIO for Pico W - pinMode(LED_BUILTIN, OUTPUT); -// configure_wifi(); - } else { - led_builtin_pin = 25; // manually set GPIO 25 for Pico board -// pinMode(25, OUTPUT); - pinMode(led_builtin_pin, OUTPUT); - } - pinMode(18, OUTPUT); - pinMode(19, OUTPUT); -#endif -} - -void blink(int length) -{ -#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) - digitalWrite(PC13, LOW); // turn the LED on (HIGH is the voltage level) -#endif - -#if defined __AVR_ATmega32U4__ - digitalWrite(RXLED, LOW); // set the RX LED ON - TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF -#endif - -#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - digitalWrite(LED_BUILTIN, HIGH); // set the built-in LED ON -#endif - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - if (wifi) - digitalWrite(LED_BUILTIN, HIGH); // set the built-in LED ON - else - digitalWrite(led_builtin_pin, HIGH); // set the built-in LED ON -#endif - -delay(length); - -#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) - digitalWrite(PC13, HIGH); // turn the LED off by making the voltage LOW -#endif - -#if defined __AVR_ATmega32U4__ - digitalWrite(RXLED, HIGH); // set the RX LED OFF - TXLED0; //TX LED macro to turn LED ON -#endif - -#if defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - digitalWrite(LED_BUILTIN, LOW); // set the built-in LED OFF -#endif - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) - if (wifi) - digitalWrite(LED_BUILTIN, LOW); // set the built-in LED ON - else - digitalWrite(led_builtin_pin, LOW); // set the built-in LED ON -#endif -} - -void led_set(int ledPin, bool state) -{ -#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) - if (ledPin == whiteLED) - digitalWrite(PB9, state); - else if (ledPin == yellowLED) - digitalWrite(PB8, state); -#endif - -#if defined __AVR_ATmega32U4__ - digitalWrite(ledPin, state); -#endif - -#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) - if (ledPin == whiteLED) - digitalWrite(19, state); - else if (ledPin == yellowLED) - digitalWrite(18, state); -#endif -} - -int read_analog() -{ - int sensorValue; - #if defined __AVR_ATmega32U4__ - sensorValue = analogRead(A3); -#endif - -#if defined(ARDUINO_ARCH_STM32F0) || defined(ARDUINO_ARCH_STM32F1) || defined(ARDUINO_ARCH_STM32F3) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32L4) - sensorValue = analogRead(PA7); -#endif -#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) - sensorValue = analogRead(28); -#endif - return(sensorValue); -} - -#if !defined(ARDUINO_ARCH_MBED_RP2040) && defined(ARDUINO_ARCH_RP2040) -bool check_for_wifi() { - - pinMode(29, INPUT); - const float conversion_factor = 3.3f / (1 << 12); - uint16_t result = analogRead(29); -// Serial.printf("ADC3 value: 0x%03x, voltage: %f V\n", result, result * conversion_factor); - - if (result < 0x10) { - Serial.println("\nPico W detected!\n"); - return(true); - } - else { - Serial.println("\nPico detected!\n"); - return(false); - } -} -#endif - -#if defined (ARDUINO_ARCH_MBED_RP2040) || (ARDUINO_ARCH_RP2040) -void get_gps() { -// Serial.println("Getting GPS data"); - bool newData = false; - unsigned long start = millis(); - -// for (unsigned long start = millis(); millis() - start < 1000;) // 5000;) - while ((millis() - start) < 1000) // 5000;) - { - while (Serial2.available()) - { - char c = Serial2.read(); - if (show_gps) - Serial.write(c); // uncomment this line if you want to see the GPS data flowing - if (gps.encode(c)) // Did a new valid sentence come in? - newData = true; - } - } - if (newData) { - Serial.print("GPS read new data in ms: "); - Serial.println(millis() - start); - -// float flon = 0.0, flat = 0.0, flalt = 0.0; -// unsigned long age; -// starting = millis(); -// gps.f_get_position(&flat, &flon, &age); - - Serial.print(F("Location: ")); - if (gps.location.isValid()) - { - Serial.print(gps.location.lat(), 6); - Serial.print(F(",")); - Serial.print(gps.location.lng(), 6); - - flat = gps.location.lat(); - flon = gps.location.lng(); - flalt = gps.altitude.meters(); - } - else - { - Serial.print(F("INVALID")); - } - Serial.print("\r\n"); - - } else -// Serial.printf("GPS read no new data: %d\n", millis() - start); - ; -} -#endif From 5d59e22b80ed9a8a105ce7c24eb7172ba06bda89 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 23:38:43 -0400 Subject: [PATCH 1580/1744] Delete stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp --- .../payload_extension.cpp | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp diff --git a/stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp b/stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp deleted file mode 100644 index 5b8dd2ec..00000000 --- a/stempayload/Payload_BME280_MPU6050_XS_YPR/payload_extension.cpp +++ /dev/null @@ -1,25 +0,0 @@ -// Use this template for adding additional sensors -// see Payload_BME280_MPU6050_XS_Extended for an example - -// put your library includes here -#include "Arduino.h" - -// put your globals here - -// put your setup code here -void payload_setup() { - -// Serial.println("Starting new sensor!"); - -} - -// put your loop code here -// Very Important: only use print, not println!! -void payload_loop() { - -/* - Serial1.print(" NEW 0.0"); // send sensor data over serial to Pi Zero - Serial.print(" NEW 0.0"); // send sensor data over serial monitor for testing -*/ - -} From 2add846cd5ddd572b19fefda475068a13114f925 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 23:41:03 -0400 Subject: [PATCH 1581/1744] Update README.md --- stempayload/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stempayload/README.md b/stempayload/README.md index a7116d5e..7d234259 100644 --- a/stempayload/README.md +++ b/stempayload/README.md @@ -20,7 +20,9 @@ bme280test Displays the results of reading the BME280 sensor: Temperature, Press GetAllData Displays the results of reading the MPU6050 sensor: Temperature, X, Y, and Z Axes: Acceleration, Gyor (Rotation Rate), and Angle. Requires the following libraries: MPU6050_tockn. -Payload_BME280_MPU6050_XS This code answers the query from the Raspberry Pi CubeSatSim software over the UART so that the STEM Payload is marked "OK" in the FoxTelem CubeSatSim-FSK or CubeSatSim-BPSK Health tab and also replies with BME280 and MPU6050 sensor data. In FoxTelem, this is displayed as the X, Y, and Z Gyro (dps) and in AFSK mode, it is appended to the telemetry string. +Payload_BME280_MPU6050_XS This code answers the query from the Raspberry Pi CubeSatSim software over the UART so that the STEM Payload is marked "OK" in the FoxTelem CubeSatSim-FSK or CubeSatSim-BPSK Health tab and also replies with BME280 and MPU6050 sensor data. In FoxTelem, this is displayed as the X, Y, and Z Gyro (dps) and in AFSK mode, it is appended to the telemetry string. This code also supports a serial GPS module. + +ayload_BME280_MPU6050_YPR_EEPROM This code adds to the Payload_BME280_MPU6050_XS code Yaw Pitch and Roll (YPR) determination. For information about programming the Sparkfun Pro Micro or STM32, see the v1.2 wiki instructions: https://github.com/alanbjohnston/CubeSatSim/wiki/v1.2-8.-STEM-Payload-Board From 2c213687aa93aa86622c4cc5110a739501de6fdb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 14 Aug 2026 23:43:52 -0400 Subject: [PATCH 1582/1744] Update config add gpsd note --- config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config b/config index eeffb51a..72647f56 100755 --- a/config +++ b/config @@ -1967,6 +1967,9 @@ elif [ "$1" = "-u" ]; then echo echo "Change gpsd State" echo + echo "Note: this is just for a GPS module connected to J12 on the CubeSatSim Lite board." + echo "If your GPS module is connected to J12 on the CubeSatSim Main board, always keep gpsd inactive." + echo if [ -z "$param2" ] ; then From 16fda1abc9b98c84f3580c0548ff0f1ad96e49f4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 09:54:29 -0400 Subject: [PATCH 1583/1744] Update transmit.py turn off gpsd if CW Doppler --- transmit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transmit.py b/transmit.py index dc2f2f18..79b3ab11 100644 --- a/transmit.py +++ b/transmit.py @@ -1039,6 +1039,9 @@ if __name__ == "__main__": elif (mode == 'm'): # system("touch /home/pi/CubeSatSim/cwready") print("CW") + if (doppler_mode) and (gpsd_status == "active"): + gpsd_status = "inactive" + print("Turning off gpsd since Doppler mode") while True: # command_control_check() output (pd, 1) From baa26a0c5f89d5331227689bebf4c4df87a44187 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 10:01:49 -0400 Subject: [PATCH 1584/1744] Update transmit.py turn off gpsd and gpsd.socket if Doppler --- transmit.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/transmit.py b/transmit.py index 79b3ab11..3f1e3a3d 100644 --- a/transmit.py +++ b/transmit.py @@ -1041,6 +1041,8 @@ if __name__ == "__main__": print("CW") if (doppler_mode) and (gpsd_status == "active"): gpsd_status = "inactive" + system("sudo systemctl stop gpsd") + system("sudo systemctl stop gpsd.socket") print("Turning off gpsd since Doppler mode") while True: # command_control_check() From 08885090a351ecb553ff9cb8cddfd233996c433f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 10:09:13 -0400 Subject: [PATCH 1585/1744] Update transmit.py switch order of disable gpsd --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 3f1e3a3d..d7ebba65 100644 --- a/transmit.py +++ b/transmit.py @@ -1041,9 +1041,9 @@ if __name__ == "__main__": print("CW") if (doppler_mode) and (gpsd_status == "active"): gpsd_status = "inactive" - system("sudo systemctl stop gpsd") - system("sudo systemctl stop gpsd.socket") print("Turning off gpsd since Doppler mode") + system("sudo systemctl stop gpsd.socket") + system("sudo systemctl stop gpsd") while True: # command_control_check() output (pd, 1) From 12aea45e523386322f6ca68fbeca4d0b2bf213af Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 13:34:55 -0400 Subject: [PATCH 1586/1744] Update transmit.py turn off gpsd for any doppler mode --- transmit.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/transmit.py b/transmit.py index d7ebba65..aa9fb075 100644 --- a/transmit.py +++ b/transmit.py @@ -848,6 +848,12 @@ if __name__ == "__main__": if (doppler_mode == True): + if (gpsd_status == "active"): + gpsd_status = "inactive" + print("Turning off gpsd since Doppler mode") + system("sudo systemctl stop gpsd.socket") + system("sudo systemctl stop gpsd") + # if (command_tx == True) and (skip == False): # cw_transmit_fm("QSY", tx) @@ -1039,11 +1045,6 @@ if __name__ == "__main__": elif (mode == 'm'): # system("touch /home/pi/CubeSatSim/cwready") print("CW") - if (doppler_mode) and (gpsd_status == "active"): - gpsd_status = "inactive" - print("Turning off gpsd since Doppler mode") - system("sudo systemctl stop gpsd.socket") - system("sudo systemctl stop gpsd") while True: # command_control_check() output (pd, 1) From ef1598bd078bcefc1344328bbbbb63544c283c9b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 13:41:25 -0400 Subject: [PATCH 1587/1744] Update config don't turn on gpsd if Doppler mode --- config | 97 ++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 64 insertions(+), 33 deletions(-) diff --git a/config b/config index 72647f56..14342c3a 100755 --- a/config +++ b/config @@ -1971,31 +1971,53 @@ elif [ "$1" = "-u" ]; then echo "If your GPS module is connected to J12 on the CubeSatSim Main board, always keep gpsd inactive." echo + value=`cat /home/pi/CubeSatSim/.mode` + echo "$value" > /dev/null + set -- $value + MODE=$1 + + value=`cat /home/pi/CubeSatSim/sim.cfg` + echo "$value" > /dev/null + set -- $value + if [ "${14}" = "sim" ] || [ "${14}" = "rig" ] ; then + DOPPLER=1 + else + DOPPLER=0 + fi + if [ -z "$param2" ] ; then if [[ $(sudo systemctl is-active gpsd.socket | grep inactive) ]]; then echo "gpsd is inactive" - echo - echo "Do you want to turn gpsd to ON (y/n) " - read reset - echo - - if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "gpsd set to ON" - sudo systemctl enable gpsd - sudo systemctl enable gpsd.socket - echo - echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" - echo - - cat /etc/default/gpsd - + + if [ "$DOPPLER" = "0" ] ; then echo - echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + echo "Do you want to turn gpsd to ON (y/n) " + read reset echo - echo "To monitor your gps device, use the gpsmon command." + + if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then + echo "gpsd set to ON" + sudo systemctl enable gpsd + sudo systemctl enable gpsd.socket + echo + echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" + echo + + cat /etc/default/gpsd + + echo + echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + echo + echo "To monitor your gps device, use the gpsmon command." + echo + reboot=1 + fi + else echo - reboot=1 + echo "gpsd cannot be turned on with Doppler mode. " + echo "To turn on gpsd, first turn off Doppler mode." + echo fi else @@ -2016,21 +2038,30 @@ elif [ "$1" = "-u" ]; then else reset="$param2" if [ "$reset" = "y" ] || [ "$reset" = "yes" ] ; then - echo "gpsd set to ON" - sudo systemctl enable gpsd - sudo systemctl enable gpsd.socket - echo - echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" - echo - - cat /etc/default/gpsd - - echo - echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." - echo - echo "To monitor your gps device, use the gpsmon command." - echo - reboot=1 + if [ "$DOPPLER" = "0" ] ; then + echo "gpsd set to ON" + sudo systemctl enable gpsd + sudo systemctl enable gpsd.socket + echo + echo "Here is the current gpsd configuration /etc/default/gpsd which will work with many GPS modules:" + echo + + cat /etc/default/gpsd + + echo + echo "To change this configuration edit the file with sudo nano /etc/default/gpsd then restart gpsd." + echo + echo "To monitor your gps device, use the gpsmon command." + echo + reboot=1 + else + echo + echo "gpsd cannot be turned on with Doppler mode. " + echo "To turn on gpsd, first turn off Doppler mode." + echo + sudo systemctl disable gpsd + sudo systemctl disable gpsd.socket + fi else echo "gpsd set to OFF" From b41c99ae9aec0bd2ec52230172cb183a10e1ced2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 13:46:31 -0400 Subject: [PATCH 1588/1744] Update config remove blank line --- config | 1 - 1 file changed, 1 deletion(-) diff --git a/config b/config index 14342c3a..4546bfba 100755 --- a/config +++ b/config @@ -1964,7 +1964,6 @@ elif [ "$1" = "-U" ]; then elif [ "$1" = "-u" ]; then - echo echo "Change gpsd State" echo echo "Note: this is just for a GPS module connected to J12 on the CubeSatSim Lite board." From 540c9e51806c7ecec11cf8bd52a5add36eccf3e6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 15:08:08 -0400 Subject: [PATCH 1589/1744] Update transmit.py fix ptt gpis after tune --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index aa9fb075..108bd3f1 100644 --- a/transmit.py +++ b/transmit.py @@ -532,6 +532,7 @@ def transmit_carrier(duration): output(txLed, 1) # system(start) system(command) + system("gpio -g mode 20 out && gpio -g write 20 1") # sleep(duration) # system(stop) output(txLed, 0) From e1a401ca404b2e3ee5a8ce99fa5e43fdfe0d6619 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 15:48:00 -0400 Subject: [PATCH 1590/1744] Update transmit.py reduce doppler prints --- transmit.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/transmit.py b/transmit.py index 108bd3f1..c7b38412 100644 --- a/transmit.py +++ b/transmit.py @@ -343,7 +343,7 @@ def update_doppler(fm="yes"): global rxf global txr global rigctl - print("update_doppler") +## print("update_doppler") with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: frequencies = file.read().split() @@ -351,7 +351,7 @@ def update_doppler(fm="yes"): tx_frequency = int(frequencies[0]) rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency - print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") +## print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") if rigctl: if (tx_frequency > 145955000) and (tx_frequency <= 145965000): @@ -381,23 +381,23 @@ def update_doppler(fm="yes"): new_tx_frequency = tx_frequency new_rx_frequency = rx_center + rx_doppler_shift print("Calculating RX frequency using offset from TX frequency!") - print(f"Tx Doppler Shift: {tx_doppler_shift:.0f} Frequency: {new_tx_frequency:.0f}") - print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") +## print(f"Tx Doppler Shift: {tx_doppler_shift:.0f} Frequency: {new_tx_frequency:.0f}") +## print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") else: new_tx_frequency = tx_frequency new_rx_frequency = rxf * 1e6 # default RX frequency or should we use same as tx frequency with doppler shift? - print(f"Tx Frequency: {new_tx_frequency:.0f}") - print(f"Rx Frequency: {new_rx_frequency:.0f}") +## print(f"Tx Frequency: {new_tx_frequency:.0f}") +## print(f"Rx Frequency: {new_rx_frequency:.0f}") else: new_tx_frequency = tx_frequency new_rx_frequency = rx_frequency - print(f"Tx Frequency: {new_tx_frequency:.0f}") - print(f"Rx Frequency: {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency - rx_doppler_freq_hz = new_rx_frequency + rx_doppler_freq_hz = new_rx_frequency print("Applying Doppler shift!") + print(f"Tx Frequency: {new_tx_frequency:.0f}") + print(f"Rx Frequency: {new_rx_frequency:.0f}") # print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") # rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz # print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") @@ -409,8 +409,8 @@ def update_doppler(fm="yes"): txr = "{:.3f}".format(tx_doppler_freq_hz/1e6) if (fm != "no"): program_fm(rx,tx,rxpl_value,sq,txpl_value) - else: - print("Not applying Doppler shift!") +## else: +## print("Not applying Doppler shift!") except Exception as e: print(f"An error occurred: {e}") print("update_doppler failed") From 08a807217624766623493089c91702bf2bb1f90f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 15 Aug 2026 15:59:11 -0400 Subject: [PATCH 1591/1744] Update transmit.py don't print for gpio operations --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index c7b38412..9d533a5d 100644 --- a/transmit.py +++ b/transmit.py @@ -15,7 +15,7 @@ import subprocess def output(pin, value): command = "gpio -g write " + str(pin) + " " + str(value) system(command) - print(command) +### print(command) def uptime_seconds(): try: @@ -54,7 +54,7 @@ def setup(pin, config): if config == "in" or config == "out" or config == "up" or config == "down": command = "gpio -g mode " + str(pin) + " " + config system(command) - print(command) +### print(command) else: print(f"Unknown gpio setup configuration: {config}") From f94b301c4ca30d19b07ceea9056361cb65599f2c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 08:20:30 -0400 Subject: [PATCH 1592/1744] Update transmit.py added try except --- transmit.py | 240 +++++++++++++++++++++++++++++----------------------- 1 file changed, 134 insertions(+), 106 deletions(-) diff --git a/transmit.py b/transmit.py index 9d533a5d..45a324ea 100644 --- a/transmit.py +++ b/transmit.py @@ -95,7 +95,8 @@ def sim_failure_check(): print("Other failure mode") card = "Headphones" sim_mode = True - except: + except Exception as e: + print(f"An error occurred: {e}") print("No failure mode") card = "Headphones" if sim_config: @@ -109,7 +110,8 @@ def battery_saver_check(): txc = False print("Safe Mode!") print("battery saver activated") - except: + except Exception as e: + print(f"An error occurred: {e}") print("battery saver not activated") # txc = True @@ -127,10 +129,10 @@ def increment_mode(): try: file = open("/home/pi/CubeSatSim/.mode") mode = file.read(1) - except: + except Exception as e: + print(f"An error occurred: {e}") # mode = "f" - if (debug_mode == 1): - print("Can't open .mode file") # , defaulting to FSK") + print("Can't open .mode file") # , defaulting to FSK") file.close() print("Mode is: ") print(mode) @@ -178,7 +180,8 @@ def increment_mode(): system("reboot -h now") sleep(10); - except: + except Exception as e: + print(f"An error occurred: {e}") print("can't write to .mode file") def camera_photo(): @@ -199,7 +202,8 @@ def camera_photo(): system("cp /home/pi/CubeSatSim/sstv//sstv_image_2_320_x_256.jpeg /home/pi/CubeSatSim/camera_out.jpg") print("Using stored image") stored_image = True - except: + except Exception as e: + print(f"An error occurred: {e}") system("cp /home/pi/CubeSatSim/sstv//sstv_image_2_320_x_256.jpeg /home/pi/CubeSatSim/camera_out.jpg") print("Using stored image") stored_image = True @@ -211,7 +215,8 @@ def camera_photo(): try: filep = open("/home/pi/CubeSatSim/telem_string.txt") telem_string = filep.readline() - except: + except Exception as e: + print(f"An error occurred: {e}") telem_string = "" if (debug_mode == 1): print("Can't read telem_string.txt") @@ -302,32 +307,40 @@ def program_fm(rx, tx, rxpl_value, sq, txpl_value): def start_repeater(tx_freq_hz, rx_freq_hz): global txLed - print("Starting repeater") - - if abs(rx_freq_hz - 3 * tx_freq_hz) < 10000: - tx_freq_hz = tx_freq_hz + 30000 - print("Adjusting Repeater TX frequency to avoid 3rd harmonic RX") + try: + print("Starting repeater") - output(txLed, 1) - txr = "{:.3f}".format(tx_freq_hz/1e3) - print(txr) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") - sleep(0.5) - system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") + if abs(rx_freq_hz - 3 * tx_freq_hz) < 10000: + tx_freq_hz = tx_freq_hz + 30000 + print("Adjusting Repeater TX frequency to avoid 3rd harmonic RX") + + output(txLed, 1) + txr = "{:.3f}".format(tx_freq_hz/1e3) + print(txr) + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") + sleep(0.5) + system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") + except Exception as e: + print(f"An error occurred: {e}") + print("start_repeater failed") def stop_repeater(): global txLed -# print("No carrier detected, stopping repeater") - output(txLed, 0) - system("sudo rpitx -i null > /dev/null 2>&1") - system("sudo killall -9 arecord > /dev/null 2>&1") - system("sudo killall -9 nc > /dev/null 2>&1") -# system("sudo killall -9 rpitx > /dev/null 2>&1") - print("Resetting audio") - system("sudo /etc/init.d/alsa-utils stop") - system("sudo /etc/init.d/alsa-utils start") - print("Finished resetting audio") -# print("Ready to detect carrier") + try: + # print("No carrier detected, stopping repeater") + output(txLed, 0) + system("sudo rpitx -i null > /dev/null 2>&1") + system("sudo killall -9 arecord > /dev/null 2>&1") + system("sudo killall -9 nc > /dev/null 2>&1") + # system("sudo killall -9 rpitx > /dev/null 2>&1") + print("Resetting audio") + system("sudo /etc/init.d/alsa-utils stop") + system("sudo /etc/init.d/alsa-utils start") + print("Finished resetting audio") + # print("Ready to detect carrier") + except Exception as e: + print(f"An error occurred: {e}") + print("stop_repeater failed") def update_doppler(fm="yes"): @@ -496,48 +509,60 @@ def cw_transmit_fm(morse, tx): def cw_transmit_string(string): global morse_timing - for character in string: - if (character != ' '): - update_doppler() - cw_transmit_char(character); - else: - sleep(7.0 * morse_timing); + try: + for character in string: + if (character != ' '): + update_doppler() + cw_transmit_char(character); + else: + sleep(7.0 * morse_timing); + except Exception as e: + print(f"An error occurred: {e}") + print("cw_transmit_string failed") def cw_transmit_char(character): global morse_timing -# update_doppler("no") - i = 0 - duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] - if duration == 1: - duration = 1.2 -# print(duration) - while (duration != 0): - transmit_carrier(duration * morse_timing) - sleep(morse_timing * 0.4) # 6) - i=i+1 + try: + # update_doppler("no") + i = 0 duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] if duration == 1: duration = 1.2 - sleep(morse_timing * 2.0) # 3) # 1.5); + # print(duration) + while (duration != 0): + transmit_carrier(duration * morse_timing) + sleep(morse_timing * 0.4) # 6) + i=i+1 + duration = morse_table[(ord(character.upper()) - ord('0')) % 44][i] + if duration == 1: + duration = 1.2 + sleep(morse_timing * 2.0) # 3) # 1.5); + except Exception as e: + print(f"An error occurred: {e}") + print("cw_transmit_char failed") def transmit_carrier(duration): global tx_doppler_freq_hz global txLed - update_doppler("no") - command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 - start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 - stop = "sudo rpitx -f 434.9e6 &" -# killrpitx = "sudo killall -9 rpitx &" - killtune = "sudo killall -9 tune &" - output(txLed, 1) -# system(start) - system(command) - system("gpio -g mode 20 out && gpio -g write 20 1") -# sleep(duration) -# system(stop) - output(txLed, 0) -# system(killrpitx) -# system(killtune) + try: + update_doppler("no") + command = "timeout -k 0.5 " + str(duration) + " sudo tune -f " + str(tx_doppler_freq_hz) + " > /dev/null 2>&1" # 434.9e6 + start = "sudo tune -f " + str(tx_doppler_freq_hz) + " &" # + " & > /dev/null 2>&1" # 434.9e6 + stop = "sudo rpitx -f 434.9e6 &" + # killrpitx = "sudo killall -9 rpitx &" + killtune = "sudo killall -9 tune &" + output(txLed, 1) + # system(start) + system(command) + system("gpio -g mode 20 out && gpio -g write 20 1") + # sleep(duration) + # system(stop) + output(txLed, 0) + # system(killrpitx) + # system(killtune) + except Exception as e: + print(f"An error occurred: {e}") + print("transmit_carrier failed") print("CubeSatSim v2.2 transmit.py starting...") @@ -1055,51 +1080,54 @@ if __name__ == "__main__": f.close() system("sudo rm /home/pi/CubeSatSim/cwready") ## ch = 1 - for chan in range(7): - if (doppler_mode): - if (command_tx == True): - try: - # update_doppler() - filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" - print(filename) - file = open(filename) - cw_string = file.readline() - print(cw_string) - cw_transmit_string(cw_string) - except Exception as e: - print(f"An error occurred: {e}") - print("error reading cw string " + str(chan)) - else: - command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" - print(command) - system(command) - ## chan = chan + 1 - if (command_tx == True): - output(txLed, 1) - if (doppler_mode == True): - update_doppler() - txf = tx_doppler_freq_hz / 1e6 - tx = "{:.4f}".format(txf) - if (txc): - sim_failure_check() - # output (pd, 1) - sleep(0.3) - output (ptt, 0) - system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") - sleep(0.1) - output (ptt, 1) - # output (pd, 0) - else: - if (debug_mode == 1): - system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + try: + for chan in range(7): + if (doppler_mode): + if (command_tx == True): + try: + # update_doppler() + filename="/home/pi/CubeSatSim/cw" + str(chan) + ".txt" + print(filename) + file = open(filename) + cw_string = file.readline() + print(cw_string) + cw_transmit_string(cw_string) + except Exception as e: + print(f"An error occurred: {e}") + print("error reading cw string " + str(chan)) + else: + command = "gen_packets -M 20 -o /home/pi/CubeSatSim/morse.wav /home/pi/CubeSatSim/cw" + str(chan) + ".txt -r 48000 > /dev/null 2>&1" + print(command) + system(command) + ## chan = chan + 1 + if (command_tx == True): + output(txLed, 1) + if (doppler_mode == True): + update_doppler() + txf = tx_doppler_freq_hz / 1e6 + tx = "{:.4f}".format(txf) + if (txc): + sim_failure_check() + # output (pd, 1) + sleep(0.3) + output (ptt, 0) + system("aplay -D plughw:CARD=" + card + ",DEV=0 /home/pi/CubeSatSim/morse.wav") + sleep(0.1) + output (ptt, 1) + # output (pd, 0) else: - system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") - output(txLed, 0) - -# command_control_check() - sleep(2) - f.close() - sleep(10) + if (debug_mode == 1): + system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3") + else: + system("cat /home/pi/CubeSatSim/morse.wav | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo /home/pi/rpitx/rpitx -i- -m RF -f " + tx + "e3 > /dev/null 2>&1") + output(txLed, 0) + + # command_control_check() + sleep(2) + f.close() + sleep(10) + except Exception as e: + print(f"An error occurred: {e}") except: # command_control_check() # print("cw not ready") From 3e2c8e90d9c4cee99f7bb2972db16d14db9f5085 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 08:24:50 -0400 Subject: [PATCH 1593/1744] Update transmit.py add print in exception --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index 9d533a5d..515801de 100644 --- a/transmit.py +++ b/transmit.py @@ -414,6 +414,7 @@ def update_doppler(fm="yes"): except Exception as e: print(f"An error occurred: {e}") print("update_doppler failed") + print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") morse_table = [ # 0-9, A-Z only by (ASCII - 48) [ 3, 3, 3, 3, 3, 0 ], # 0 From 4c7dc0f542be25ced68a1f514f8bb9c380f8873a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 08:32:44 -0400 Subject: [PATCH 1594/1744] Update transmit.py remove exception print for battery saver check --- transmit.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 45a324ea..9a932425 100644 --- a/transmit.py +++ b/transmit.py @@ -110,8 +110,7 @@ def battery_saver_check(): txc = False print("Safe Mode!") print("battery saver activated") - except Exception as e: - print(f"An error occurred: {e}") + except print("battery saver not activated") # txc = True From 3e1d1a7d0e5bbafa5c7e25d630932c41930800f8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 08:38:33 -0400 Subject: [PATCH 1595/1744] Update transmit.py prints on one line --- transmit.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 9a932425..5c788015 100644 --- a/transmit.py +++ b/transmit.py @@ -407,9 +407,7 @@ def update_doppler(fm="yes"): if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency rx_doppler_freq_hz = new_rx_frequency - print("Applying Doppler shift!") - print(f"Tx Frequency: {new_tx_frequency:.0f}") - print(f"Rx Frequency: {new_rx_frequency:.0f}") + print(f"Applying Doppler shift! Tx Frequency: {new_tx_frequency:.0f} Rx Frequency: {new_rx_frequency:.0f}") # print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") # rx_doppler_freq_hz = rx_doppler_start_hz + rx_doppler_shift_hz # print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") From 0098278043fd32e11288d76298ba58e5f5fb87f6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 09:08:37 -0400 Subject: [PATCH 1596/1744] Update transmit.py missing : --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 5c788015..84cd91be 100644 --- a/transmit.py +++ b/transmit.py @@ -110,7 +110,7 @@ def battery_saver_check(): txc = False print("Safe Mode!") print("battery saver activated") - except + except: print("battery saver not activated") # txc = True From 577b0dbda2a9fb73920c071542103890d3e8028d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 09:17:41 -0400 Subject: [PATCH 1597/1744] Update transmit.py length check in reading frequency.txt --- transmit.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 84cd91be..2ae6ac2d 100644 --- a/transmit.py +++ b/transmit.py @@ -361,8 +361,11 @@ def update_doppler(fm="yes"): frequencies = file.read().split() tx_frequency = int(frequencies[0]) - rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency - + if (len(frequencies) > 1): + rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency + else: + print("error in reading frequency.txt") + print(frequencies) ## print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") if rigctl: From 2ff7c27da4fbc0d5334132ce7831a38995739b2a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 09:42:01 -0400 Subject: [PATCH 1598/1744] Update transmit.py fix update_doppler error printing --- transmit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 7e20bde1..5308e3f2 100644 --- a/transmit.py +++ b/transmit.py @@ -366,6 +366,7 @@ def update_doppler(fm="yes"): else: print("error in reading frequency.txt") print(frequencies) + rx_frequency = 435000000 ## print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") if rigctl: @@ -427,7 +428,7 @@ def update_doppler(fm="yes"): except Exception as e: print(f"An error occurred: {e}") print("update_doppler failed") - print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") + print(f"Frequencies: {frequencies}") morse_table = [ # 0-9, A-Z only by (ASCII - 48) [ 3, 3, 3, 3, 3, 0 ], # 0 From e47449812c2b2e1485bab9dac1ab260332300845 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 09:47:28 -0400 Subject: [PATCH 1599/1744] Update transmit.py exception around frequency.txt --- transmit.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index 5308e3f2..45555417 100644 --- a/transmit.py +++ b/transmit.py @@ -356,10 +356,13 @@ def update_doppler(fm="yes"): global txr global rigctl ## print("update_doppler") - - with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: - frequencies = file.read().split() - + try: + with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: + frequencies = file.read().split() + except Exception as e: + print(f"An error occurred: {e}") + print("reading frequency.txt failed") + tx_frequency = int(frequencies[0]) if (len(frequencies) > 1): rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency From 51c022b277f1034339dc96b4a447970d93a46989 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 10:03:49 -0400 Subject: [PATCH 1600/1744] Update transmit.py add error for empty frequencies --- transmit.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/transmit.py b/transmit.py index 45555417..3f8481bc 100644 --- a/transmit.py +++ b/transmit.py @@ -362,12 +362,17 @@ def update_doppler(fm="yes"): except Exception as e: print(f"An error occurred: {e}") print("reading frequency.txt failed") - - tx_frequency = int(frequencies[0]) + + if (len(frequencies) > 0): + tx_frequency = int(frequencies[0]) + else: + print("error 1 in reading frequency.txt") + print(frequencies) + tx_frequency = 434900000 if (len(frequencies) > 1): rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency else: - print("error in reading frequency.txt") + print("error 2 in reading frequency.txt") print(frequencies) rx_frequency = 435000000 ## print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") From 973c40a10f9045904b13e45846695e29d0c4a752 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 10:35:37 -0400 Subject: [PATCH 1601/1744] Update transmit.py try reading frequency.txt again --- transmit.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 3f8481bc..5d76198f 100644 --- a/transmit.py +++ b/transmit.py @@ -360,9 +360,17 @@ def update_doppler(fm="yes"): with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: frequencies = file.read().split() except Exception as e: - print(f"An error occurred: {e}") + print(f"An error 3 occurred: {e}") print("reading frequency.txt failed") - + if frequencies is None: + sleep(0.1) + try: + with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: + frequencies = file.read().split() + except Exception as e: + print(f"An error 4 occurred: {e}") + print("reading frequency.txt failed") + if (len(frequencies) > 0): tx_frequency = int(frequencies[0]) else: From 348795b429caeffdce28c8d837075c2cbee2fe9f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 11:06:32 -0400 Subject: [PATCH 1602/1744] Update transmit.py try twice and return if failed --- transmit.py | 45 ++++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/transmit.py b/transmit.py index 5d76198f..45cf8f50 100644 --- a/transmit.py +++ b/transmit.py @@ -360,29 +360,40 @@ def update_doppler(fm="yes"): with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: frequencies = file.read().split() except Exception as e: - print(f"An error 3 occurred: {e}") - print("reading frequency.txt failed") - if frequencies is None: + print(f"An error 1 occurred: {e}") + print("reading file frequency.txt failed") + try: + tx_frequency = int(frequencies[0]) + rx_frequency = int(frequencies[1]) + except Exception as e: + print(f"An error 2 occurred: {e}") + print("reading frequency.txt failed") sleep(0.1) try: with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: frequencies = file.read().split() + except Exception as e: + print(f"An error 3 occurred: {e}") + print("reading file frequency.txt failed") + try: + tx_frequency = int(frequencies[0]) + rx_frequency = int(frequencies[1]) except Exception as e: print(f"An error 4 occurred: {e}") - print("reading frequency.txt failed") - - if (len(frequencies) > 0): - tx_frequency = int(frequencies[0]) - else: - print("error 1 in reading frequency.txt") - print(frequencies) - tx_frequency = 434900000 - if (len(frequencies) > 1): - rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency - else: - print("error 2 in reading frequency.txt") - print(frequencies) - rx_frequency = 435000000 + print("reading frequency.txt failed") + return +# if (len(frequencies) > 0): +# tx_frequency = int(frequencies[0]) +# else: +# print("error 1 in reading frequency.txt") +# print(frequencies) +# tx_frequency = 434900000 +# if (len(frequencies) > 1): +# rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency +# else: +# print("error 2 in reading frequency.txt") +# print(frequencies) +# rx_frequency = 435000000 ## print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") if rigctl: From 97252c31c87595bb288222d30d514dd19eafcbba Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 16 Aug 2026 11:22:39 -0400 Subject: [PATCH 1603/1744] Update transmit.py print success for 2nd read of frequency.txt --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index 45cf8f50..97e23528 100644 --- a/transmit.py +++ b/transmit.py @@ -378,6 +378,7 @@ def update_doppler(fm="yes"): try: tx_frequency = int(frequencies[0]) rx_frequency = int(frequencies[1]) + print("Success reading frequency.txt again") except Exception as e: print(f"An error 4 occurred: {e}") print("reading frequency.txt failed") From 3b4a93643afbc277a9b593ff885ece4f082b7823 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 15:48:17 -0400 Subject: [PATCH 1604/1744] Update command change direwolf to -D3 --- command | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/command b/command index 73839a05..27988bb4 100755 --- a/command +++ b/command @@ -66,11 +66,11 @@ if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "debug mode" - direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d + direwolf -D3 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py d else - direwolf -P+ -D1 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py + direwolf -D3 -r 48000 -c /home/pi/CubeSatSim/direwolf-cc.conf -t 0l | /home/pi/venv/bin/python3 /home/pi/CubeSatSim/dtmf_aprs_cc.py fi else From a31d706979e077ff05619c20383565bc676c275b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 15:49:40 -0400 Subject: [PATCH 1605/1744] Update command.service user pi and cpuquota 50% --- systemd/command.service | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/systemd/command.service b/systemd/command.service index 9354154f..eb4a5a56 100644 --- a/systemd/command.service +++ b/systemd/command.service @@ -8,7 +8,9 @@ WorkingDirectory=/home/pi/CubeSatSim StandardOutput=inherit StandardError=inherit Restart=always -User=root +User=pi +CPUQuota=50% +CPUWeight=50 [Install] WantedBy=default.target From e88e0894cfc14aeccf938642319c7440694fda0e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 15:50:38 -0400 Subject: [PATCH 1606/1744] Update frequency.service add cpuquota 50% --- systemd/frequency.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/systemd/frequency.service b/systemd/frequency.service index 03ecb550..b4a690a5 100644 --- a/systemd/frequency.service +++ b/systemd/frequency.service @@ -9,6 +9,9 @@ StandardOutput=inherit StandardError=inherit Restart=always User=pi +CPUQuota=15% +CPUWeight=70 +CPUAccounting=true [Install] WantedBy=default.target From 79a9e9aadfc4072f66bd18b0d45a1682261392cc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 15:57:00 -0400 Subject: [PATCH 1607/1744] Update log don't cat log after real time --- log | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log b/log index 453fc893..8e1035ee 100755 --- a/log +++ b/log @@ -35,11 +35,11 @@ if [ "$REALTIME" = "1" ] ; then # echo -e "\nTransmit Log file also saved as /home/pi/CubeSatSim/logt.txt" elif [ "$1" = "-c" ]; then sudo journalctl -b all -af -u command # > /home/pi/CubeSatSim/logc.txt - cat /home/pi/CubeSatSim/logc.txt + # cat /home/pi/CubeSatSim/logc.txt # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logc.txt" elif [ "$1" = "-p" ]; then sudo journalctl -b all -af -u pacsatsim # > /home/pi/CubeSatSim/logp.txt - cat /home/pi/CubeSatSim/logp.txt + # cat /home/pi/CubeSatSim/logp.txt # echo -e "\nCommand and Control Log file also saved as /home/pi/CubeSatSim/logp.txt" elif [ "$1" = "-r" ]; then sudo journalctl -b all -af -u frequency # > /home/pi/CubeSatSim/logr.txt From 0819bb2342c737cfe7eafe2a60ad6fe659be3387 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 16:47:25 -0400 Subject: [PATCH 1608/1744] Update transmit.py space before qsy --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 97e23528..ea09f4d0 100644 --- a/transmit.py +++ b/transmit.py @@ -900,7 +900,7 @@ if __name__ == "__main__": program_fm(rx,tx,rxpl_value,sq,txpl_value) if ((doppler_mode == True) and (rigctl == True) and (command_tx == True) and (skip == False)) or (mode == 'e'): - cw_transmit_fm(callsign + "QSY", tx) + cw_transmit_fm(callsign + " QSY", tx) if (doppler_mode == True): From dc83a69763a5cbcdb413602a573437ef5f5cb173 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 17:00:39 -0400 Subject: [PATCH 1609/1744] Update frequency.py comment back in repeater mode txrf --- frequency.py | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/frequency.py b/frequency.py index 1191d969..82af7123 100644 --- a/frequency.py +++ b/frequency.py @@ -701,6 +701,7 @@ iss_doppler_passes = { ] } +print("CubeSatSim v2.2 frequency.py starting...") try: tx_value = '0' rx_value = '0' @@ -730,12 +731,14 @@ try: if len(config) > 6: txf = float(config[6]) tx = "{:.4f}".format(txf) -# if (mode == 'e'): -# txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band -# txr = "{:.4f}".format(txrf) -# print("Transmit frequency: ",txr) -# else: -# print("Transmit frequency: ",tx) +###### + if (mode == 'e'): + txrf = (txf - 290.0) # - 0.1 # Cross Band Repeater mode transmit frequency in 2m band + txr = "{:.4f}".format(txrf) + print("Transmit frequency: ",txr) + else: + print("Transmit frequency: ",tx) +###### print("Transmit frequency: ",tx) if len(config) > 7: rxf = float(config[7]) @@ -797,12 +800,13 @@ if (doppler_mode == 'off'): if (doppler_mode == 'sim'): print("Sim mode") - -# if (mode == 'e'): -# tx_doppler_start_hz = txrf * 1e6 -# else: -# tx_doppler_start_hz = txf * 1e6 - tx_doppler_start_hz = txf * 1e6 +##### + if (mode == 'e'): + tx_doppler_start_hz = txrf * 1e6 + else: + tx_doppler_start_hz = txf * 1e6 +##### +# tx_doppler_start_hz = txf * 1e6 tx_doppler_shift_hz = 0 print(f"Tx center frequency: {tx_doppler_start_hz}") rx_doppler_start_hz = rxf * 1e6 From e5530170f399258bf6ced04188a7bb09ed256aca Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 17:05:46 -0400 Subject: [PATCH 1610/1744] Update frequency.py changed to freq.txt --- frequency.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frequency.py b/frequency.py index 82af7123..42b90ebb 100644 --- a/frequency.py +++ b/frequency.py @@ -792,8 +792,8 @@ if (doppler_mode == 'off'): tx_freq_hz = txf * 1e6 rx_freq_hz = rxf * 1e6 # check_frequency() - print("writing sim.cfg frequency to frequency.txt") - with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + print("writing sim.cfg frequency to freq.txt") + with open("/home/pi/CubeSatSim/freq.txt", "w") as file: file.write(f"{tx_freq_hz:.0f} {rx_freq_hz:.0f}") while True: sleep(1) @@ -839,7 +839,7 @@ if (doppler_mode == 'sim'): print(f"Tx Doppler shift: {tx_doppler_freq_hz:.0f}") print(f"Rx Doppler shift: {rx_doppler_freq_hz:.0f}") - with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + with open("/home/pi/CubeSatSim/freq.txt", "w") as file: file.write(f"{tx_doppler_freq_hz:.0f} {rx_doppler_freq_hz:.0f}") sleep(1) From 4362a6e80d35c942bb9ace7a42823b90bece1d0a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 17:07:53 -0400 Subject: [PATCH 1611/1744] Update transmit.py read freq.txt write to frequency.txt --- transmit.py | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index ea09f4d0..1a83c193 100644 --- a/transmit.py +++ b/transmit.py @@ -357,42 +357,42 @@ def update_doppler(fm="yes"): global rigctl ## print("update_doppler") try: - with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: + with open("/home/pi/CubeSatSim/freq.txt", "r") as file: frequencies = file.read().split() except Exception as e: print(f"An error 1 occurred: {e}") - print("reading file frequency.txt failed") + print("reading file freq.txt failed") try: tx_frequency = int(frequencies[0]) rx_frequency = int(frequencies[1]) except Exception as e: print(f"An error 2 occurred: {e}") - print("reading frequency.txt failed") + print("reading freq.txt failed") sleep(0.1) try: - with open("/home/pi/CubeSatSim/frequency.txt", "r") as file: + with open("/home/pi/CubeSatSim/freq.txt", "r") as file: frequencies = file.read().split() except Exception as e: print(f"An error 3 occurred: {e}") - print("reading file frequency.txt failed") + print("reading file freq.txt failed") try: tx_frequency = int(frequencies[0]) rx_frequency = int(frequencies[1]) - print("Success reading frequency.txt again") + print("Success reading freq.txt again") except Exception as e: print(f"An error 4 occurred: {e}") - print("reading frequency.txt failed") + print("reading freq.txt failed") return # if (len(frequencies) > 0): # tx_frequency = int(frequencies[0]) # else: -# print("error 1 in reading frequency.txt") +# print("error 1 in reading freq.txt") # print(frequencies) # tx_frequency = 434900000 # if (len(frequencies) > 1): # rx_frequency = int(frequencies[1]) # Not used right now as FT857 emulation only updates transmit frequency # else: -# print("error 2 in reading frequency.txt") +# print("error 2 in reading freq.txt") # print(frequencies) # rx_frequency = 435000000 ## print(f"New TX Frequency: {tx_frequency}, new RX Frequency: {rx_frequency}") @@ -435,6 +435,11 @@ def update_doppler(fm="yes"): else: new_tx_frequency = tx_frequency new_rx_frequency = rx_frequency + +##### write true freq here ###### + print("writing actual tx and rx frequency to frequency.txt") + with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + file.write(f"{new_tx_frequency:.0f} {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency From 64477a0e2bca124786c4f04ac353e29de95e1b9b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 17:11:52 -0400 Subject: [PATCH 1612/1744] Update transmit.py fix tabs --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 1a83c193..d266b058 100644 --- a/transmit.py +++ b/transmit.py @@ -439,7 +439,7 @@ def update_doppler(fm="yes"): ##### write true freq here ###### print("writing actual tx and rx frequency to frequency.txt") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: - file.write(f"{new_tx_frequency:.0f} {new_rx_frequency:.0f}") + file.write(f"{new_tx_frequency:.0f} {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): tx_doppler_freq_hz = new_tx_frequency From 33b76e4934763d0ac33a55d97629509ffbebe9c3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 17:13:57 -0400 Subject: [PATCH 1613/1744] Update transmit.py fix tabs --- transmit.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index d266b058..fa9e7a1b 100644 --- a/transmit.py +++ b/transmit.py @@ -437,8 +437,8 @@ def update_doppler(fm="yes"): new_rx_frequency = rx_frequency ##### write true freq here ###### - print("writing actual tx and rx frequency to frequency.txt") - with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: + print("writing actual tx and rx frequency to frequency.txt") + with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{new_tx_frequency:.0f} {new_rx_frequency:.0f}") if (tx_doppler_freq_hz != new_tx_frequency) or (rx_doppler_freq_hz != new_rx_frequency): From 581711ce1b7243ce14f3ff54dd88ff7ad21c2b1a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 17:23:58 -0400 Subject: [PATCH 1614/1744] Update transmit.py print --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index fa9e7a1b..93c310ad 100644 --- a/transmit.py +++ b/transmit.py @@ -437,7 +437,7 @@ def update_doppler(fm="yes"): new_rx_frequency = rx_frequency ##### write true freq here ###### - print("writing actual tx and rx frequency to frequency.txt") + print(f"writing actual tx and rx frequency to frequency.txt Tx Frequency: {new_tx_frequency:.0f} Rx Frequency: {new_rx_frequency:.0f}") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{new_tx_frequency:.0f} {new_rx_frequency:.0f}") From 8c1bc80f14d761ad4af0036c51c1ce579ed43255 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 17 Aug 2026 17:42:06 -0400 Subject: [PATCH 1615/1744] Update transmit.py print after no satellite detected --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 93c310ad..13246f55 100644 --- a/transmit.py +++ b/transmit.py @@ -417,7 +417,7 @@ def update_doppler(fm="yes"): else: tx_center = tx_frequency rx_center = rxf * 1e6 # default RX requency - print("No Satellite detected. Using default RX frequency with no doppler shift") + print(f"No Satellite detected. TX frequency: {tx_frequency:.0f} Using default RX frequency with no doppler shift") if (rx_center != rxf * 1e6): # don't Doppler shift default RX frequency since don't know the shift tx_doppler_shift = tx_frequency - tx_center From d71a211a1b7f2fd45f529bf4c179e32077420a29 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 06:41:44 -0400 Subject: [PATCH 1616/1744] Update config print current rx frequency --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index 4546bfba..861defa9 100755 --- a/config +++ b/config @@ -309,7 +309,8 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 /home/pi/CubeSatSim/frequency.txt - echo -e "\nCurrent RX Frequency (MHz) is: ${8} or set for a particular satellite" + echo -e "\nCurrent RX Frequency (Hz) is: " + head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 2 elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" echo -n "TX Frequency is approximately: " From dec0addb592b4fd3820be7c89ea4c41048775be7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 06:42:44 -0400 Subject: [PATCH 1617/1744] Update config print on one line --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 861defa9..b88aaa91 100755 --- a/config +++ b/config @@ -309,7 +309,7 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 /home/pi/CubeSatSim/frequency.txt - echo -e "\nCurrent RX Frequency (Hz) is: " + echo -n "\nCurrent RX Frequency (Hz) is: " head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 2 elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" From cdf8260df5fd385c99374c973f0126c8b87364fd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 06:43:58 -0400 Subject: [PATCH 1618/1744] Update config blank line --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index b88aaa91..bd1891cc 100755 --- a/config +++ b/config @@ -309,8 +309,9 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 /home/pi/CubeSatSim/frequency.txt - echo -n "\nCurrent RX Frequency (Hz) is: " + echo -n "Current RX Frequency (Hz) is: " head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 2 + echo elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" echo -n "TX Frequency is approximately: " From 94a97d830228ccdb89fb800a376cbe06eff2ebc2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 06:45:10 -0400 Subject: [PATCH 1619/1744] Update config fix tx frequency print --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index bd1891cc..b664e410 100755 --- a/config +++ b/config @@ -309,9 +309,9 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -c -11 /home/pi/CubeSatSim/frequency.txt + echo echo -n "Current RX Frequency (Hz) is: " head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 2 - echo elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then echo "Doppler frequency shift is OFF" echo -n "TX Frequency is approximately: " From 95f704913e0a8c150fe5850fc3e15f7b75cb03a3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 06:50:32 -0400 Subject: [PATCH 1620/1744] Update config fix current tx frequency --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index b664e410..77b6fef0 100755 --- a/config +++ b/config @@ -308,7 +308,7 @@ TXPL=${11} elif [ "${14}" = "rig" ] ; then echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " - head -c -11 /home/pi/CubeSatSim/frequency.txt + head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 1 echo echo -n "Current RX Frequency (Hz) is: " head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 2 From 806119c7d7642b4b275e0ec0d1ef746a1f5c865a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 06:51:34 -0400 Subject: [PATCH 1621/1744] Update config extra blank line --- config | 1 - 1 file changed, 1 deletion(-) diff --git a/config b/config index 77b6fef0..898b8964 100755 --- a/config +++ b/config @@ -309,7 +309,6 @@ TXPL=${11} echo "rigctld Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 1 - echo echo -n "Current RX Frequency (Hz) is: " head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 2 elif [[ ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j") ]] ; then From 59a6fb25f4a5b270abc5a3576b23467b6a30bed0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 07:03:57 -0400 Subject: [PATCH 1622/1744] Update transmit.py add check_frequency --- transmit.py | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/transmit.py b/transmit.py index 13246f55..e776db9c 100644 --- a/transmit.py +++ b/transmit.py @@ -435,8 +435,8 @@ def update_doppler(fm="yes"): else: new_tx_frequency = tx_frequency new_rx_frequency = rx_frequency - -##### write true freq here ###### + + check_frequency() print(f"writing actual tx and rx frequency to frequency.txt Tx Frequency: {new_tx_frequency:.0f} Rx Frequency: {new_rx_frequency:.0f}") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{new_tx_frequency:.0f} {new_rx_frequency:.0f}") @@ -463,6 +463,34 @@ def update_doppler(fm="yes"): print("update_doppler failed") print(f"Frequencies: {frequencies}") +def check_frequency(): + + global new_tx_frequency + global new_rx_frequency + tx_OK = False + rx_OK = False + + if new_tx_frequency > 450000000: + new_tx_frequency = 435200000 + elif (new_tx_frequency < 420000000) and (new_tx_frequency > 148000000): + new_tx_frequency = 434700000 + elif (new_tx_frequency < 144000000): + new_tx_frequency = 434600000 + else: + tx_OK = True + + if new_rx_frequency > 450000000: + new_rx_frequency = 435200000 + elif (new_rx_frequency < 420000000) and (new_rx_frequency > 148000000): + new_rx_frequency = 434700000 + elif (new_rx_frequency < 144000000): + new_rx_frequency = 434600000 + else: + rx_OK = True + + if (tx_OK != True) or (rx_OK != True): + print("Error - frequency out of range!") + morse_table = [ # 0-9, A-Z only by (ASCII - 48) [ 3, 3, 3, 3, 3, 0 ], # 0 [ 1, 3, 3, 3, 3, 0 ], # 1 From 8ed7d53638d6a94fecd16bd2cdaf42716a88ff1c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 07:08:44 -0400 Subject: [PATCH 1623/1744] Update transmit.py add check_frequency try except --- transmit.py | 56 ++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/transmit.py b/transmit.py index e776db9c..54f2724c 100644 --- a/transmit.py +++ b/transmit.py @@ -461,35 +461,39 @@ def update_doppler(fm="yes"): except Exception as e: print(f"An error occurred: {e}") print("update_doppler failed") - print(f"Frequencies: {frequencies}") def check_frequency(): - global new_tx_frequency - global new_rx_frequency - tx_OK = False - rx_OK = False - - if new_tx_frequency > 450000000: - new_tx_frequency = 435200000 - elif (new_tx_frequency < 420000000) and (new_tx_frequency > 148000000): - new_tx_frequency = 434700000 - elif (new_tx_frequency < 144000000): - new_tx_frequency = 434600000 - else: - tx_OK = True - - if new_rx_frequency > 450000000: - new_rx_frequency = 435200000 - elif (new_rx_frequency < 420000000) and (new_rx_frequency > 148000000): - new_rx_frequency = 434700000 - elif (new_rx_frequency < 144000000): - new_rx_frequency = 434600000 - else: - rx_OK = True - - if (tx_OK != True) or (rx_OK != True): - print("Error - frequency out of range!") + try: + global new_tx_frequency + global new_rx_frequency + tx_OK = False + rx_OK = False + + if new_tx_frequency > 450000000: + new_tx_frequency = 435200000 + elif (new_tx_frequency < 420000000) and (new_tx_frequency > 148000000): + new_tx_frequency = 434700000 + elif (new_tx_frequency < 144000000): + new_tx_frequency = 434600000 + else: + tx_OK = True + + if new_rx_frequency > 450000000: + new_rx_frequency = 435200000 + elif (new_rx_frequency < 420000000) and (new_rx_frequency > 148000000): + new_rx_frequency = 434700000 + elif (new_rx_frequency < 144000000): + new_rx_frequency = 434600000 + else: + rx_OK = True + + if (tx_OK != True) or (rx_OK != True): + print("Error - frequency out of range!") + + except Exception as e: + print(f"An error occurred: {e}") + print("check_frequency failed") morse_table = [ # 0-9, A-Z only by (ASCII - 48) [ 3, 3, 3, 3, 3, 0 ], # 0 From ff118560d1247d71fd08ea6e93a88083aaf9717e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 07:13:00 -0400 Subject: [PATCH 1624/1744] Update transmit.py add no doppler print --- transmit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/transmit.py b/transmit.py index 54f2724c..342f1537 100644 --- a/transmit.py +++ b/transmit.py @@ -428,6 +428,7 @@ def update_doppler(fm="yes"): ## print(f"Tx Doppler Shift: {tx_doppler_shift:.0f} Frequency: {new_tx_frequency:.0f}") ## print(f"Rx Doppler Shift: {rx_doppler_shift:.0f} Frequency: {new_rx_frequency:.0f}") else: + print("Don't doppler shift RX frequency") new_tx_frequency = tx_frequency new_rx_frequency = rxf * 1e6 # default RX frequency or should we use same as tx frequency with doppler shift? ## print(f"Tx Frequency: {new_tx_frequency:.0f}") From d85abe7a17ea21ef53bf289a571cb68acf4e65ea Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 07:16:24 -0400 Subject: [PATCH 1625/1744] Update transmit.py define new_tx_frequency --- transmit.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/transmit.py b/transmit.py index 342f1537..7e4bc67b 100644 --- a/transmit.py +++ b/transmit.py @@ -347,6 +347,8 @@ def update_doppler(fm="yes"): global start_time global tx_doppler_freq_hz global rx_doppler_freq_hz + global new_tx_frequency + global new_rx_frequency global rxpl_value global txpl_value global sq @@ -695,6 +697,9 @@ skip = False tx_doppler_freq_hz = 0 rx_doppler_freq_hz = 0 +new_tx_frequency = 0 +new_rx_frequency = 0 + if __name__ == "__main__": mode = "y" if (len(sys.argv)) > 1: From e8703cfc6e406493c23e8107a5dc7f694640dabd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 07:51:53 -0400 Subject: [PATCH 1626/1744] Update transmit.py redo check_frequency --- transmit.py | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) diff --git a/transmit.py b/transmit.py index 7e4bc67b..65470aa3 100644 --- a/transmit.py +++ b/transmit.py @@ -439,7 +439,10 @@ def update_doppler(fm="yes"): new_tx_frequency = tx_frequency new_rx_frequency = rx_frequency - check_frequency() +# check_frequency() + new_tx_frequency = check_frequency(new_tx_frequency) + new_rx_frequency = check_frequency(new_rx_frequency) + print(f"writing actual tx and rx frequency to frequency.txt Tx Frequency: {new_tx_frequency:.0f} Rx Frequency: {new_rx_frequency:.0f}") with open("/home/pi/CubeSatSim/frequency.txt", "w") as file: file.write(f"{new_tx_frequency:.0f} {new_rx_frequency:.0f}") @@ -465,38 +468,19 @@ def update_doppler(fm="yes"): print(f"An error occurred: {e}") print("update_doppler failed") -def check_frequency(): - - try: - global new_tx_frequency - global new_rx_frequency - tx_OK = False - rx_OK = False - - if new_tx_frequency > 450000000: - new_tx_frequency = 435200000 - elif (new_tx_frequency < 420000000) and (new_tx_frequency > 148000000): - new_tx_frequency = 434700000 - elif (new_tx_frequency < 144000000): - new_tx_frequency = 434600000 - else: - tx_OK = True - - if new_rx_frequency > 450000000: - new_rx_frequency = 435200000 - elif (new_rx_frequency < 420000000) and (new_rx_frequency > 148000000): - new_rx_frequency = 434700000 - elif (new_rx_frequency < 144000000): - new_rx_frequency = 434600000 - else: - rx_OK = True - - if (tx_OK != True) or (rx_OK != True): - print("Error - frequency out of range!") +def check_frequency(frequency): + + if frequency > 450000000: + frequency = 435200000 + print("Frequency out of band!") + elif (frequency < 420000000) and (frequency > 148000000): + frequency = 434700000 + print("Frequency out of band!") + elif (frequency < 144000000): + frequency = 434600000 + print("Frequency out of band!") - except Exception as e: - print(f"An error occurred: {e}") - print("check_frequency failed") + return(frequency) morse_table = [ # 0-9, A-Z only by (ASCII - 48) [ 3, 3, 3, 3, 3, 0 ], # 0 From c887fbdbdab352c16b04dc97d57d642eddc7f8dd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 07:52:43 -0400 Subject: [PATCH 1627/1744] Update transmit.py fix check_frequency --- transmit.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/transmit.py b/transmit.py index 65470aa3..c90670ec 100644 --- a/transmit.py +++ b/transmit.py @@ -470,15 +470,15 @@ def update_doppler(fm="yes"): def check_frequency(frequency): - if frequency > 450000000: - frequency = 435200000 - print("Frequency out of band!") - elif (frequency < 420000000) and (frequency > 148000000): - frequency = 434700000 - print("Frequency out of band!") - elif (frequency < 144000000): - frequency = 434600000 - print("Frequency out of band!") + if frequency > 450000000: + frequency = 435200000 + print("Frequency out of band!") + elif (frequency < 420000000) and (frequency > 148000000): + frequency = 434700000 + print("Frequency out of band!") + elif (frequency < 144000000): + frequency = 434600000 + print("Frequency out of band!") return(frequency) From 98bbd86069fa7a87e1936c914d96ef6367a7d349 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 09:11:08 -0400 Subject: [PATCH 1628/1744] Update transmit.py check RX frequency for 70cm --- transmit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/transmit.py b/transmit.py index c90670ec..620cab2b 100644 --- a/transmit.py +++ b/transmit.py @@ -820,6 +820,9 @@ if __name__ == "__main__": print("Transmit frequency: ",tx) if len(config) > 7: rxf = float(config[7]) + if (rxf > 450) or (rxf < 420): + print("RX Frequency out of band!") + rxf = 435 rx = "{:.4f}".format(rxf) print(rx) if len(config) > 8: From aae2993df12c35373dcdbbf2a18020ec6babc164 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 09:45:46 -0400 Subject: [PATCH 1629/1744] Update config.yaml increase log timeout to 10 minutes --- OliveTin/config.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index c17e18ee..23362bf0 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -252,7 +252,7 @@ actions: shell: /home/pi/CubeSatSim/log -d r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "CubeSatSim Log" shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -d @@ -264,7 +264,7 @@ actions: shell: /home/pi/CubeSatSim/log -t r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Transmit Log" shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -t @@ -276,7 +276,7 @@ actions: shell: /home/pi/CubeSatSim/log -r r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Frequency Control Log" shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -r @@ -288,7 +288,7 @@ actions: shell: /home/pi/CubeSatSim/log -f r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Frequency Display Log" shell: /home/pi/CubeSatSim/log -f @@ -300,7 +300,7 @@ actions: shell: /home/pi/CubeSatSim/log -p r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Pacsat Log" shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -p @@ -312,7 +312,7 @@ actions: shell: /home/pi/CubeSatSim/log -b r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Pushbutton Log" shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -b @@ -324,7 +324,7 @@ actions: shell: /home/pi/CubeSatSim/log -c r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Command and Control Log" shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -c @@ -336,7 +336,7 @@ actions: shell: /home/pi/CubeSatSim/log -o r icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Web (OliveTin) Log" shell: echo "If this log file is too long, it might timeout. If that happens, try the Realtime Log instead" && /home/pi/CubeSatSim/log -o @@ -381,7 +381,7 @@ actions: shell: /home/pi/CubeSatSim/config -S icon: logs onclick: execution-dialog - timeout: 120 + timeout: 600 - title: "Clear Logs and Restart" shell: /home/pi/CubeSatSim/config -C From 61852d9ad4282bd5787fdfc5d0c3b08e50c4205e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 10:21:22 -0400 Subject: [PATCH 1630/1744] Update bookmarks.json update css --- groundstation/bookmarks.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/groundstation/bookmarks.json b/groundstation/bookmarks.json index b3c55a2c..6ccbd6a1 100644 --- a/groundstation/bookmarks.json +++ b/groundstation/bookmarks.json @@ -34,10 +34,15 @@ "frequency": 162550000, "modulation": "nfm" }, + { + "name": "CubeSatSim Cross Band Repeater", + "frequency": 144900000, + "modulation": "nfm" + }, { "name": "CubeSatSim", "frequency": 434900000, - "modulation": "packet" + "modulation": "sstv" }, { "name": "ISS SSTV/Voice", From 7cb48fe2b7a3a2b4417803da18a986bd85cf6406 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 10:28:11 -0400 Subject: [PATCH 1631/1744] Update bookmarks.json add Doppler satellites --- groundstation/bookmarks.json | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/groundstation/bookmarks.json b/groundstation/bookmarks.json index 6ccbd6a1..d780af28 100644 --- a/groundstation/bookmarks.json +++ b/groundstation/bookmarks.json @@ -44,6 +44,11 @@ "frequency": 434900000, "modulation": "sstv" }, + { + "name": "CubeSatSim RX", + "frequency": 435000000, + "modulation": "nfm" + }, { "name": "ISS SSTV/Voice", "frequency": 145800000, @@ -58,5 +63,25 @@ "name": "ISS Voice Repeater", "frequency": 437800000, "modulation": "nfm" - } + }, + { + "name": "AO-91", + "frequency": 145960000, + "modulation": "nfm" + }, + { + "name": "AO-73", + "frequency": 145970000, + "modulation": "nfm" + }, + { + "name": "ISS U/V", + "frequency": 145800000, + "modulation": "nfm" + }, + { + "name": "AO-7 Mode B", + "frequency": 145950000, + "modulation": "nfm" + } ] From 957466b915ec2b57a651514c98e626afe696fb43 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 13:54:21 -0400 Subject: [PATCH 1632/1744] Update main.c fix negative temperature --- main.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 85737b85..249a9623 100644 --- a/main.c +++ b/main.c @@ -1761,8 +1761,11 @@ void get_tlm_fox() { encodeA(b, 9 + head_offset, battCurr); - encodeB(b, 10 + head_offset, (int)(sensor[TEMP] * 10 + 0.5)); // Temp - + if (sensor[TEMP] > 0 ) + encodeB(b, 10 + head_offset, (int)(sensor[TEMP] * 10 + 0.5)); // Temp + else + encodeB(b, 10 + head_offset, 0); + if (mode == FSK) { encodeA(b, 12 + head_offset, posXv); encodeB(b, 13 + head_offset, negXv); @@ -1830,7 +1833,11 @@ void get_tlm_fox() { encodeB(b_max, 43 + head_offset, (int)(sensor_max[GYRO_Z] + 0.5) + 2048); // encodeB(b_max, 49 + head_offset, (int)(sensor_max[XS1] * 10 + 0.5) + 2048); - encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5)); + if (sensor_max[TEMP] > 0) + encodeB(b_max, 10 + head_offset, (int)(sensor_max[TEMP] * 10 + 0.5)); + else + encodeB(b_max, 10 + head_offset, 0); + encodeA(b_max, 45 + head_offset, (int)(sensor_max[HUMI] * 10 + 0.5)); if (failureMode != FAIL_PAYLOAD) { encodeA(b_max, 48 + head_offset, (int)(sensor_max[DTEMP] * 10 + 0.5) + 2048); @@ -1893,8 +1900,12 @@ void get_tlm_fox() { encodeB(b_min, 43 + head_offset, (int)(sensor_min[GYRO_Z] + 0.5) + 2048); // encodeB(b_min, 49 + head_offset, (int)(sensor_min[XS1] * 10 + 0.5) + 2048); - encodeB(b_min, 10 + head_offset, (int)(sensor_min[TEMP] * 10 + 0.5)); - encodeA(b_min, 45 + head_offset, (int)(sensor_min[HUMI] * 10 + 0.5)); + if (sensor_min[TEMP] > 0) + encodeB(b_min, 10 + head_offset, (int)(sensor_min[TEMP] * 10 + 0.5)); + else + encodeB(b_min, 10 + head_offset, 0); + + encodeA(b_min, 45 + head_offset, (int)(sensor_min[HUMI] * 10 + 0.5)); if (failureMode != FAIL_PAYLOAD) { encodeA(b_min, 48 + head_offset, (int)(sensor_min[DTEMP] * 10 + 0.5) + 2048); @@ -1955,7 +1966,10 @@ void get_tlm_fox() { if (sensor[ALT] < 0) sensor[ALT] = 0.0; encodeB(b, 34 + head_offset, (int)(sensor[ALT] / 10.0 + 0.5)); // Altitude encodeA(b, 45 + head_offset, (int)(sensor[HUMI] * 10 + 0.5)); // in place of sensor1 - encodeA(b, 39 + head_offset, (int)(other[TEMP] * 10 + 0.5)); + if (other[TEMP] > 0) + encodeA(b, 39 + head_offset, (int)(other[TEMP] * 10 + 0.5)); + else + encodeA(b, 39 + head_offset, 0); encodeA(b, 36 + head_offset, Resets); encodeB(b, 37 + head_offset, (int)(other[RSSI] + 0.5) + 2048); From 0be8775efa734d4e68552160cb32a420585e2c30 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 13:58:10 -0400 Subject: [PATCH 1633/1744] Update telem.c v2.3 --- telem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telem.c b/telem.c index 57248b93..46f81d63 100644 --- a/telem.c +++ b/telem.c @@ -15,7 +15,7 @@ int main(int argc, char *argv[]) { } } - printf("CubeSatSim v2.2 INA219 Voltage and Current Telemetry\n"); + printf("CubeSatSim v2.3 INA219 Voltage and Current Telemetry\n"); map[MINUS_X] = MINUS_Y; map[PLUS_Z] = MINUS_X; map[MINUS_Y] = PLUS_Z; From 5323896e363485af77017448815bdb30c1cb4292 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 13:58:42 -0400 Subject: [PATCH 1634/1744] Update install v2.3 --- install | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install b/install index 039c07eb..f06b2a81 100755 --- a/install +++ b/install @@ -11,7 +11,7 @@ if [ -f "$FILE" ]; then UPDATE=1 - echo -e "\nUpdate script for CubeSatSim v2.2\n" + echo -e "\nUpdate script for CubeSatSim v2.3\n" echo "You should restart when this update completes with command:" echo "sudo reboot now" @@ -39,7 +39,7 @@ if [ -f "$FILE" ]; then else - echo -e "\nInstallation script for CubeSatSim v2.2\n" + echo -e "\nInstallation script for CubeSatSim v2.3\n" echo "You should restart when this install completes with command:" echo "sudo reboot now" From db83f90797acbeb33045fd4baddd574cefb7034e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 13:59:02 -0400 Subject: [PATCH 1635/1744] Update transmit.py v2.3 --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 620cab2b..b7c63f83 100644 --- a/transmit.py +++ b/transmit.py @@ -618,7 +618,7 @@ def transmit_carrier(duration): print(f"An error occurred: {e}") print("transmit_carrier failed") -print("CubeSatSim v2.2 transmit.py starting...") +print("CubeSatSim v2.3 transmit.py starting...") system("sudo systemctl restart frequency") From 425bcf618748bda2d6fab0c3ec409eeb8259a48c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 13:59:30 -0400 Subject: [PATCH 1636/1744] Update config v2.3 --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 898b8964..5d782b09 100755 --- a/config +++ b/config @@ -126,7 +126,7 @@ function check_restart { } echo -echo "CubeSatSim v2.2 configuration tool" +echo "CubeSatSim v2.3 configuration tool" echo # echo $1 # echo $2 From 26f60e18072e5ae7c4e8cc4c4898151a88080bcf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 18 Aug 2026 13:59:56 -0400 Subject: [PATCH 1637/1744] Update main.c v2.3 --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 249a9623..b23edcc0 100644 --- a/main.c +++ b/main.c @@ -26,7 +26,7 @@ int main(int argc, char * argv[]) { - printf("\n\nCubeSatSim v2.2 starting...\n\n"); + printf("\n\nCubeSatSim v2.3 starting...\n\n"); wiringPiSetup(); From 8ddaa56f276cc6c14e34d728d5f86c94661561b0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Aug 2026 08:59:32 -0400 Subject: [PATCH 1638/1744] Update config add OS detection to config --- config | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config b/config index 5d782b09..ee15e394 100755 --- a/config +++ b/config @@ -426,6 +426,16 @@ TXPL=${11} rtl=0 fi +#if [[ $(grep '11.' /etc/debian_version) ]]; then +if [[ $(grep 'bullseye' /etc/os-release) ]]; then + echo "Pi OS is Bullseye (Debian 11)" +elif [[ $(grep 'bookworm' /etc/os-release) ]]; then + echo "Pi OS is Bookworm (Debian 12)" +elif [[ $(grep 'trixie' /etc/os-release) ]]; then + echo "Pi OS is Trixie (Debian 13)" +fi + + echo echo -e "Current sim.cfg configuration file:" # echo From 50f993279ff528187a54b69fd8a1487c3faffafb Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Aug 2026 09:16:37 -0400 Subject: [PATCH 1639/1744] Update main.c move is_safe --- main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 39f1509f..05db0372 100644 --- a/main.c +++ b/main.c @@ -1547,12 +1547,16 @@ void get_tlm(void) { printf("\n\nTelemetry string is %s \n\n", str); - if (transmit && is_safe_input(str)) { + if (transmit) { + if (is_safe_input(str)) + printf("String is safe") + else + printf("String is not safe") FILE * file2 = popen(str, "r"); pclose(file2); - sleep(2); - digitalWrite(txLed, txLedOff); + sleep(2); + digitalWrite(txLed, txLedOff); } else { fprintf(stderr, "\nNo CubeSatSim Band Pass Filter detected. No transmissions after the CW ID.\n"); From 810d0127ed3738008ec85bea230fa413db064c79 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Aug 2026 09:17:35 -0400 Subject: [PATCH 1640/1744] Update main.c print result of is_safe_input --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 05db0372..ad536c3e 100644 --- a/main.c +++ b/main.c @@ -1549,9 +1549,9 @@ void get_tlm(void) { if (transmit) { if (is_safe_input(str)) - printf("String is safe") + printf("String is safe"); else - printf("String is not safe") + printf("String is not safe"); FILE * file2 = popen(str, "r"); pclose(file2); From 78632dde9f671ccb9e2815ae8b721008422dc21b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Aug 2026 09:22:10 -0400 Subject: [PATCH 1641/1744] Update main.c print is_safe --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index ad536c3e..70cc7184 100644 --- a/main.c +++ b/main.c @@ -1549,9 +1549,9 @@ void get_tlm(void) { if (transmit) { if (is_safe_input(str)) - printf("String is safe"); + fprintf(stderr, "String is safe"); else - printf("String is not safe"); + fprintf(stderr, "String is not safe"); FILE * file2 = popen(str, "r"); pclose(file2); From d32c2cdc04a5c6837f5393973eb42e21fff80820 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Aug 2026 09:25:35 -0400 Subject: [PATCH 1642/1744] Update main.c remove is_safe_input test --- main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index 70cc7184..b0444ef8 100644 --- a/main.c +++ b/main.c @@ -1548,10 +1548,10 @@ void get_tlm(void) { printf("\n\nTelemetry string is %s \n\n", str); if (transmit) { - if (is_safe_input(str)) - fprintf(stderr, "String is safe"); - else - fprintf(stderr, "String is not safe"); +// if (is_safe_input(str)) +// fprintf(stderr, "String is safe"); +// else +// fprintf(stderr, "String is not safe"); FILE * file2 = popen(str, "r"); pclose(file2); @@ -1571,6 +1571,7 @@ void get_tlm(void) { return; } +/* int is_safe_input(const char *s) { for (; *s; s++) { if (!isdigit((unsigned char)*s) @@ -1581,6 +1582,7 @@ int is_safe_input(const char *s) { } return 1; } +*/ // generates telemetry which is decoded by AMSAT's FoxTelem: https://www.amsat.org/foxtelem-software-for-windows-mac-linux/ // for more info about how we use FoxTelem see https://www.g0kla.com/foxtelem/amsat_telemetry_designers_handbook.pdf From 77ea23d65f74969138acbf8f8278841ff3251a18 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Aug 2026 09:37:25 -0400 Subject: [PATCH 1643/1744] Update install change bullseye detection to os-release --- install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install b/install index f06b2a81..9760b19e 100755 --- a/install +++ b/install @@ -66,7 +66,7 @@ if [ ! -f "$FILE" ]; then cp /home/pi/CubeSatSim/hotspot_ini /home/pi/CubeSatSim/hotspot.ini fi -if [[ $(grep '11.' /etc/debian_version) ]]; then +if [[ $(grep 'bullseye' /etc/os-release) ]]; then BULLSEYE=1 From f5d817de30dceb3731eb62c3f710c7b45c1f8c66 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 19 Aug 2026 16:57:14 -0400 Subject: [PATCH 1644/1744] Update install always install default-jdk --- install | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install b/install index 9760b19e..d2cc2fd7 100755 --- a/install +++ b/install @@ -639,11 +639,12 @@ if [ ! -d "/home/pi/Desktop/PacsatGround" ]; then echo "Downloading latest PacsatGround Station version" $FILENAME wget $URL/$FILENAME -O PacsatGround_unix.tar.gz tar -xzf PacsatGround_unix.tar.gz -C /home/pi/Desktop - sudo usermod -a -G gpio pi - sudo apt-get install default-jdk -y fi +sudo usermod -a -G gpio pi +sudo apt-get install default-jdk -y + FILE=/home/pi/Desktop/PacsatGround/spacecraft/PacSatSim.commands if [ ! -f "$FILE" ]; then echo "copying missing commands file" From 4b282bb2e32b73d8e7187a4c3f75c9aac877959a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 10:29:01 -0400 Subject: [PATCH 1645/1744] Update direwolf-pacsat.conf fix direwolf warnings --- groundstation/direwolf/direwolf-pacsat.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/groundstation/direwolf/direwolf-pacsat.conf b/groundstation/direwolf/direwolf-pacsat.conf index 3b9d337b..0d4ba0e1 100644 --- a/groundstation/direwolf/direwolf-pacsat.conf +++ b/groundstation/direwolf/direwolf-pacsat.conf @@ -3,7 +3,7 @@ MODEM 1200 KISSPORT 8100 AGWPORT 8002 DWAIT 20 -SLOTTIME 300 +SLOTTIME 10 PERSIST 63 -TXDELAY 1000 +TXDELAY 30 FULLDUP OFF From eef463671c8c0e88e6924f3be85b8c79b0cf1149 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 10:30:38 -0400 Subject: [PATCH 1646/1744] Update asound.conf add MicVolume --- asound.conf | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/asound.conf b/asound.conf index a752802a..82947c47 100644 --- a/asound.conf +++ b/asound.conf @@ -33,16 +33,28 @@ pcm.shared_speaker { } # Recording with input mixing -pcm.shared_mic { +pcm.shared_mic_raw { type dsnoop + ipc_key 2048 ipc_perm 0666 + slave { pcm "hw:CARD=Device,DEV=0" -# channels 1 + channels 1 rate 48000 - period_time 0 period_size 1024 buffer_size 4096 } } + +pcm.shared_mic { + type softvol + + slave.pcm "shared_mic_raw" + + control { + name "MicVolume" + card 2 + } +} From bdf1bd28a91cb5b7a67a1c89fc6ff142f04dad60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 10:32:09 -0400 Subject: [PATCH 1647/1744] Update pacsatsim.sh add amixer -c 2 set MicVolume 200 --- pacsatsim.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index e7e5d679..9388550d 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -41,6 +41,7 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 + amixer -c 2 set MicVolume 200 else echo "No USB Sound Card detected" soundcard=0 From 31947f88d3cbc00aeec116cdc81780b1d7dc3ba1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 10:33:14 -0400 Subject: [PATCH 1648/1744] Update pacsat.sh add amixer -c 2 set MicVolume 200 --- groundstation/pacsat.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 40fbc67c..eede956b 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -46,6 +46,7 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 + amixer -c 2 set MicVolume 200 else echo "No USB Sound Card detected" soundcard=0 From a2df3b455ff5edfbb897a4f97ba5dc1fde8ea400 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 10:39:00 -0400 Subject: [PATCH 1649/1744] Update config add MicVolumne --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index ee15e394..50e74082 100755 --- a/config +++ b/config @@ -1580,7 +1580,7 @@ elif [ "$1" = "-L" ]; then echo if [ -z "$param2" ] ; then - echo -e "Enter microphone level in percentage (integer 0 - 100): " + echo -e "Enter microphone level (integer 0 - 255): " read mic else mic="$param2" @@ -1588,7 +1588,7 @@ elif [ "$1" = "-L" ]; then if ! [ -z $mic ] && [[ $mic =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then echo "Updating mic level to" $mic "%" - value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set Mic $mic% + value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic else echo "Not updating mic level" fi From 43869cef92c26eb3ed73c64e290ab64576b11bb6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 11:26:31 -0400 Subject: [PATCH 1650/1744] Update direwolf-cc.conf comment out TXDELAY --- direwolf-cc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index af71089d..365c3d01 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -4,6 +4,6 @@ MYCALL AMSAT CHANNEL 0 MODEM 1200 FULLDUP OFF -TXDELAY 0 +#TXDELAY 0 AGWPORT 8200 KISSPORT 8201 From 66862761ef69e3a40d7cc72f9ff4c2ce3a1cc664 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 11:27:26 -0400 Subject: [PATCH 1651/1744] Update direwolf-cc.conf change KISSPORT --- direwolf-cc.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf-cc.conf b/direwolf-cc.conf index 365c3d01..d6baa9ef 100644 --- a/direwolf-cc.conf +++ b/direwolf-cc.conf @@ -6,4 +6,4 @@ MODEM 1200 FULLDUP OFF #TXDELAY 0 AGWPORT 8200 -KISSPORT 8201 +KISSPORT 8203 From ac7df2095e6ee376ba8edeaae05322d5737096fd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 11:48:54 -0400 Subject: [PATCH 1652/1744] Update install add alsa-base.conf --- install | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/install b/install index d2cc2fd7..4c735a32 100755 --- a/install +++ b/install @@ -352,6 +352,21 @@ elif [[ $(grep 'trixie' /etc/os-release) ]]; then fi fi +FILE=/etc/modprobe.d/alsa-base.conf +if [ -f "$FILE" ]; then + echo "$FILE exists." + if [[ $(grep "options snd-usb-audio index=2" $FILE) ]]; then + echo "options snd-usb-audio index=2 already in $FILE"; + else + echo "adding options snd-usb-audio index=2 to $FILE"; + sudo sed -i '$a options snd-usb-audio index=2' $FILE + echo "options snd-usb-audio index=2" | sudo tee -a $FILE # > /dev/null + fi +else + echo "creating $FILE" + echo "options snd-usb-audio index=2" | sudo tee $FILE # > /dev/null +fi + FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." From 8bfb5f2ede2e2f3aa744ad137c1724b4ac04b3cd Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 20 Aug 2026 12:41:57 -0400 Subject: [PATCH 1653/1744] Update install add also-base.conf --- install | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/install b/install index d2cc2fd7..4c735a32 100755 --- a/install +++ b/install @@ -352,6 +352,21 @@ elif [[ $(grep 'trixie' /etc/os-release) ]]; then fi fi +FILE=/etc/modprobe.d/alsa-base.conf +if [ -f "$FILE" ]; then + echo "$FILE exists." + if [[ $(grep "options snd-usb-audio index=2" $FILE) ]]; then + echo "options snd-usb-audio index=2 already in $FILE"; + else + echo "adding options snd-usb-audio index=2 to $FILE"; + sudo sed -i '$a options snd-usb-audio index=2' $FILE + echo "options snd-usb-audio index=2" | sudo tee -a $FILE # > /dev/null + fi +else + echo "creating $FILE" + echo "options snd-usb-audio index=2" | sudo tee $FILE # > /dev/null +fi + FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then echo "$FILE exists." From 3027e335fe981f6aafa9f6fcaa379af6ad237a6c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Aug 2026 20:19:42 -0400 Subject: [PATCH 1654/1744] Update pacsat.sh stop and start wireplumber --- groundstation/pacsat.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index eede956b..1e937470 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -46,7 +46,9 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 + systemctl --user stop wireplumber amixer -c 2 set MicVolume 200 + systemctl --user start wireplumber else echo "No USB Sound Card detected" soundcard=0 From a2cf7d4b0af494440ee8349bda5e5c1e3159ca24 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Aug 2026 20:20:18 -0400 Subject: [PATCH 1655/1744] Update pacsatsim.sh stop and start wireplumber --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index 9388550d..7eb15337 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -41,7 +41,9 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 + systemctl --user stop wireplumber amixer -c 2 set MicVolume 200 + systemctl --user start wireplumber else echo "No USB Sound Card detected" soundcard=0 From e1e56af9cdc2b087f9c816c8387c37d4ac321605 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Aug 2026 20:21:17 -0400 Subject: [PATCH 1656/1744] Update config stop and start wireplumber --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 50e74082..624f5c72 100755 --- a/config +++ b/config @@ -1587,8 +1587,10 @@ elif [ "$1" = "-L" ]; then fi if ! [ -z $mic ] && [[ $mic =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then + systemctl --user stop wireplumber echo "Updating mic level to" $mic "%" value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic + systemctl --user start wireplumber else echo "Not updating mic level" fi From 8e3bd2b0efcf966b3e1b3bbf3e48b2f1b1403f5c Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 25 Aug 2026 20:40:22 -0400 Subject: [PATCH 1657/1744] Update direwolf-pacsatsim.conf TX delay 30 --- direwolf/direwolf-pacsatsim.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/direwolf/direwolf-pacsatsim.conf b/direwolf/direwolf-pacsatsim.conf index b96fc68f..8353c396 100644 --- a/direwolf/direwolf-pacsatsim.conf +++ b/direwolf/direwolf-pacsatsim.conf @@ -3,7 +3,7 @@ MODEM 1200 DWAIT 0 SLOTTIME 10 PERSIST 63 -TXDELAY 1000 +TXDELAY 30 TXTAIL 10 FULLDUP OFF DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE From 19aa8e371bca489ef3298059d9e961672094c480 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 27 Aug 2026 17:13:03 -0400 Subject: [PATCH 1658/1744] Update frequency.py fix udo --- frequency.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frequency.py b/frequency.py index 42b90ebb..e46f8821 100644 --- a/frequency.py +++ b/frequency.py @@ -848,7 +848,7 @@ if (doppler_mode == 'rig'): while True: system("sudo killall -9 ft857d &>/dev/null") - system("udo killall -9 socat &>/dev/null") + system("sudo killall -9 socat &>/dev/null") system("sudo killall -9 rigctld &>/dev/null") print("Starting virtual serial ports /tmp/vttyA and /tmp/vttyB") From 9ff2826f632cec4369c12e45cbb59874e48150c9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:42:35 -0400 Subject: [PATCH 1659/1744] Update config added -V maxcpus setting --- config | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/config b/config index 624f5c72..7b1b9a9c 100755 --- a/config +++ b/config @@ -2231,6 +2231,48 @@ elif [ "$1" = "-K" ]; then restart=1 # fi +elif [ "$1" = "-V" ]; then + + echo + echo "Changing the maxcpus setting" + echo + + CPUS=$(cat /boot/firmware/cmdline.txt| grep -oP 'maxcpus=\K\d+') + + if [ -z "$param2" ] ; then + + if [ "$param2" = "1" ] || [ "$param2" = "2" ] || [ "$param2" = "3" ] + + sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' + echo "Setting maxcpus="$param2 + + else + + echo "invalid maxcpus value" + + else + + echo "Current maxcpus="$CPUs + echo + echo "How many CPUs do you want to set (1-3) ?" + echo "Return keeps current value." + echo "0 removes any maxcpus setting" + + read NEWCPU + + if [ $NEWCPU = "" ] + echo "No change to maxcpus" + if [ $NEWCPU = "0" ] + sudo sed -i 's/maxcpus=$CPUS//g' + echo "Removing maxcpus setting" + elif [ $NEWCPU = "1" ] || [ $NEWCPU = "2" ] || [ $NEWCPU = "3" ] | + sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' + echo "Setting maxcpus="$NEWCPU + else + echo "Invalid maxcpus setting. No change made." + fi + fi + elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -2278,6 +2320,7 @@ elif [ "$1" = "-h" ]; then echo " -u Change gpsd state" echo " -k Reset the PacSatSim Configuration" echo " -K Change the Doppler frequency shift setting" + echo " -V Set the maximum CPUs" echo exit From 097ac6ac841a12d851184c7eb9f324cbf7c6515f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:45:31 -0400 Subject: [PATCH 1660/1744] Update config -V fixes --- config | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config b/config index 7b1b9a9c..c35df3b8 100755 --- a/config +++ b/config @@ -2241,7 +2241,7 @@ elif [ "$1" = "-V" ]; then if [ -z "$param2" ] ; then - if [ "$param2" = "1" ] || [ "$param2" = "2" ] || [ "$param2" = "3" ] + if [ "$param2" = "1" ] || [ "$param2" = "2" ] || [ "$param2" = "3" ] ; then sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' echo "Setting maxcpus="$param2 @@ -2250,6 +2250,8 @@ elif [ "$1" = "-V" ]; then echo "invalid maxcpus value" + fi + else echo "Current maxcpus="$CPUs @@ -2260,9 +2262,9 @@ elif [ "$1" = "-V" ]; then read NEWCPU - if [ $NEWCPU = "" ] + if [ $NEWCPU = "" ] ; then echo "No change to maxcpus" - if [ $NEWCPU = "0" ] + elif [ $NEWCPU = "0" ] sudo sed -i 's/maxcpus=$CPUS//g' echo "Removing maxcpus setting" elif [ $NEWCPU = "1" ] || [ $NEWCPU = "2" ] || [ $NEWCPU = "3" ] | From cd3f81c6dc9ad73cf6d7645ed04fbc0f78889c2d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:46:23 -0400 Subject: [PATCH 1661/1744] Update config -V cleanup --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index c35df3b8..d60ab92f 100755 --- a/config +++ b/config @@ -2267,7 +2267,7 @@ elif [ "$1" = "-V" ]; then elif [ $NEWCPU = "0" ] sudo sed -i 's/maxcpus=$CPUS//g' echo "Removing maxcpus setting" - elif [ $NEWCPU = "1" ] || [ $NEWCPU = "2" ] || [ $NEWCPU = "3" ] | + elif [ $NEWCPU = "1" ] || [ $NEWCPU = "2" ] || [ $NEWCPU = "3" ] sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' echo "Setting maxcpus="$NEWCPU else From 46d3689f146efca89ffec006a2745ce02bb3a409 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:48:17 -0400 Subject: [PATCH 1662/1744] Update config fix elif --- config | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/config b/config index d60ab92f..c8e30ec5 100755 --- a/config +++ b/config @@ -2241,7 +2241,7 @@ elif [ "$1" = "-V" ]; then if [ -z "$param2" ] ; then - if [ "$param2" = "1" ] || [ "$param2" = "2" ] || [ "$param2" = "3" ] ; then + if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' echo "Setting maxcpus="$param2 @@ -2262,12 +2262,12 @@ elif [ "$1" = "-V" ]; then read NEWCPU - if [ $NEWCPU = "" ] ; then + if [ $NEWCPU == "" ] ; then echo "No change to maxcpus" - elif [ $NEWCPU = "0" ] + elif [ $NEWCPU == "0" ] ; then sudo sed -i 's/maxcpus=$CPUS//g' echo "Removing maxcpus setting" - elif [ $NEWCPU = "1" ] || [ $NEWCPU = "2" ] || [ $NEWCPU = "3" ] + elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' echo "Setting maxcpus="$NEWCPU else From d91ee51251523a6d5cb78aa4a051f8e33ee5bae8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:50:02 -0400 Subject: [PATCH 1663/1744] Update config -V fix param2 --- config | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/config b/config index c8e30ec5..3c7be9a8 100755 --- a/config +++ b/config @@ -2241,20 +2241,7 @@ elif [ "$1" = "-V" ]; then if [ -z "$param2" ] ; then - if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then - - sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' - echo "Setting maxcpus="$param2 - - else - - echo "invalid maxcpus value" - - fi - - else - - echo "Current maxcpus="$CPUs + echo "Current maxcpus="$CPUS echo echo "How many CPUs do you want to set (1-3) ?" echo "Return keeps current value." @@ -2273,6 +2260,21 @@ elif [ "$1" = "-V" ]; then else echo "Invalid maxcpus setting. No change made." fi + + + + fi + + else + + if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then + + sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' + echo "Setting maxcpus="$param2 + + else + + echo "invalid maxcpus value" fi elif [ "$1" = "-h" ]; then From 775c4c381cc7da19ca56436bde75017164ffc7ed Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:51:37 -0400 Subject: [PATCH 1664/1744] Update config move fi --- config | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config b/config index 3c7be9a8..87f4117e 100755 --- a/config +++ b/config @@ -2261,10 +2261,6 @@ elif [ "$1" = "-V" ]; then echo "Invalid maxcpus setting. No change made." fi - - - fi - else if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then @@ -2275,6 +2271,8 @@ elif [ "$1" = "-V" ]; then else echo "invalid maxcpus value" + + fi fi elif [ "$1" = "-h" ]; then From 6ddb9af4e362f11c336e1dfdc1ae8c19fabbbe60 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:53:25 -0400 Subject: [PATCH 1665/1744] Update config add file --- config | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config b/config index 87f4117e..9516220c 100755 --- a/config +++ b/config @@ -2237,7 +2237,9 @@ elif [ "$1" = "-V" ]; then echo "Changing the maxcpus setting" echo - CPUS=$(cat /boot/firmware/cmdline.txt| grep -oP 'maxcpus=\K\d+') + CMDLINE=/boot/firmware/cmdline.txt + + CPUS=$(cat $CMDLINE| grep -oP 'maxcpus=\K\d+') if [ -z "$param2" ] ; then @@ -2255,7 +2257,7 @@ elif [ "$1" = "-V" ]; then sudo sed -i 's/maxcpus=$CPUS//g' echo "Removing maxcpus setting" elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then - sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' + sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' $CMDLINE echo "Setting maxcpus="$NEWCPU else echo "Invalid maxcpus setting. No change made." @@ -2265,7 +2267,7 @@ elif [ "$1" = "-V" ]; then if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then - sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' + sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' $CMDLINE echo "Setting maxcpus="$param2 else From 4fe371ce76969f7a75eaeb8b90f45b51f2863688 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 09:57:04 -0400 Subject: [PATCH 1666/1744] Update config fix sed --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 9516220c..12681907 100755 --- a/config +++ b/config @@ -2257,7 +2257,7 @@ elif [ "$1" = "-V" ]; then sudo sed -i 's/maxcpus=$CPUS//g' echo "Removing maxcpus setting" elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then - sudo sed -i 's/maxcpus=$CPUS/maxcpus=$NEWCPU/g' $CMDLINE + sudo sed -i "s/maxcpus=$CPUS/maxcpus=$NEWCPU/g" $CMDLINE echo "Setting maxcpus="$NEWCPU else echo "Invalid maxcpus setting. No change made." @@ -2267,7 +2267,7 @@ elif [ "$1" = "-V" ]; then if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then - sudo sed -i 's/maxcpus=$CPUS/maxcpus=$param2/g' $CMDLINE + sudo sed -i "s/maxcpus=$CPUS/maxcpus=$param2/g" $CMDLINE echo "Setting maxcpus="$param2 else From 2c8022fe794d9df36ef061ca7ef316ebd38fec08 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 29 Aug 2026 10:00:17 -0400 Subject: [PATCH 1667/1744] Update config fix return --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 12681907..dcf6e657 100755 --- a/config +++ b/config @@ -2251,10 +2251,10 @@ elif [ "$1" = "-V" ]; then read NEWCPU - if [ $NEWCPU == "" ] ; then + if [ -z $NEWCPU ] ; then echo "No change to maxcpus" elif [ $NEWCPU == "0" ] ; then - sudo sed -i 's/maxcpus=$CPUS//g' + sudo sed -i 's/maxcpus=$CPUS//g' $CMDLINE echo "Removing maxcpus setting" elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then sudo sed -i "s/maxcpus=$CPUS/maxcpus=$NEWCPU/g" $CMDLINE From 75db62ece897b6bcfe93b406ca8554f74e06494f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 09:39:21 -0400 Subject: [PATCH 1668/1744] Update config handle no maxcpus setting --- config | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/config b/config index dcf6e657..e29f3405 100755 --- a/config +++ b/config @@ -2239,41 +2239,50 @@ elif [ "$1" = "-V" ]; then CMDLINE=/boot/firmware/cmdline.txt - CPUS=$(cat $CMDLINE| grep -oP 'maxcpus=\K\d+') + CPUVALUE=$(cat $CMDLINE| grep -oP 'maxcpus=\K\d+') if [ -z "$param2" ] ; then - echo "Current maxcpus="$CPUS + if [ -z "$CPUS" ] ; then + echo "No current maxcpus is set" + else + echo "Current maxcpus="$CPUS + fi echo echo "How many CPUs do you want to set (1-3) ?" echo "Return keeps current value." echo "0 removes any maxcpus setting" + NEWCPU="-1" read NEWCPU if [ -z $NEWCPU ] ; then echo "No change to maxcpus" elif [ $NEWCPU == "0" ] ; then - sudo sed -i 's/maxcpus=$CPUS//g' $CMDLINE echo "Removing maxcpus setting" + sudo sed -i "s/maxcpus=$CPUS//g" $CMDLINE elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then - sudo sed -i "s/maxcpus=$CPUS/maxcpus=$NEWCPU/g" $CMDLINE echo "Setting maxcpus="$NEWCPU + if [ -z "$CPUS" ] ; then + sudo sed -i "s/console=tty1 r/console=tty1 maxcpus=$NEWCPU r/g" + else + sudo sed -i "s/maxcpus=$CPUS/maxcpus=$NEWCPU/g" $CMDLINE + fi else echo "Invalid maxcpus setting. No change made." fi else - if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then - - sudo sed -i "s/maxcpus=$CPUS/maxcpus=$param2/g" $CMDLINE + if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then echo "Setting maxcpus="$param2 - + if [ -z "$CPUS" ] ; then + sudo sed -i "s/console=tty1 r/console=tty1 maxcpus=$param2 r/g" + else + sudo sed -i "s/maxcpus=$CPUS/maxcpus=$param2/g" $CMDLINE + fi else - - echo "invalid maxcpus value" - + echo "invalid maxcpus value. No change mode." fi fi From 53156a16f7cf850c10f40f877804eeae0fecee5b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 09:41:01 -0400 Subject: [PATCH 1669/1744] Update config add missing file --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index e29f3405..98c4f22b 100755 --- a/config +++ b/config @@ -2264,7 +2264,7 @@ elif [ "$1" = "-V" ]; then elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then echo "Setting maxcpus="$NEWCPU if [ -z "$CPUS" ] ; then - sudo sed -i "s/console=tty1 r/console=tty1 maxcpus=$NEWCPU r/g" + sudo sed -i "s/console=tty1 r/console=tty1 maxcpus=$NEWCPU r/g" $CMDLINE else sudo sed -i "s/maxcpus=$CPUS/maxcpus=$NEWCPU/g" $CMDLINE fi @@ -2277,7 +2277,7 @@ elif [ "$1" = "-V" ]; then if [ "$param2" == "1" ] || [ "$param2" == "2" ] || [ "$param2" == "3" ] ; then echo "Setting maxcpus="$param2 if [ -z "$CPUS" ] ; then - sudo sed -i "s/console=tty1 r/console=tty1 maxcpus=$param2 r/g" + sudo sed -i "s/console=tty1 r/console=tty1 maxcpus=$param2 r/g" $CMDLINE else sudo sed -i "s/maxcpus=$CPUS/maxcpus=$param2/g" $CMDLINE fi From 40345c7bd2e76cbdddff5636837118408f8dfe11 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 10:37:42 -0400 Subject: [PATCH 1670/1744] Update config fix CPUS --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 98c4f22b..7c0a42c2 100755 --- a/config +++ b/config @@ -2239,7 +2239,7 @@ elif [ "$1" = "-V" ]; then CMDLINE=/boot/firmware/cmdline.txt - CPUVALUE=$(cat $CMDLINE| grep -oP 'maxcpus=\K\d+') + CPUS=$(cat $CMDLINE| grep -oP 'maxcpus=\K\d+') if [ -z "$param2" ] ; then From 155ebf978d27cf36426914bf10a671f51e301983 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 10:39:24 -0400 Subject: [PATCH 1671/1744] Update config remove space when removing maxcpus --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 7c0a42c2..36822f34 100755 --- a/config +++ b/config @@ -2260,7 +2260,7 @@ elif [ "$1" = "-V" ]; then echo "No change to maxcpus" elif [ $NEWCPU == "0" ] ; then echo "Removing maxcpus setting" - sudo sed -i "s/maxcpus=$CPUS//g" $CMDLINE + sudo sed -i "s/maxcpus=$CPUS //g" $CMDLINE elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then echo "Setting maxcpus="$NEWCPU if [ -z "$CPUS" ] ; then From 67c8ff9d1c1f2d1d17759eb1fccab7964062bdbf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 10:43:21 -0400 Subject: [PATCH 1672/1744] Update config remove maxcpus command line --- config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config b/config index 36822f34..e2cfb713 100755 --- a/config +++ b/config @@ -2281,6 +2281,9 @@ elif [ "$1" = "-V" ]; then else sudo sed -i "s/maxcpus=$CPUS/maxcpus=$param2/g" $CMDLINE fi + if [ "$param2" == "0" ] ; then + echo "Removing maxcpus setting" + sudo sed -i "s/maxcpus=$CPUS //g" $CMDLINE else echo "invalid maxcpus value. No change mode." fi From a8b7e3583e0820ae03458757470ffa7636e53416 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 10:44:20 -0400 Subject: [PATCH 1673/1744] Update config fix elif --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index e2cfb713..c5cf2d19 100755 --- a/config +++ b/config @@ -2281,7 +2281,7 @@ elif [ "$1" = "-V" ]; then else sudo sed -i "s/maxcpus=$CPUS/maxcpus=$param2/g" $CMDLINE fi - if [ "$param2" == "0" ] ; then + elif [ "$param2" == "0" ] ; then echo "Removing maxcpus setting" sudo sed -i "s/maxcpus=$CPUS //g" $CMDLINE else From 1ff50a99ea52696028282e41e3516807b131dd20 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 10:52:10 -0400 Subject: [PATCH 1674/1744] Update config.yaml add maxcpus --- OliveTin/config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 23362bf0..871a84ff 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -521,6 +521,15 @@ actions: - name: failure_mode type: ascii_sentence + - title: "Set maxcpus Value" + icon: "⚙" # gear + shell: /home/pi/CubeSatSim/config -V {{ maxcpus_value }} + onclick: execution-dialog + timeout: 10 + arguments: + - name: maxcpus_value + type: ascii_sentence + - title: "Turn Simulated Failure Mode OFF" icon: "❌" # red X shell: /home/pi/CubeSatSim/config -M 0 @@ -598,6 +607,7 @@ dashboards: - title: "Turn Balloon Mode OFF" - title: "Turn gpsd ON" - title: "Turn gpsd OFF" + - title: "Set maxcpus Value" - title: "Show All Commands" - title: "General CubeSatSim Config" From 41452efcf53bcdcae693b4d511742e007e689bf9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 11:08:31 -0400 Subject: [PATCH 1675/1744] Update config added -V reboot needed print --- config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config b/config index c5cf2d19..9d8b79c4 100755 --- a/config +++ b/config @@ -2261,6 +2261,7 @@ elif [ "$1" = "-V" ]; then elif [ $NEWCPU == "0" ] ; then echo "Removing maxcpus setting" sudo sed -i "s/maxcpus=$CPUS //g" $CMDLINE + echo "This change will happen after you reboot" elif [ $NEWCPU == "1" ] || [ $NEWCPU == "2" ] || [ $NEWCPU == "3" ] ; then echo "Setting maxcpus="$NEWCPU if [ -z "$CPUS" ] ; then @@ -2268,6 +2269,7 @@ elif [ "$1" = "-V" ]; then else sudo sed -i "s/maxcpus=$CPUS/maxcpus=$NEWCPU/g" $CMDLINE fi + echo "This change will happen after you reboot" else echo "Invalid maxcpus setting. No change made." fi @@ -2281,9 +2283,11 @@ elif [ "$1" = "-V" ]; then else sudo sed -i "s/maxcpus=$CPUS/maxcpus=$param2/g" $CMDLINE fi + echo "This change will happen after you reboot" elif [ "$param2" == "0" ] ; then echo "Removing maxcpus setting" sudo sed -i "s/maxcpus=$CPUS //g" $CMDLINE + echo "This change will happen after you reboot" else echo "invalid maxcpus value. No change mode." fi From 49866f4692611ccb40e8de1eaa6be0772857d831 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 11:23:09 -0400 Subject: [PATCH 1676/1744] Update config -w Show PiOS boot files --- config | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/config b/config index 9d8b79c4..2e1dab83 100755 --- a/config +++ b/config @@ -2292,6 +2292,32 @@ elif [ "$1" = "-V" ]; then echo "invalid maxcpus value. No change mode." fi fi + +elif [ "$1" = "-w" ]; then + + echo "Showing PiOS Boot Files" + echo + if [[ $(grep 'bullseye' /etc/os-release) ]]; then + echo "Pi OS is Bullseye (Debian 11)" + CMDLINE=/boot/cmdline.txt + CONFIG=/boot/config.txt + elif [[ $(grep 'bookworm' /etc/os-release) ]]; then + echo "Pi OS is Bookworm (Debian 12)" + CMDLINE=/boot/firmware/cmdline.txt + CONFIG=/boot/firmware/config.txt + elif [[ $(grep 'trixie' /etc/os-release) ]]; then + echo "Pi OS is Trixie (Debian 13)" + CMDLINE=/boot/firmware/cmdline.txt + CONFIG=/boot/firmware/config.txt + fi + + echo + echo "cat" $CMDLINE + cat $CMDLINE + echo + echo "cat" $CONFIG + cat $CONFIG + echo elif [ "$1" = "-h" ]; then @@ -2341,6 +2367,7 @@ elif [ "$1" = "-h" ]; then echo " -k Reset the PacSatSim Configuration" echo " -K Change the Doppler frequency shift setting" echo " -V Set the maximum CPUs" + echo " -w Show PiOS boot files" echo exit From 955a9785e779f853fab1e8e41d8aad13e5811f21 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 11:23:36 -0400 Subject: [PATCH 1677/1744] Update config.yaml add PiOS boot files --- OliveTin/config.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 871a84ff..a3ecf73d 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -175,6 +175,13 @@ actions: onclick: execution-dialog timeout: 15 + - title: "Show PiOS Boot Files" + icon: logs + shell: /home/pi/CubeSatSim/config -w + onclick: execution-dialog + timeout: 15 + + - title: "Show Available WiFi Networks" icon: "🛜" # wireless shell: sudo nmcli device wifi rescan && nmcli device wifi list @@ -657,6 +664,7 @@ dashboards: - title: "Show Available WiFi Networks" - title: "Ping a Host or IP address" - title: "See Running Processes" + - title: "Show PiOS Boot Files" - title: "CubeSatSim Directory" # - title: "Signin to Raspberry Pi Connect" # OliveTin needs to run as pi # - title: "Signout of Raspberry Pi Connect" From a4cbd843f0dbd71f26215b65537eaf3c174b7c54 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 11:26:06 -0400 Subject: [PATCH 1678/1744] Update config space after cat --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 2e1dab83..ae9f9d70 100755 --- a/config +++ b/config @@ -2313,9 +2313,11 @@ elif [ "$1" = "-w" ]; then echo echo "cat" $CMDLINE + echo cat $CMDLINE echo echo "cat" $CONFIG + echo cat $CONFIG echo From ceeb73fd3f4cb2ac06c66e8ceeb9f5863ae40c01 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 11:26:52 -0400 Subject: [PATCH 1679/1744] Update config extra space --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index ae9f9d70..aea658f3 100755 --- a/config +++ b/config @@ -2314,6 +2314,7 @@ elif [ "$1" = "-w" ]; then echo echo "cat" $CMDLINE echo + echo cat $CMDLINE echo echo "cat" $CONFIG From fea25f17dd647fb29198bd6ae5d7423289f71340 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 12:54:27 -0400 Subject: [PATCH 1680/1744] Update config -V checks for PiOS version --- config | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/config b/config index aea658f3..be2dbfdc 100755 --- a/config +++ b/config @@ -2237,7 +2237,16 @@ elif [ "$1" = "-V" ]; then echo "Changing the maxcpus setting" echo - CMDLINE=/boot/firmware/cmdline.txt + if [[ $(grep 'bullseye' /etc/os-release) ]]; then + echo "Pi OS is Bullseye (Debian 11)" + CMDLINE=/boot/cmdline.txt + elif [[ $(grep 'bookworm' /etc/os-release) ]]; then + echo "Pi OS is Bookworm (Debian 12)" + CMDLINE=/boot/firmware/cmdline.txt + else [[ $(grep 'trixie' /etc/os-release) ]]; then + echo "Pi OS is Trixie (Debian 13) or later" + CMDLINE=/boot/firmware/cmdline.txt + fi CPUS=$(cat $CMDLINE| grep -oP 'maxcpus=\K\d+') From fd5bf8ada3fbfc6c7957c0577a825be6e14c8f76 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 12:55:25 -0400 Subject: [PATCH 1681/1744] Update config fix else in PiOS check --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index be2dbfdc..431539a5 100755 --- a/config +++ b/config @@ -2243,7 +2243,7 @@ elif [ "$1" = "-V" ]; then elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" CMDLINE=/boot/firmware/cmdline.txt - else [[ $(grep 'trixie' /etc/os-release) ]]; then + else echo "Pi OS is Trixie (Debian 13) or later" CMDLINE=/boot/firmware/cmdline.txt fi From a11b164308b4892eb3b5653dec6b790a73188358 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 1 Sep 2026 14:16:41 -0400 Subject: [PATCH 1682/1744] Update install use config -V to set CPUs to 2 --- install | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/install b/install index 4c735a32..49c8e726 100755 --- a/install +++ b/install @@ -84,10 +84,10 @@ if [[ $(grep 'bullseye' /etc/os-release) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=2 r/g' /boot/cmdline.txt # single core if Pi Zero 2 -# sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt +# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=2 r/g' /boot/cmdline.txt # single core if Pi Zero 2 +## sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/cmdline.txt - sudo sed -i 's/maxcpus=1/maxcpus=2/g' /boot/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/maxcpus=1/maxcpus=2/g' /boot/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/config.txt @@ -225,10 +225,10 @@ if [[ $(grep 'bookworm' /etc/os-release) ]]; then sudo sed -i 's/console=serial0,115200 //g' /boot/firmware/cmdline.txt - sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=2 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 -# sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/firmware/cmdline.txt +# sudo sed -i 's/console=tty1 r/console=tty1 maxcpus=2 r/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 +## sudo sed -i 's/console=tty1 maxcpus=1 r/console=tty1 r/g' /boot/firmware/cmdline.txt - sudo sed -i 's/maxcpus=1/maxcpus=2/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 +# sudo sed -i 's/maxcpus=1/maxcpus=2/g' /boot/firmware/cmdline.txt # single core if Pi Zero 2 sudo sed -i 's/#dtparam=i2c_arm=on/dtparam=i2c_arm=on/g' /boot/firmware/config.txt @@ -352,6 +352,8 @@ elif [[ $(grep 'trixie' /etc/os-release) ]]; then fi fi +/home/pi/CubeSatSim/config -V 2 # set maxcpus to 2 + FILE=/etc/modprobe.d/alsa-base.conf if [ -f "$FILE" ]; then echo "$FILE exists." From 2695b0939c3103bb55af2fd1f4e2e50bd6ef94a1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 13:54:21 -0400 Subject: [PATCH 1683/1744] Update config check USB sound card in config -L command --- config | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config b/config index 431539a5..79f15d3b 100755 --- a/config +++ b/config @@ -1579,6 +1579,21 @@ elif [ "$1" = "-L" ]; then echo "Set microphone level for command and control" echo + USBCARD=$(aplay -l | grep "Device" | grep -oP "card \d" | grep -oP "\d") + echo "USB sound card is card" $USBCARD + + CARD=$(grep -P "card \d" /etc/asound.conf | grep -oP '\d') + echo "asound.conf is card" $CARD + + if [ ! "$USBCARD" == "$CARD" ] ; then + echo "Change card number in /etc/asound.conf" + sudo sed -i "s/card $CARD/card $USBCARD/g" /etc/asound.conf + echo "/etc/asound.conf has been updated to:" + cat /etc/asound.conf + echo "reinitializing alsa" + sudo alsactl init + fi + if [ -z "$param2" ] ; then echo -e "Enter microphone level (integer 0 - 255): " read mic From ce0055531792041586c8b36f2f1c4e1c1c3fd1c4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 13:55:11 -0400 Subject: [PATCH 1684/1744] Update install remove also-base.conf --- install | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/install b/install index 49c8e726..9f6c985c 100755 --- a/install +++ b/install @@ -354,20 +354,20 @@ fi /home/pi/CubeSatSim/config -V 2 # set maxcpus to 2 -FILE=/etc/modprobe.d/alsa-base.conf -if [ -f "$FILE" ]; then - echo "$FILE exists." - if [[ $(grep "options snd-usb-audio index=2" $FILE) ]]; then - echo "options snd-usb-audio index=2 already in $FILE"; - else - echo "adding options snd-usb-audio index=2 to $FILE"; - sudo sed -i '$a options snd-usb-audio index=2' $FILE - echo "options snd-usb-audio index=2" | sudo tee -a $FILE # > /dev/null - fi -else - echo "creating $FILE" - echo "options snd-usb-audio index=2" | sudo tee $FILE # > /dev/null -fi +# FILE=/etc/modprobe.d/alsa-base.conf +# if [ -f "$FILE" ]; then +# echo "$FILE exists." +# if [[ $(grep "options snd-usb-audio index=2" $FILE) ]]; then +# echo "options snd-usb-audio index=2 already in $FILE"; +# else +# echo "adding options snd-usb-audio index=2 to $FILE"; +# sudo sed -i '$a options snd-usb-audio index=2' $FILE +# echo "options snd-usb-audio index=2" | sudo tee -a $FILE # > /dev/null +# fi +# else +# echo "creating $FILE" +# echo "options snd-usb-audio index=2" | sudo tee $FILE # > /dev/null +# fi FILE=/home/pi/CubeSatSim/sim.cfg if [ -f "$FILE" ]; then From aa375badfd613ccd6f0203f2b3f560446448b9b3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 16:27:08 -0400 Subject: [PATCH 1685/1744] Update config change amixer to sset --- config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config b/config index 79f15d3b..41015b79 100755 --- a/config +++ b/config @@ -1604,7 +1604,9 @@ elif [ "$1" = "-L" ]; then if ! [ -z $mic ] && [[ $mic =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then systemctl --user stop wireplumber echo "Updating mic level to" $mic "%" - value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic +# value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic + value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} sset MicVolume $mic + systemctl --user start wireplumber else echo "Not updating mic level" From ac694316d0727acdd49bcf05e0338ec0087ae72d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 16:29:06 -0400 Subject: [PATCH 1686/1744] Update config add quotes amixer --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 41015b79..4f2bca51 100755 --- a/config +++ b/config @@ -1605,7 +1605,7 @@ elif [ "$1" = "-L" ]; then systemctl --user stop wireplumber echo "Updating mic level to" $mic "%" # value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic - value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} sset MicVolume $mic + value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} sset 'MicVolume' $mic systemctl --user start wireplumber else From b8e95e8f3c08dcbfe73ddb71719fda225f467a4b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 16:31:42 -0400 Subject: [PATCH 1687/1744] Update config change amixer to $USBCARD --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 4f2bca51..71f4b122 100755 --- a/config +++ b/config @@ -1605,7 +1605,7 @@ elif [ "$1" = "-L" ]; then systemctl --user stop wireplumber echo "Updating mic level to" $mic "%" # value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic - value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} sset 'MicVolume' $mic + value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c $USBCARD sset 'MicVolume' $mic systemctl --user start wireplumber else From 5469dc1dd46e5f33f9a563fc42fb0854f3376ad4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 16:44:24 -0400 Subject: [PATCH 1688/1744] Update pacsatsim.sh change to config -L --- pacsatsim.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 7eb15337..0e8a0248 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -41,9 +41,8 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 - systemctl --user stop wireplumber - amixer -c 2 set MicVolume 200 - systemctl --user start wireplumber + /home/pi/CubeSatSim/config -L 200 + else echo "No USB Sound Card detected" soundcard=0 From 9a4dd6314fd531296d4f811616a2f7d2839cbb9b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 16:48:41 -0400 Subject: [PATCH 1689/1744] Update pacsat.sh change to config -L --- groundstation/pacsat.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 1e937470..88809c4e 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -46,9 +46,7 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 - systemctl --user stop wireplumber - amixer -c 2 set MicVolume 200 - systemctl --user start wireplumber + /home/pi/CubeSatSim/config -L 200 else echo "No USB Sound Card detected" soundcard=0 From 9378de5bc11ac41d0067075d3dcea4fe427d79b2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 3 Sep 2026 16:50:04 -0400 Subject: [PATCH 1690/1744] Update command add config -L --- command | 1 + 1 file changed, 1 insertion(+) diff --git a/command b/command index 27988bb4..a9443b52 100755 --- a/command +++ b/command @@ -61,6 +61,7 @@ FILE=/home/pi/CubeSatSim/command_control_direwolf if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "Starting Direwolf DTMF and APRS Command and Control" + /home/pi/CubeSatSim/config -L 200 if [ "$debug" = "1" ]; then From b14428999a52da16ec98d9d871c1c919a6699482 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 4 Sep 2026 16:19:55 -0400 Subject: [PATCH 1691/1744] Update config modify so card can be one or two digits long --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index 71f4b122..f3691354 100755 --- a/config +++ b/config @@ -1579,10 +1579,10 @@ elif [ "$1" = "-L" ]; then echo "Set microphone level for command and control" echo - USBCARD=$(aplay -l | grep "Device" | grep -oP "card \d" | grep -oP "\d") + USBCARD=$(aplay -l | grep "Device" | grep -oP '(?<=card )\d{1,2}') echo "USB sound card is card" $USBCARD - CARD=$(grep -P "card \d" /etc/asound.conf | grep -oP '\d') + CARD=$(grep -oP '(?<=card )\d{1,2}' /etc/asound.conf) echo "asound.conf is card" $CARD if [ ! "$USBCARD" == "$CARD" ] ; then From 09a6a98e7613234364c5e907f23b883ecd46268e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 4 Sep 2026 16:27:09 -0400 Subject: [PATCH 1692/1744] Update command v2.3 --- command | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/command b/command index a9443b52..7d5f98b0 100755 --- a/command +++ b/command @@ -1,6 +1,6 @@ #!/bin/bash -echo -e "\nCommand and Control script for CubeSatSim v2.2\n" +echo -e "\nCommand and Control script for CubeSatSim v2.3\n" sudo modprobe snd-aloop From 717d484c747ea678653ef2e796a79bf027bdc98d Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 4 Sep 2026 16:27:45 -0400 Subject: [PATCH 1693/1744] Update .gitignore add freq.txt --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index e2217fcd..31176c3b 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ direwolf-pacsatsim-tmp.conf groundstation/direwolf-pacsat-tmp.conf tlm.bin frequency.txt +freq.txt logb.txt logo.txt logp.txt From 0a573d63a937428260eff61b40cc29b9478ad043 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 4 Sep 2026 16:37:59 -0400 Subject: [PATCH 1694/1744] Update config handle more than one USB sound card --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index f3691354..de12729f 100755 --- a/config +++ b/config @@ -1579,7 +1579,8 @@ elif [ "$1" = "-L" ]; then echo "Set microphone level for command and control" echo - USBCARD=$(aplay -l | grep "Device" | grep -oP '(?<=card )\d{1,2}') + CARDUSB=$(aplay -l | grep "Device" | grep -oP '(?<=card )\d{1,2}') + USBCARD=${CARDUSB:0:1} echo "USB sound card is card" $USBCARD CARD=$(grep -oP '(?<=card )\d{1,2}' /etc/asound.conf) From 8cd518051fdb0ae71dbd137a842a54ae24481423 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 4 Sep 2026 16:40:04 -0400 Subject: [PATCH 1695/1744] Update config don't start and stop wireplumber --- config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config b/config index de12729f..2b853e36 100755 --- a/config +++ b/config @@ -1603,12 +1603,12 @@ elif [ "$1" = "-L" ]; then fi if ! [ -z $mic ] && [[ $mic =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then - systemctl --user stop wireplumber +# systemctl --user stop wireplumber echo "Updating mic level to" $mic "%" # value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c $USBCARD sset 'MicVolume' $mic - systemctl --user start wireplumber +# systemctl --user start wireplumber else echo "Not updating mic level" fi From dd6612f88a2e6361e06bdb5d8364ba3c49a086f8 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 4 Sep 2026 16:59:12 -0400 Subject: [PATCH 1696/1744] Update config handle no USB sound caard --- config | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/config b/config index 2b853e36..e8f1d5c1 100755 --- a/config +++ b/config @@ -1581,18 +1581,22 @@ elif [ "$1" = "-L" ]; then CARDUSB=$(aplay -l | grep "Device" | grep -oP '(?<=card )\d{1,2}') USBCARD=${CARDUSB:0:1} - echo "USB sound card is card" $USBCARD CARD=$(grep -oP '(?<=card )\d{1,2}' /etc/asound.conf) - echo "asound.conf is card" $CARD - - if [ ! "$USBCARD" == "$CARD" ] ; then - echo "Change card number in /etc/asound.conf" - sudo sed -i "s/card $CARD/card $USBCARD/g" /etc/asound.conf - echo "/etc/asound.conf has been updated to:" - cat /etc/asound.conf - echo "reinitializing alsa" - sudo alsactl init + + if [ -z $USBCARD ] ; then + echo "No USB sound card detected" + else + echo "USB sound card is card" $USBCARD + echo "asound.conf is card" $CARD + if [ ! "$USBCARD" == "$CARD" ] ; then + echo "Change card number in /etc/asound.conf" + sudo sed -i "s/card $CARD/card $USBCARD/g" /etc/asound.conf + echo "/etc/asound.conf has been updated to:" + cat /etc/asound.conf + echo "reinitializing alsa" + sudo alsactl init + fi fi if [ -z "$param2" ] ; then From f0d3b7458c466a84c3c5a74d83f83519a5aa90bc Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 06:35:44 -0400 Subject: [PATCH 1697/1744] Update command remove config -L --- command | 1 - 1 file changed, 1 deletion(-) diff --git a/command b/command index 7d5f98b0..1790ceda 100755 --- a/command +++ b/command @@ -61,7 +61,6 @@ FILE=/home/pi/CubeSatSim/command_control_direwolf if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then echo "Starting Direwolf DTMF and APRS Command and Control" - /home/pi/CubeSatSim/config -L 200 if [ "$debug" = "1" ]; then From bce2f82d2ccba9946952f3f9d406a11490d9db57 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 06:36:43 -0400 Subject: [PATCH 1698/1744] Update pacsatsim.sh remove config -L --- pacsatsim.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 0e8a0248..e7e5d679 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -41,8 +41,6 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 - /home/pi/CubeSatSim/config -L 200 - else echo "No USB Sound Card detected" soundcard=0 From 2ca02a58fdebc12415f546a528c1af601a43f969 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 06:37:26 -0400 Subject: [PATCH 1699/1744] Update pacsat.sh remove config -L --- groundstation/pacsat.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 88809c4e..40fbc67c 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -46,7 +46,6 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 - /home/pi/CubeSatSim/config -L 200 else echo "No USB Sound Card detected" soundcard=0 From 9c91d07588464b8159394ed7af0eb88b65edfa14 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 06:38:49 -0400 Subject: [PATCH 1700/1744] Update install add config -L 75% --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index 9f6c985c..dfeeff29 100755 --- a/install +++ b/install @@ -869,6 +869,8 @@ else FLAG=1 fi +/home/pi/CubeSatSim/config -L 75 + FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg if [ ! -f "$FILE" ]; then echo "Copying SSTV image 1." From d9c246add7d4b589d515e93ee474cd42d4d0d75e Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 06:42:10 -0400 Subject: [PATCH 1701/1744] Update config -L to % and reset to 75% with -g --- config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/config b/config index e8f1d5c1..8d48a33c 100755 --- a/config +++ b/config @@ -1600,7 +1600,7 @@ elif [ "$1" = "-L" ]; then fi if [ -z "$param2" ] ; then - echo -e "Enter microphone level (integer 0 - 255): " + echo -e "Enter microphone level (percent 0 - 100): " read mic else mic="$param2" @@ -1610,7 +1610,7 @@ elif [ "$1" = "-L" ]; then # systemctl --user stop wireplumber echo "Updating mic level to" $mic "%" # value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic - value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c $USBCARD sset 'MicVolume' $mic + value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c $USBCARD sset 'MicVolume' $mic% # systemctl --user start wireplumber else @@ -1637,6 +1637,8 @@ elif [ "$1" = "-g" ]; then sudo systemctl stop pushbutton sudo systemctl stop OliveTin + /home/pi/CubeSatSim/config -L 75 + echo "AMSAT 0 0 0 no 3 434.9 435 no 0 0 no 60 no" > /home/pi/CubeSatSim/sim.cfg echo "434900000 435000000" > /home/pi/CubeSatSim/frequency.txt From 0c6a094b015c9be59f4f8a541cb46a3815780ebe Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:14:36 -0400 Subject: [PATCH 1702/1744] Update config lots of small changes --- config | 72 ++++++++++++++++++++++++---------------------------------- 1 file changed, 30 insertions(+), 42 deletions(-) diff --git a/config b/config index 8d48a33c..b8999f4f 100755 --- a/config +++ b/config @@ -290,7 +290,7 @@ TXPL=${11} # echo ${14} if [[ ( "${14}" == "sim" || "${14}" == "rig" ) && ( "$MODE" == "f" || "$MODE" == "b" || "$MODE" == "j" || "$MODE" == "G") ]] ; then - echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, PacSat, and Repeater modes)" + echo "Doppler frequency shift is ON but not active in this mode (only APRS, CW, SSTV, Pacsat, and Repeater modes)" echo -n "TX Frequency is approximately: " echo -n ${7} echo -n " MHz, RX Frequency is: " @@ -306,7 +306,7 @@ TXPL=${11} # echo -n ${8} # echo " MHz" elif [ "${14}" = "rig" ] ; then - echo "rigctld Doppler frequency shift enabled" + echo "Radio Control Doppler frequency shift enabled" echo -n "Current TX Frequency (Hz) is: " head -n 1 /home/pi/CubeSatSim/frequency.txt | cut -d ' ' -f 1 echo -n "Current RX Frequency (Hz) is: " @@ -345,7 +345,7 @@ TXPL=${11} # echo $MODE if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then - echo "Squelch is off since PacSat or PacSat Ground Station mode" + echo "Squelch is off since Pacsat or Pacsat Ground Station mode" else echo -n "Squelch level is: " echo $SQUELCH @@ -361,14 +361,14 @@ TXPL=${11} echo "Radio DTMF/APRS command and control is ON" else if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then - echo "Radio carrier command and control is off since PacSat or PacSat Ground Station mode" + echo "Radio carrier command and control is off since Pacsat or Pacsat Ground Station mode" else echo "Radio carrier command and control is ON" fi fi else if [ "$MODE" = "p" ] || [ "$MODE" = "P" ] ; then - echo "Radio carrier command and control is off since PacSat or PacSat Ground Station mode" + echo "Radio carrier command and control is off since Pacsat or Pacsat Ground Station mode" else echo "Radio carrier command and control is ON" fi @@ -568,7 +568,6 @@ elif [ "$1" = "-s" ]; then elif [ "$1" = "-t" ]; then - echo echo "Setting the Simulated Telemetry setting" echo @@ -615,7 +614,6 @@ elif [ "$1" = "-t" ]; then elif [ "$1" = "-c" ]; then - echo echo "Setting the CALLSIGN" echo @@ -657,7 +655,6 @@ elif [ "$1" = "-c" ]; then elif [ "$1" = "-r" ]; then - echo echo "Set the Reset Count for FoxTelem" echo # echo -e "Current sim.cfg configuration file:" @@ -708,7 +705,6 @@ elif [ "$1" = "-r" ]; then elif [ "$1" = "-l" ]; then - echo echo "Editing latitude and longitude in the" echo "configuration file for CubeSatSim" echo "(Only used for APRS telemetry)" @@ -793,7 +789,6 @@ elif [ "$1" = "-l" ]; then elif [ "$1" = "-S" ]; then - echo echo "Scan both I2C buses on the Raspberry Pi" echo @@ -808,7 +803,6 @@ elif [ "$1" = "-S" ]; then elif [ "$1" = "-C" ]; then - echo echo "Clear logs" echo @@ -921,7 +915,6 @@ elif [ "$1" = "-T" ]; then elif [ "$1" = "-d" ]; then - echo echo "Change command and control Direwolf state" echo if [[ $(arecord -l | grep card) ]]; then @@ -1000,7 +993,6 @@ elif [ "$1" = "-d" ]; then elif [ "$1" = "-D" ]; then - echo echo "Change Transmit Commands state" echo @@ -1032,7 +1024,6 @@ elif [ "$1" = "-D" ]; then elif [ "$1" = "-R" ]; then - echo echo "Reset the Commands Count in the file command_count.txt" echo @@ -1059,7 +1050,6 @@ elif [ "$1" = "-R" ]; then elif [ "$1" = "-B" ]; then - echo echo "Manually setting Safe Mode (battery saver mode)" echo @@ -1122,7 +1112,6 @@ elif [ "$1" = "-B" ]; then elif [ "$1" = "-q" ]; then - echo echo "Setting the Squelch setting" echo @@ -1171,16 +1160,14 @@ elif [ "$1" = "-q" ]; then elif [ "$1" = "-Q" ]; then -# echo echo "Reading current Squelch for 10 seconds" - echo "Squelch is active low (0 means squelch broken)" + echo "Squelch is active low (0 means squelch broken, received a signal)" echo timeout 10 bash -c -- 'while true; do (gpio read 22 && sleep 1); done' elif [ "$1" = "-P" ]; then - echo echo "Setting the PL (Private Line) CTCSS/CDCSS setting" echo @@ -1274,8 +1261,7 @@ elif [ "$1" = "-P" ]; then elif [ "$1" = "-F" ]; then - echo - echo "Editing the RX and RX frequency" + echo "Editing the TX and RX frequency" echo value=`cat /home/pi/CubeSatSim/sim.cfg` @@ -1286,8 +1272,6 @@ elif [ "$1" = "-F" ]; then echo "Current value of TX frequency is" $7 "MHz" echo - echo "Current value of RX frequency is" $8 "MHz" - echo # echo $1 $2 $3 $4 $5 $6 $7 $8 $9 ${10} ${11} ${12} ${13} ${14} @@ -1301,7 +1285,9 @@ elif [ "$1" = "-F" ]; then tx="$7" echo "Keeping value of" $tx "MHz" fi - + echo + echo "Current value of RX frequency is" $8 "MHz" + echo echo "Enter RX frequency in MHz (70cm band only): " read rx @@ -1385,7 +1371,6 @@ elif [ "$1" = "-o" ]; then elif [ "$1" = "-H" ]; then -# echo echo "Setting Balloon mode" echo @@ -1489,7 +1474,7 @@ elif [ "$1" = "-n" ]; then sudo echo $new > /home/pi/CubeSatSim/.mode restart=1 elif [ "$1" = "p" ] || [ "$1" = "P" ] ; then - echo "Switching to PacSat mode" + echo "Switching to Pacsat mode" sudo echo $new > /home/pi/CubeSatSim/.mode reboot=1 else @@ -1553,7 +1538,7 @@ elif [ "$1" = "-A" ]; then while [ "$MODE" != "x" ]; do - echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, p=PacSat, o=Beacon on/off x=Exit this mode" + echo "Enter the mode to change: a=APRS, f=FSK, b=BPSK, s=SSTV, m=CW, e=Repeater, j=FUNcube, p=Pacsat, o=Beacon on/off x=Exit this mode" read MODE if [ "$MODE" != "x" ]; then @@ -1575,8 +1560,7 @@ elif [ "$1" = "-A" ]; then elif [ "$1" = "-L" ]; then - echo - echo "Set microphone level for command and control" + echo "Set microphone level for command and control and Pacsat" echo CARDUSB=$(aplay -l | grep "Device" | grep -oP '(?<=card )\d{1,2}') @@ -1901,6 +1885,14 @@ elif [ "$1" = "-N" ]; then echo "Current mode is FUNcube" echo "Next mode is Repeater" /home/pi/CubeSatSim/config -e + elif [ "$1" = "e" ]; then + echo "Current mode is Repeater" + echo "Next mode is Pacsat" + /home/pi/CubeSatSim/config -G + elif [ "$1" = "p" ]; then + echo "Current mode is Pacsat" + echo "Next mode is APRS" + /home/pi/CubeSatSim/config -a else echo "Unknown mode" fi @@ -1918,7 +1910,6 @@ elif [ "$1" = "-N" ]; then elif [ "$1" = "-U" ]; then - echo echo "Changing the Random Simulated Failure setting" echo @@ -2109,7 +2100,7 @@ elif [ "$1" = "-u" ]; then elif [ "$1" = "-G" ]; then - echo "Changing to PacSatSim mode" + echo "Changing to Pacsat mode" value=`cat /home/pi/CubeSatSim/.mode` echo "$value" > /dev/null set -- $value @@ -2139,7 +2130,7 @@ elif [ "$1" = "-G" ]; then elif [ "$1" = "-I" ]; then - echo "Changing to PacSat Ground Station mode" + echo "Changing to Pacsat Ground Station mode" echo echo "Run the Pacsat Ground Station in the Desktop" value=`cat /home/pi/CubeSatSim/.mode` @@ -2171,8 +2162,7 @@ elif [ "$1" = "-I" ]; then elif [ "$1" = "-k" ]; then - echo - echo "Reset PacSatSim configuration" + echo "Reset Pacsat configuration" echo sudo systemctl stop pacsatsim &>/dev/null sudo rm -r /home/pi/PacSat @@ -2181,7 +2171,6 @@ elif [ "$1" = "-k" ]; then elif [ "$1" = "-K" ]; then - echo echo "Setting the Doppler frequency shift mode setting" echo @@ -2196,7 +2185,7 @@ elif [ "$1" = "-K" ]; then if [ "${14}" = "sim" ] ; then echo "Simulated Doppler frequency shift mode enabled" elif [ "${14}" = "rig" ] ; then - echo "rigctld Doppler frequency shift mode enabled" + echo "Radio Control Doppler frequency shift mode enabled" else echo "Doppler frequency shift is OFF" fi @@ -2211,13 +2200,13 @@ elif [ "$1" = "-K" ]; then if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then doppler="yes" - echo "Do you want simulated Doppler shift or rigctld Doppler (sim/rig)" + echo "Do you want Simulated Doppler shift or Radio Control Doppler (sim/rig)" read doppler if [ "$doppler" = "sim" ] ; then echo "Simulated Doppler frequency shift mode enabled" elif [ "$doppler" = "rig" ] ; then - echo "rigctld Doppler frequency shift mode enabled" + echo "Radio Control Doppler frequency shift mode enabled" else doppler="no" echo "sim or rig not entered. Doppler frequency shift is OFF" @@ -2257,7 +2246,6 @@ elif [ "$1" = "-K" ]; then elif [ "$1" = "-V" ]; then - echo echo "Changing the maxcpus setting" echo @@ -2371,8 +2359,8 @@ elif [ "$1" = "-h" ]; then echo " -n Change to Transmit Commands mode" echo " -e Change to Repeater mode" echo " -j Change to FUNcube mode" - echo " -G Change to PacSatSim mode" - echo " -I Change to PacSat Ground Station mode" + echo " -G Change to Pacsat mode" + echo " -I Change to Pacsat Ground Station mode" echo " -i Restart CubeSatsim software" echo " -c Change the CALLSIGN in the configuration file sim.cfg" echo " -t Change the Simulated Telemetry setting in sim.cfg" @@ -2400,7 +2388,7 @@ elif [ "$1" = "-h" ]; then echo " -U Change the random failure mode setting" echo " -N Set next mode or failure" echo " -u Change gpsd state" - echo " -k Reset the PacSatSim Configuration" + echo " -k Reset the Pacsat Configuration" echo " -K Change the Doppler frequency shift setting" echo " -V Set the maximum CPUs" echo " -w Show PiOS boot files" From a1a17e759df9621dd22ea2271d8aee59e7212751 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:25:24 -0400 Subject: [PATCH 1703/1744] Update transmit.py update increment_mode --- transmit.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index b7c63f83..08eb1579 100644 --- a/transmit.py +++ b/transmit.py @@ -139,21 +139,30 @@ def increment_mode(): mode = 'f' blink(2) sleep(2.5) - elif (mode == 'f'): mode = 'b' blink(3) - sleep(2.5) - + sleep(2.5) elif (mode == 'b'): mode = 's' blink(4) sleep(2.5) - elif (mode == 's'): mode = 'm' blink(5) sleep(2.5) + elif (mode == 'm'): + mode = 'e' + blink(6) + sleep(2.5) + elif (mode == 'e'): + mode = 'j' + blink(7) + sleep(2.5) + elif (mode == 'j'): + mode = 'p' + blink(8) + sleep(2.5) else: mode = 'a' blink(1) From 7b99c511565dcfc84569229365e28b70066627d6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:30:03 -0400 Subject: [PATCH 1704/1744] Update config print MicVolume level --- config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config b/config index b8999f4f..39b8eba1 100755 --- a/config +++ b/config @@ -1583,8 +1583,12 @@ elif [ "$1" = "-L" ]; then fi fi + echo "Current MicVolume setting is:" + value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c $USBCARD sget 'MicVolume' + echo + if [ -z "$param2" ] ; then - echo -e "Enter microphone level (percent 0 - 100): " + echo -e "Enter MicVolume level (percent 0 - 100): " read mic else mic="$param2" From 8fae58b4f05abfa2ed0e0efc82b3bdf4b295f119 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:40:01 -0400 Subject: [PATCH 1705/1744] Update config -L -1 just reads MicVolume --- config | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/config b/config index 39b8eba1..4250d891 100755 --- a/config +++ b/config @@ -1594,13 +1594,9 @@ elif [ "$1" = "-L" ]; then mic="$param2" fi - if ! [ -z $mic ] && [[ $mic =~ ^[+-]?[0-9]+([.][0-9]+)?$ ]] ; then -# systemctl --user stop wireplumber + if ! [ -z $mic ] && [[ $mic =~ ^[+]?[0-9]+([.][0-9]+)?$ ]] ; then echo "Updating mic level to" $mic "%" -# value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c ${2:0:1} set MicVolume $mic value=`arecord -l | grep "card"` && echo "$value" > /dev/null && set -- $value && amixer -c $USBCARD sset 'MicVolume' $mic% - -# systemctl --user start wireplumber else echo "Not updating mic level" fi From c5b6cc651ee69778c2a94cb90ec5bc90e2550951 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:40:52 -0400 Subject: [PATCH 1706/1744] Update command print MicVolume --- command | 2 ++ 1 file changed, 2 insertions(+) diff --git a/command b/command index 1790ceda..b6e53239 100755 --- a/command +++ b/command @@ -60,6 +60,8 @@ fi FILE=/home/pi/CubeSatSim/command_control_direwolf if [[ $(arecord -l | grep "USB Audio Device") ]] && [ -f "$FILE" ]; then + /home/pi/CubeSatSim/config -L -1 + echo "Starting Direwolf DTMF and APRS Command and Control" if [ "$debug" = "1" ]; then From c431545c1131ca42c15491e68baac103b8645ae6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:41:38 -0400 Subject: [PATCH 1707/1744] Update pacsatsim.sh print MicVolume --- pacsatsim.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index e7e5d679..896e8071 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -41,6 +41,7 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 + /home/pi/CubeSatSim/config -L -1 else echo "No USB Sound Card detected" soundcard=0 From fc10de669af1f510d28412307e7542d45c3f40ad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:42:28 -0400 Subject: [PATCH 1708/1744] Update pacsat.sh print MicVolume --- groundstation/pacsat.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 40fbc67c..5db3806e 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -46,6 +46,7 @@ fi if [[ $(arecord -l | grep "USB Audio Device") ]] ; then echo "USB Sound Card detected" soundcard=1 + /home/pi/CubeSatSim/config -L -1 else echo "No USB Sound Card detected" soundcard=0 From 777951d3b848dc501d88c065dd282b53c28ecf48 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 07:45:52 -0400 Subject: [PATCH 1709/1744] Update config -L print MicVolume --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index 4250d891..8ca8ad7f 100755 --- a/config +++ b/config @@ -1560,7 +1560,7 @@ elif [ "$1" = "-A" ]; then elif [ "$1" = "-L" ]; then - echo "Set microphone level for command and control and Pacsat" + echo "MicVolume level for Command and Control and Pacsat" echo CARDUSB=$(aplay -l | grep "Device" | grep -oP '(?<=card )\d{1,2}') From 1e997ce6fada6c171597a4f09119496f5c4d11e1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 10:11:14 -0400 Subject: [PATCH 1710/1744] Update config sim/rig --- config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config b/config index 8ca8ad7f..c00969d6 100755 --- a/config +++ b/config @@ -2200,7 +2200,8 @@ elif [ "$1" = "-K" ]; then if [ "$sim" = "y" ] || [ "$sim" = "yes" ] ; then doppler="yes" - echo "Do you want Simulated Doppler shift or Radio Control Doppler (sim/rig)" + echo "Do you want Simulated Doppler shift (sim) or Radio Control Doppler (rig)" + echo "Enter sim or rig" read doppler if [ "$doppler" = "sim" ] ; then From d137c699ffa41d6f6781803beb40b77dba6012e4 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 10:37:00 -0400 Subject: [PATCH 1711/1744] Update pacsat-config.sh Pacsat --- groundstation/pacsat-config.sh | 36 ++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/groundstation/pacsat-config.sh b/groundstation/pacsat-config.sh index 17216dfd..a7d02549 100755 --- a/groundstation/pacsat-config.sh +++ b/groundstation/pacsat-config.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to run FoxTelem -echo "Script to configure the PacSat Ground Station for FIAB v4" +echo "Script to configure the Pacsat Ground Station for FIAB v4" echo @@ -16,18 +16,18 @@ sudo killall -9 direwolf &>/dev/null #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then -# profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title="PacSat Ground Station Choice" --column="Choice" --column="Result" "PacSat" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") +# profile=$(zenity --text="Choice:" --list 2>/dev/null --width=410 --height=120 --title=" Ground Station Choice" --column="Choice" --column="Result" "" "Receive from CubeSatSim PacSatSim" "Configure" "Configure PacSat Ground Station" "Loopback" "Run a Locally Simulated PacSat") # echo $profile - echo "Here are the PacSat configuration choices:" + echo "Here are the configuration choices:" echo - echo " 1. PacSat Ground Station Configuration" + echo " 1. Pacsat Ground Station Configuration" echo - echo " 2. PacSat Ground Station Simulation Configuration" + echo " 2. Pacsat Ground Station Simulation Configuration" echo echo " 3. Set Frequencies" echo - echo " 4. Reset PacSat Satellite" + echo " 4. Reset Pacsat Satellite" echo echo "Which do you choose? Enter 1 - 4" echo @@ -47,16 +47,16 @@ sudo killall -9 direwolf &>/dev/null if [ "$ANS" = "1" ] || [ "$ANS" = "2" ] ; then if [ "$ANS" = "1" ] ; then - echo "Here are your PacSat Ground Station Configuration choices:" + echo "Here are your Pacsat Ground Station Configuration choices:" else - echo "Here are your PacSat Ground Station Simulation Configuration choices:" + echo "Here are your Pacsat Ground Station Simulation Configuration choices:" fi echo - echo " 1. PacSat Ground Station Callsign" + echo " 1. Pacsat Ground Station Callsign" echo - echo " 2. Set Remote PacSat Satellite Callsign in Ground Station configuration" + echo " 2. Set Remote Pacsat Satellite Callsign in Ground Station configuration" echo - echo " 3. Reset PacSat Ground Station Configuration" + echo " 3. Reset Pacsat Ground Station Configuration" echo read -r CH @@ -112,7 +112,7 @@ sudo killall -9 direwolf &>/dev/null elif [ "$CH" = "2" ] ; then - echo "You have chosen to set the remote CubeSatSim PacSat Satellite callsign in ground station configuration" + echo "You have chosen to set the remote CubeSatSim Pacsat Satellite callsign in ground station configuration" echo PROPERTIES=/home/pi/PacSatGround/spacecraft/PacSatSim.properties @@ -123,7 +123,7 @@ sudo killall -9 direwolf &>/dev/null else oldcallsign=$(grep -oP '(?<=bbsCallsign=).*(?=-)' $PROPERTIES_L ) fi - echo "Current value of remote PacSat callsign is" + echo "Current value of remote Pacsat callsign is" echo $oldcallsign echo @@ -146,13 +146,13 @@ sudo killall -9 direwolf &>/dev/null echo "Changing callsign to " echo $callsign echo - echo "You will see the change next time you run the PacSat Ground Station" + echo "You will see the change next time you run the Pacsat Ground Station" echo "You can close this window" fi elif [ "$CH" = "3" ] ; then - echo "You have chosen to reset the PacSat Ground Station Configuration" + echo "You have chosen to reset the Pacsat Ground Station Configuration" echo # echo "Next time you run the Ground Station you will need to Add the PacSatSim spacecraft" # echo @@ -182,14 +182,16 @@ sudo killall -9 direwolf &>/dev/null elif [ "$ANS" = "3" ] ; then - echo "You have chosen to set the Frequency of the PacSat Ground Station" + echo "You have chosen to set the Frequency of the Pacsat Ground Station" echo /home/pi/CubeSatSim/config -F + echo "You can close this window now" + elif [ "$ANS" = "4" ] ; then - echo "You have chosen to reset the PacSat Satellite" + echo "You have chosen to reset the Pacsat Satellite" echo /home/pi/CubeSatSim/config -k From 919108f685b8629616b3609987de934007cb7ded Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 10:38:20 -0400 Subject: [PATCH 1712/1744] Update pacsat-run.sh Pacsat --- groundstation/pacsat-run.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/groundstation/pacsat-run.sh b/groundstation/pacsat-run.sh index 2c71944f..ca791022 100755 --- a/groundstation/pacsat-run.sh +++ b/groundstation/pacsat-run.sh @@ -1,7 +1,7 @@ #!/bin/bash # script to run FoxTelem -echo "Startup script to run the PacSat Ground Station for FIAB v4" +echo "Startup script to run the Pacsat Ground Station" echo @@ -35,21 +35,21 @@ fi #FILE=/home/pi/.pacsatprofile #if [ ! -f "$FILE" ]; then - profile=$(zenity --timeout=10 --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=220 --title="PacSat Ground Station" --column="Choice" --column="Result" "PacSat" "Run PacSat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated PacSat") + profile=$(zenity --timeout=10 --text="Choose what you want to do:" --list 2>/dev/null --width=410 --height=220 --title="Pacsat Ground Station" --column="Choice" --column="Result" "Pacsat" "Run Pacsat Ground Station" "Configure" "Configure the Pacsat Ground Station" "Simulate" "Run a Locally Simulated Pacsat") echo $profile if [ -z "$profile" ]; then - echo "No choice made. Default to PacSat Ground Station." + echo "No choice made. Default to Pacsat Ground Station." - profile="PacSat" + profile="Pacsat" fi - if [ "$ANS" = "1" ] || [ "$profile" = "PacSat" ] ; then + if [ "$ANS" = "1" ] || [ "$profile" = "Pacsat" ] ; then - echo "You have chosen to run the PacSat Ground Station" + echo "You have chosen to run the Pacsat Ground Station" # echo "p" > /home/pi/.pacsatprofile echo @@ -58,7 +58,7 @@ fi elif [ "$ANS" = "2" ] || [ "$profile" = "Configure" ] ; then - echo "You have chosen to configure the PacSat Ground Station" + echo "You have chosen to configure the Pacsat Ground Station" echo /home/pi/CubeSatSim/groundstation/pacsat-config.sh @@ -67,7 +67,7 @@ fi sudo systemctl stop transmit - echo "You have chosen the PacSat Ground Station with Local Simulated Satellite" + echo "You have chosen the Pacsat Ground Station with Local Simulated Satellite" sleep 1 From 5af192cf41378c52e985f59073b1b965dad5c79a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 5 Sep 2026 10:41:39 -0400 Subject: [PATCH 1713/1744] Update pacsat.sh Pacsat --- groundstation/pacsat.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/groundstation/pacsat.sh b/groundstation/pacsat.sh index 5db3806e..0a1e64da 100755 --- a/groundstation/pacsat.sh +++ b/groundstation/pacsat.sh @@ -106,7 +106,7 @@ MODE=$1 if [ ! "$MODE" = "P" ] && [ ! "$loopback" = "1" ] ; then echo - echo "Changing to PacSat Ground Station Mode." + echo "Changing to Pacsat Ground Station Mode." echo "You might reboot" echo sleep 5 @@ -129,7 +129,7 @@ if [ "$loopback" = "1" ] ; then # if [ ! "$MODE" = "p" ] ; then echo - echo "Switching to PacSat mode for the Simulated PacSat Satellite" + echo "Switching to Pacsat mode for the Simulated Pacsat Satellite" echo /home/pi/CubeSatSim/config -G -n # fi @@ -174,7 +174,7 @@ else sleep 2 echo - echo "Mode is PacSat Ground Station" + echo "Mode is Pacsat Ground Station" echo if [ ! -d "/home/pi/PacSatGround" ] ; then From a22b2ecb53009757945b66a373d775951fd35d7b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 6 Sep 2026 09:37:21 -0400 Subject: [PATCH 1714/1744] Update install add alsactl init --- install | 1 + 1 file changed, 1 insertion(+) diff --git a/install b/install index dfeeff29..da36c155 100755 --- a/install +++ b/install @@ -869,6 +869,7 @@ else FLAG=1 fi +sudo alsactl init /home/pi/CubeSatSim/config -L 75 FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg From e53376e5fc50dc5edc030b88e7bd354c86708fd3 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 6 Sep 2026 11:05:52 -0400 Subject: [PATCH 1715/1744] Update config remove extra -h --- config | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config b/config index c00969d6..265b8326 100755 --- a/config +++ b/config @@ -2356,12 +2356,11 @@ elif [ "$1" = "-h" ]; then echo " -f Change to FSK/DUV mode" echo " -b Change to BPSK mode" echo " -s Change to SSTV mode" - echo " -j Change to FUNcube mode" - echo " -n Change to Transmit Commands mode" echo " -e Change to Repeater mode" echo " -j Change to FUNcube mode" echo " -G Change to Pacsat mode" echo " -I Change to Pacsat Ground Station mode" + echo " -n Change to Transmit Commands mode" echo " -i Restart CubeSatsim software" echo " -c Change the CALLSIGN in the configuration file sim.cfg" echo " -t Change the Simulated Telemetry setting in sim.cfg" From 7e102a76db02b834ebbf405d2cc0b03d328e0faf Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 6 Sep 2026 11:07:19 -0400 Subject: [PATCH 1716/1744] Update install second config -L --- install | 2 ++ 1 file changed, 2 insertions(+) diff --git a/install b/install index da36c155..b9e794d7 100755 --- a/install +++ b/install @@ -869,6 +869,8 @@ else FLAG=1 fi +sudo alsactl init +/home/pi/CubeSatSim/config -L 75 sudo alsactl init /home/pi/CubeSatSim/config -L 75 From e1f8fa8c0a896dbac57fee2551c1bd5078c04245 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 6 Sep 2026 14:54:49 -0400 Subject: [PATCH 1717/1744] Update install turn C2C on and off to activate MicVolume --- install | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/install b/install index b9e794d7..212967a4 100755 --- a/install +++ b/install @@ -763,6 +763,15 @@ else FLAG=1 fi +ech "Turn Command and Control on and off to activate MicVolume" +touch /home/pi/CubeSatSim/command_control +sudo systemctl start command +sleep 1 +sudo rm /home/pi/CubeSatSim/command_control +sudo systemctl restart command +sudo alsactl init +/home/pi/CubeSatSim/config -L 75 + FILE=/etc/systemd/system/pacsatsim.service if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then @@ -869,11 +878,6 @@ else FLAG=1 fi -sudo alsactl init -/home/pi/CubeSatSim/config -L 75 -sudo alsactl init -/home/pi/CubeSatSim/config -L 75 - FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg if [ ! -f "$FILE" ]; then echo "Copying SSTV image 1." From 62b033b0aeb987d06b97e822fa0424b7ed62dd49 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 6 Sep 2026 16:55:36 -0400 Subject: [PATCH 1718/1744] Update transmit.py change repeater gain to 7000 for MicLevel 75% --- transmit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transmit.py b/transmit.py index 08eb1579..c9373b16 100644 --- a/transmit.py +++ b/transmit.py @@ -325,7 +325,7 @@ def start_repeater(tx_freq_hz, rx_freq_hz): output(txLed, 1) txr = "{:.3f}".format(tx_freq_hz/1e3) print(txr) - system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 4000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") + system("sudo nc -l 8011 | csdr convert_i16_f | csdr gain_ff 7000 | csdr convert_f_samplerf 20833 | sudo rpitx -i- -m RF -f " + txr + " > /dev/null 2>&1 &") sleep(0.5) system("sudo arecord -D shared_mic -r48000 -fS16_LE -c1 | nc localhost 8011 &") except Exception as e: From fdfa753de5ac160cefe4a24ad5b2484cc679433b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sun, 6 Sep 2026 20:13:15 -0400 Subject: [PATCH 1719/1744] Update install add sleeps to config -L --- install | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install b/install index 212967a4..081af405 100755 --- a/install +++ b/install @@ -763,13 +763,16 @@ else FLAG=1 fi -ech "Turn Command and Control on and off to activate MicVolume" +sudo alsactl init +sleep 5 +echo "Turn Command and Control on and off to activate MicVolume" touch /home/pi/CubeSatSim/command_control sudo systemctl start command -sleep 1 +sleep 10 sudo rm /home/pi/CubeSatSim/command_control sudo systemctl restart command sudo alsactl init +sleep 5 /home/pi/CubeSatSim/config -L 75 FILE=/etc/systemd/system/pacsatsim.service From d00be52d7d658de6044113afa4fe9e4e2056b9e2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 7 Sep 2026 00:01:00 -0400 Subject: [PATCH 1720/1744] Update install move config -L to after asound.conf --- install | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/install b/install index 081af405..4389c707 100755 --- a/install +++ b/install @@ -763,18 +763,6 @@ else FLAG=1 fi -sudo alsactl init -sleep 5 -echo "Turn Command and Control on and off to activate MicVolume" -touch /home/pi/CubeSatSim/command_control -sudo systemctl start command -sleep 10 -sudo rm /home/pi/CubeSatSim/command_control -sudo systemctl restart command -sudo alsactl init -sleep 5 -/home/pi/CubeSatSim/config -L 75 - FILE=/etc/systemd/system/pacsatsim.service if [ -f "$FILE" ]; then if [[ $(diff /home/pi/CubeSatSim/systemd/pacsatsim.service /etc/systemd/system/pacsatsim.service) ]]; then @@ -881,6 +869,18 @@ else FLAG=1 fi +sudo alsactl init +sleep 5 +echo "Turn Command and Control on and off to activate MicVolume" +touch /home/pi/CubeSatSim/command_control +sudo systemctl start command +sleep 10 +sudo rm /home/pi/CubeSatSim/command_control +sudo systemctl restart command +sudo alsactl init +sleep 5 +/home/pi/CubeSatSim/config -L 75 + FILE=/home/pi/CubeSatSim/sstv_image_1_320_x_256.jpg if [ ! -f "$FILE" ]; then echo "Copying SSTV image 1." From 9599b4387e5b2559a76f69de7e3317cbb54562f1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 7 Sep 2026 05:11:52 -0400 Subject: [PATCH 1721/1744] Update config restart to dev/null --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 265b8326..83c8f804 100755 --- a/config +++ b/config @@ -2416,7 +2416,7 @@ if [ "$reboot" = "1" ] ; then if [ "$noreboot" = "0" ] ; then echo 'Reboot due to config change!' | wall echo "Rebooting" - sudo systemctl stop transmit + sudo systemctl stop transmit &>/dev/null sudo reboot now else echo "Reboot needed for changes to take effect" @@ -2427,8 +2427,8 @@ if [ "$restart" = "1" ] ; then if [ "$reboot" = "0" ] ; then echo "Restarting" # sudo systemctl stop transmit - sudo systemctl restart cubesatsim - sudo systemctl restart transmit + sudo systemctl restart cubesatsim &>/dev/null + sudo systemctl restart transmit &>/dev/null else echo "Restart needed for changes to take effect" fi From 9f2f145ac7ce504f868d61035c93d3cfd5ec6ba6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 14 Sep 2026 14:19:56 -0400 Subject: [PATCH 1722/1744] Update pacsatsim.sh --- pacsatsim.sh | 68 +++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 896e8071..a5bd1f22 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -83,44 +83,45 @@ echo sleep 2 -if [ "$reset" = "0" ] ; then +# if [ "$reset" = "0" ] ; then +if [ ! -d "/home/pi/PacSat" ]; then - if [ ! -d "/home/pi/PacSat" ]; then +# if [ ! -d "/home/pi/PacSat" ]; then - echo "Setting up PacSatSim default configuration" - echo +# echo "Setting up PacSatSim default configuration" +# echo - cd - sudo rm pacsat-dir.zip - mkdir /home/pi/PacSat - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir - # wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip - cp /home/pi/pi_pacsat/zip/pacsat-dir.zip . - unzip pacsat-dir.zip - sudo rm pacsat-dir.zip +# cd +# sudo rm pacsat-dir.zip +# mkdir /home/pi/PacSat +# mkdir /home/pi/PacSat/pacsat +# mkdir /home/pi/PacSat/pacsat/dir +## wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pacsat-dir.zip + # cp /home/pi/pi_pacsat/zip/pacsat-dir.zip . + # unzip pacsat-dir.zip + # sudo rm pacsat-dir.zip - cd - sudo rm /home/pi/pi_pacsat/Debug/pacsat.config - sudo rm /home/pi/pi_pacsat/Debug/pacsat.state - sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat - sudo rm pi_pacsat.zip - # wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip - cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . - unzip pi_pacsat.zip - sudo rm pi_pacsat.zip - - sudo sed -i 's/dir_max_file_age_in_seconds=4320000/dir_max_file_age_in_seconds=60480000/g' /home/pi/pi_pacsat/Debug/pacsat.state - sudo sed -i 's/ftl0_max_upload_age_in_seconds=432000/ftl0_max_upload_age_in_seconds=60480000/g' /home/pi/pi_pacsat/Debug/pacsat.state - - echo - echo "pacsat.state:" - cat /home/pi/pi_pacsat/Debug/pacsat.state - echo + # cd + # sudo rm /home/pi/pi_pacsat/Debug/pacsat.config + # sudo rm /home/pi/pi_pacsat/Debug/pacsat.state + # sudo rm /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat + # sudo rm pi_pacsat.zip + ## wget https://github.com/alanbjohnston/pi_pacsat/releases/download/v0.2/pi_pacsat.zip +# cp /home/pi/pi_pacsat/zip/pi_pacsat.zip . + # unzip pi_pacsat.zip + # sudo rm pi_pacsat.zip +# + # sudo sed -i 's/dir_max_file_age_in_seconds=4320000/dir_max_file_age_in_seconds=60480000/g' /home/pi/pi_pacsat/Debug/pacsat.state + # sudo sed -i 's/ftl0_max_upload_age_in_seconds=432000/ftl0_max_upload_age_in_seconds=60480000/g' /home/pi/pi_pacsat/Debug/pacsat.state + + # echo + #echo "pacsat.state:" + # cat /home/pi/pi_pacsat/Debug/pacsat.state + # echo - fi +# fi -else +# else echo "Resetting pi_pacsat to empty configuration" echo @@ -128,7 +129,8 @@ else mkdir /home/pi/PacSat mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir - + mkdir /home/pi/PacSat/pacsat + mkdir /home/pi/PacSat/pacsat/dir cd /home/pi/pi_pacsat/Debug sudo rm pacsat_last_command_time.dat From e8e971e2faeca2acc84c99d53b6927350f0199d0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 14 Sep 2026 14:21:52 -0400 Subject: [PATCH 1723/1744] Update pacsatsim.sh use empty PacSat and copy Welcome_message.txt --- pacsatsim.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index a5bd1f22..cf2aaf39 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -129,8 +129,8 @@ if [ ! -d "/home/pi/PacSat" ]; then mkdir /home/pi/PacSat mkdir /home/pi/PacSat/pacsat mkdir /home/pi/PacSat/pacsat/dir - mkdir /home/pi/PacSat/pacsat - mkdir /home/pi/PacSat/pacsat/dir + mkdir /home/pi/PacSat/pacsat/txt + cp /home/pi/CubeSatSim/Welcome_Message.txt /home/pi/PacSat/pacsat/txt/Welcome_Message.txt cd /home/pi/pi_pacsat/Debug sudo rm pacsat_last_command_time.dat @@ -156,7 +156,7 @@ if [ ! -d "/home/pi/PacSat" ]; then touch /home/pi/pi_pacsat/Debug/pacsat_upload_table.dat - exit +# exit fi value=`cat /home/pi/CubeSatSim/sim.cfg` From 47347cb05eca36a6e19304852157e06c7f4d8580 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Mon, 14 Sep 2026 14:22:38 -0400 Subject: [PATCH 1724/1744] Create Welcome_Message.txt --- Welcome_Message.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Welcome_Message.txt diff --git a/Welcome_Message.txt b/Welcome_Message.txt new file mode 100644 index 00000000..1d699a01 --- /dev/null +++ b/Welcome_Message.txt @@ -0,0 +1,18 @@ +Welcome! + +Hello, and welcome to the CubeSatSim Pacsat Simulator! + +Here's what you can do with your PacSatSim: + +1. Downlink a Message by clicking on the message then the "FILE" button. When it is Downlinked, the Message will show as "New". If you double click on it you can view it and save it to your computer using the 'Export' button. +2. Uplink a Message using the "New Msg" button. Under "Select Type" select "ASCII", type your message and then "Send" +3. Reply to a Message by first Downlinking the message using the "FILE" button, then opening the Message and selecting "Reply" then "Send" +4. Uplink a File using the "New Msg" button. Under "Select Type" select "JPG" or "BINARY". Remember the link is just 1200 bps, so don't try to Uplink anything larger than a few kilobytes. You could Downlink the SSTV image and try Uplinking it. +5. Send a Command using the "Command" button. Under "Type" select "File System". Under "Commands" you can try "Pacsat Broadcast" then try setting "stop" or "start" then click "Send" to send the Command. Or under "Type" select "File Uploads". You can select "Off" or "All Stations" and click "Send" to send the Command. You can restore using config -k +6. You can clear the current Pacsat Directory. You can always restore the default Directory contents running CubeSatSim/config -k and selecting Option 4 Reset PacSat Satellite. Using the "Command" button, select "Delete Folder Contents" then select "PACSAT dir" and then "Send" to send the Command. + +You can post questions and comments on the CubeSatSim Discussions Board https://github.com/alanbjohnston/CubeSatSim/discussions + +73, +Alan +KU2Y From d055a87fbe6f2b54625079435f566cc7c2ad39f9 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 15 Sep 2026 16:30:10 -0400 Subject: [PATCH 1725/1744] Update pacsatsim.sh take one photo at start and copy to pacsat txt dir --- pacsatsim.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index cf2aaf39..d18069b3 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -159,6 +159,21 @@ if [ ! -d "/home/pi/PacSat" ]; then # exit fi +if [[ $(grep 'bullseye' /etc/os-release) ]]; then + echo "Pi OS is Bullseye (Debian 11)" + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 25 &>/dev/null +elif [[ $(grep 'bookworm' /etc/os-release) ]]; then + echo "Pi OS is Bookworm (Debian 12)" + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null +elif [[ $(grep 'trixie' /etc/os-release) ]]; then + echo "Pi OS is Trixie (Debian 13)" + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null +fi + +echo "Copying camera.jpg to pacsat txt directory" +sudo rm /home/pi/PacSat/pacsat/txt/camera.jpg +cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/txt/camera.jpg + value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null set -- $value From fab6772e3e6ac3f9e475a187e39aab33b7a778de Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 15 Sep 2026 16:47:22 -0400 Subject: [PATCH 1726/1744] Update pacsatsim.sh remove camera stills --- pacsatsim.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index d18069b3..84ca881b 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -161,18 +161,18 @@ fi if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 25 &>/dev/null +# raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 25 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null +# rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null +# rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null fi echo "Copying camera.jpg to pacsat txt directory" sudo rm /home/pi/PacSat/pacsat/txt/camera.jpg -cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/txt/camera.jpg +# cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/txt/camera.jpg value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null From a7078ff3b4722c910e129b933ebfcbd63f069da6 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 14:23:11 -0500 Subject: [PATCH 1727/1744] Add files via upload --- sstv/sstv_image_tiny.jpg | Bin 0 -> 2347 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sstv/sstv_image_tiny.jpg diff --git a/sstv/sstv_image_tiny.jpg b/sstv/sstv_image_tiny.jpg new file mode 100644 index 0000000000000000000000000000000000000000..41a0a64263b4f1960782791dcea3558b1cf4b42b GIT binary patch literal 2347 zcmbVM4LFqP8h*a{@z16)h&B^LsO-#;&_*be4w+_@Hg@GVgc#!|M5(scvauT(=W0zd z4N}rBVcXJT%Q>q}D1UXf@_)6~`YmkVdB0)V>+0IQ_MH2>-tWDy=Y5{%eedV_-Vg7< zpJ9}338BFN?(Sd?07{^QEeA4U7^PQoEM!#7 zLIe3zSR4*J8=L1Ci42n8?Q9lHf-UVSAuaC7laLqrmLi1(ACzn!_;b=VS7&Em9^b>o z)omMK=v*X8ctAu9WeY$=q)5o;Ix+Tsu#cfQ2x_QCTIeDB1;j)-@_25)XL);`dL&l} zt?P+gZ?FHQMLjSmCIFR)fxNZ^LD^UKB;}JjAsELi_>|FGGBt5FHTl4#Ms~ z&tDS!fSeO80xh8@-x+Bm`olQz2k!p|9uOjoKt5K;hZz_ViSm>7&htQmClfp(JQkfz z4x)!@L6N%!XlA0Z61d^}gYJpfSg zp068PBi7;KV*pQ7E4O9DnfAx`~gyrM=Jp4EzbYRaCqVG?icr@W_}U zkTfx}CWbd)sN@(GlY=M+0d!d@R0TyPWfj$BK*Gpm5`|2qQYdKU2yu}qn$+d1*^Uad zU4Dv&(OR5i*%y?IoGR|n`7NVNOMhXSvWm8j?g~9)lQpJh=2jc5H`>_RId9$O!rkt= zL*Ti4j~8lNKwwbtfsoL!7*T9oe8S7RdbHYfL7o;bhoVv+Qcthl7~ z`d439R^6zssr|0Lq4E2>_nQ9ou(hrI(c_NJu4m6*^!D`+3=R$dIyOErIW_(2^$hy6 z%*#RVxAbTtJtPW+Oi?8CV5E3LtR{uJnys+hahIZBG|iB6Oi9Zr`$EMXWg|=eDBWM! zqN2^TdS?79AxW<2?+Hr#zZ5MBTGWGgff^Y@4I^uU1B{6>i)&s4B^k$TW?@;(TySrmn;AL5&7n)So+_-Xgx3}u2 zWqIGzQ^r@(Q)H5o{x?6~I9;#vOYi$D?1$f(<_abqayCt{IMo-^_wCr9ia!{$Gi&RD zwN9<>H^0s7yOB}LolehqF}kvSnY5bT8FFs=jh>hI#K8foK&#;J(U;Jdh%&5|*m|%S z-OIX15^|hfZhg1@!wpsCN=aPpF$NB2f^Bv>42bJiOhq11 zkI^`zAD%@ws(Aj*?VsOWQ-9jOh4kcUfWpw-d*4>*;ov*q^RdhkfA?<$n3v%n`QtxAjnbAczi=4w|Rjy2lZ{G^Nl`OlgxA}ojeRJ8cG=0=Q zr$qWHWp+=dvNCys^7Uhv!^0fx_uuxC$czkrD(47!&-IU5}hd* z>CM9Kd)=;rlgz;A$5O8^@Ar4C_0V@Q7#Y#MZ$5so>$0t1jA2^LNgMK@d1iB8^9#kA P>>{I#issb?c;|lsP-O;7 literal 0 HcmV?d00001 From 92333b69fa01be1c6d8ed341a86d38e93450927f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 15:28:46 -0400 Subject: [PATCH 1728/1744] Update pacsatsim.sh add back in camera --- pacsatsim.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 84ca881b..05142bae 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -161,18 +161,17 @@ fi if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" -# raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 25 &>/dev/null + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 25 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" -# rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" -# rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null fi echo "Copying camera.jpg to pacsat txt directory" -sudo rm /home/pi/PacSat/pacsat/txt/camera.jpg -# cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/txt/camera.jpg + cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/img/camera.jpg value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null From f0f7423bdc9e2b36b67d1db976a704484349cb29 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 15:30:40 -0400 Subject: [PATCH 1729/1744] Update pacsatsim.sh 24 height --- pacsatsim.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 05142bae..b7afa680 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -161,13 +161,13 @@ fi if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 25 &>/dev/null + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 24 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 25 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null fi echo "Copying camera.jpg to pacsat txt directory" From 57bd89dcaf81aaaf6ad081343f8b5dd30b8b6d04 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 15:33:01 -0400 Subject: [PATCH 1730/1744] Update pacsatsim.sh add copy of sstv_tiny_image --- pacsatsim.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pacsatsim.sh b/pacsatsim.sh index b7afa680..0d75f576 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -131,6 +131,8 @@ if [ ! -d "/home/pi/PacSat" ]; then mkdir /home/pi/PacSat/pacsat/dir mkdir /home/pi/PacSat/pacsat/txt cp /home/pi/CubeSatSim/Welcome_Message.txt /home/pi/PacSat/pacsat/txt/Welcome_Message.txt + mkdir /home/pi/PacSat/pacsat/img + cp /home/pi/CubeSatSim/sstv/sstv_image_tiny.jpg /home/pi/PacSat/pacsat/img/sstv_image_tiny.jpg cd /home/pi/pi_pacsat/Debug sudo rm pacsat_last_command_time.dat From cf5eb553f09a474662a37995f34508eec330016a Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 15:45:19 -0400 Subject: [PATCH 1731/1744] Update pacsatsim.sh fix echo --- pacsatsim.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 0d75f576..cd1a22c9 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -163,17 +163,17 @@ fi if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 24 &>/dev/null + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 24 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null fi -echo "Copying camera.jpg to pacsat txt directory" - cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/img/camera.jpg +echo "Taking camera image and copying to pacsat img directory" +cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/img/camera.jpg value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null From d58b3906d7a758b4620b5af95a96f379b40b9b7b Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 15:51:24 -0400 Subject: [PATCH 1732/1744] Update pacsatsim.sh change to 67 x 50 --- pacsatsim.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index cd1a22c9..6c5db34a 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -163,13 +163,13 @@ fi if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 32 -h 24 &>/dev/null + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 67 -h 50 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 32 --height 24 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 &>/dev/null fi echo "Taking camera image and copying to pacsat img directory" From 0b0e7e7449a07dbebf64a9996d2e5492b0df0b19 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 15:53:57 -0400 Subject: [PATCH 1733/1744] Update pacsatsim.sh -q 70 --- pacsatsim.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 6c5db34a..951db738 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -166,10 +166,10 @@ if [[ $(grep 'bullseye' /etc/os-release) ]]; then raspistill -o /home/pi/CubeSatSim/camera.jpg -w 67 -h 50 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 -q 70 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 -q 70 &>/dev/null fi echo "Taking camera image and copying to pacsat img directory" From a25c3cc4afe44cfc5570a7349cd6894ce55a0fb7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 16:04:03 -0400 Subject: [PATCH 1734/1744] Update pacsatsim.sh. 85x64 --- pacsatsim.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 951db738..1e36c892 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -163,13 +163,13 @@ fi if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 67 -h 50 &>/dev/null + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 85 -h 64 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 -q 70 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 85 --height 64 -q 70 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 67 --height 50 -q 70 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 85 --height 64 -q 70 &>/dev/null fi echo "Taking camera image and copying to pacsat img directory" From cbdb7885fafe183e18c5d9294c02023b31dda019 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 16:17:17 -0400 Subject: [PATCH 1735/1744] Update pacsatsim.sh 86x64 --- pacsatsim.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 1e36c892..1d040d79 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -163,13 +163,13 @@ fi if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 85 -h 64 &>/dev/null + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 85 --height 64 -q 70 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 85 --height 64 -q 70 &>/dev/null + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null fi echo "Taking camera image and copying to pacsat img directory" From 80d8cd219d553b81c79a853753363d35673ed5c0 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 16:30:02 -0400 Subject: [PATCH 1736/1744] Update .gitignore add camera.jpg --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 31176c3b..ad3de7d0 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ logb.txt logo.txt logp.txt hotspot.ini +camera.jpg From e8b384b9100185fcdb8d3838712cd5b9f6c57fd2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Wed, 16 Sep 2026 16:32:07 -0400 Subject: [PATCH 1737/1744] Update config delete camera.jpg --- config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config b/config index 83c8f804..12223745 100755 --- a/config +++ b/config @@ -1665,6 +1665,8 @@ elif [ "$1" = "-g" ]; then sudo rm -r /home/pi/PacSatGroundLoop > /dev/null 2>&1 + sudo rm /home/pi/CubeSatSim/camera.jpg > /dev/null 2>&1 + if [ "$noreboot" = "0" ] ; then echo "Shutting down." sudo shutdown now From 481df0dfc52771fe0f2393c18f5cfe1584b877f7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 18 Sep 2026 15:11:13 -0400 Subject: [PATCH 1738/1744] Update pacsatsim.sh config -z --- pacsatsim.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pacsatsim.sh b/pacsatsim.sh index 1d040d79..e690a948 100755 --- a/pacsatsim.sh +++ b/pacsatsim.sh @@ -161,19 +161,7 @@ if [ ! -d "/home/pi/PacSat" ]; then # exit fi -if [[ $(grep 'bullseye' /etc/os-release) ]]; then - echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 &>/dev/null -elif [[ $(grep 'bookworm' /etc/os-release) ]]; then - echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null -elif [[ $(grep 'trixie' /etc/os-release) ]]; then - echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null -fi - -echo "Taking camera image and copying to pacsat img directory" -cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/img/camera.jpg +/home/pi/CubeSatSim/config -z value=`cat /home/pi/CubeSatSim/sim.cfg` echo "$value" > /dev/null From e403c5d683c98965fce4b7d93e0b3e90941b0303 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 18 Sep 2026 15:11:27 -0400 Subject: [PATCH 1739/1744] Update config -z to take pacsat camera image --- config | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/config b/config index 12223745..e8b0525e 100755 --- a/config +++ b/config @@ -2345,7 +2345,23 @@ elif [ "$1" = "-w" ]; then echo cat $CONFIG echo - + +elif [ "$1" = "-z" ]; then + + if [[ $(grep 'bullseye' /etc/os-release) ]]; then + echo "Pi OS is Bullseye (Debian 11)" + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 &>/dev/null + elif [[ $(grep 'bookworm' /etc/os-release) ]]; then + echo "Pi OS is Bookworm (Debian 12)" + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null + elif [[ $(grep 'trixie' /etc/os-release) ]]; then + echo "Pi OS is Trixie (Debian 13)" + rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null + fi + + echo "Taking camera image and copying to pacsat img directory" + cp /home/pi/CubeSatSim/camera.jpg /home/pi/PacSat/pacsat/img/camera.jpg + elif [ "$1" = "-h" ]; then echo "config OPTION" @@ -2394,6 +2410,7 @@ elif [ "$1" = "-h" ]; then echo " -K Change the Doppler frequency shift setting" echo " -V Set the maximum CPUs" echo " -w Show PiOS boot files" + echo " -z Take camera image for PacSat" echo exit From 4b9122b8fd5d9efc107de124e51cdad173aeab72 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 18 Sep 2026 15:16:55 -0400 Subject: [PATCH 1740/1744] Update config.yaml add Take Camera photo --- OliveTin/config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index a3ecf73d..979b81e3 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -563,6 +563,12 @@ actions: shell: /home/pi/CubeSatSim/config -o onclick: execution-dialog timeout: 10 + + - title: "Take Camera Photo for PacSat" + shell: /home/pi/CubeSatSim/config -z + icon: "📷" # camera + onclick: execution-dialog + timeout: 30 dashboards: - title: CubeSatSim Dashboard @@ -617,6 +623,7 @@ dashboards: - title: "Set maxcpus Value" - title: "Show All Commands" - title: "General CubeSatSim Config" + - title: "Take Camera Photo for PacSat" - title: Logs contents: From bc57827d40c0e2f2002afda41628d52b6720dbd1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 18 Sep 2026 15:53:51 -0400 Subject: [PATCH 1741/1744] Update config.yaml add Pi Hardware and Software --- OliveTin/config.yaml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OliveTin/config.yaml b/OliveTin/config.yaml index 979b81e3..8c01eea5 100644 --- a/OliveTin/config.yaml +++ b/OliveTin/config.yaml @@ -569,6 +569,14 @@ actions: icon: "📷" # camera onclick: execution-dialog timeout: 30 + + + - title: "Raspberry Pi Software and Hardware" + shell: hostnamectl && echo && cat /sys/firmware/devicetree/base/model && echo + icon: logs + onclick: execution-dialog + timeout: 30 + dashboards: - title: CubeSatSim Dashboard @@ -672,7 +680,8 @@ dashboards: - title: "Ping a Host or IP address" - title: "See Running Processes" - title: "Show PiOS Boot Files" - - title: "CubeSatSim Directory" + - title: "CubeSatSim Directory" + - title: "Raspberry Pi Software and Hardware" # - title: "Signin to Raspberry Pi Connect" # OliveTin needs to run as pi # - title: "Signout of Raspberry Pi Connect" # - title: "Status of Raspberry Pi Connect" From f9b502c805a003bddb36c2675c0f8509765e598f Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 18 Sep 2026 16:06:55 -0400 Subject: [PATCH 1742/1744] Update config raspistill -q 70 --- config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config b/config index e8b0525e..742a81ca 100755 --- a/config +++ b/config @@ -2350,7 +2350,7 @@ elif [ "$1" = "-z" ]; then if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 &>/dev/null + raspistill -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 -q 70 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null From dda2cbfccedea40baab997cc8067e840de4fb9c7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Fri, 18 Sep 2026 23:26:39 -0400 Subject: [PATCH 1743/1744] Update config still -n no preview --- config | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config b/config index 742a81ca..dbaea133 100755 --- a/config +++ b/config @@ -2350,13 +2350,13 @@ elif [ "$1" = "-z" ]; then if [[ $(grep 'bullseye' /etc/os-release) ]]; then echo "Pi OS is Bullseye (Debian 11)" - raspistill -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 -q 70 &>/dev/null + raspistill -n -o /home/pi/CubeSatSim/camera.jpg -w 86 -h 64 -q 70 &>/dev/null elif [[ $(grep 'bookworm' /etc/os-release) ]]; then echo "Pi OS is Bookworm (Debian 12)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null + rpicam-still -n -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null elif [[ $(grep 'trixie' /etc/os-release) ]]; then echo "Pi OS is Trixie (Debian 13)" - rpicam-still -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null + rpicam-still -n -o /home/pi/CubeSatSim/camera.jpg --width 86 --height 64 -q 70 &>/dev/null fi echo "Taking camera image and copying to pacsat img directory" From 4f4d4721e34b0844a924c3fdd34a4900685569d7 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 19 Sep 2026 08:35:08 -0400 Subject: [PATCH 1744/1744] Update transmit.py add -n to still photos --- transmit.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/transmit.py b/transmit.py index c9373b16..9a20b8a5 100644 --- a/transmit.py +++ b/transmit.py @@ -200,9 +200,9 @@ def camera_photo(): stored_image = False try: if os_status == "bookworm": - system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + system("rpicam-still -n -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") else: - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + system("raspistill -n -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Photo taken") @@ -1212,9 +1212,9 @@ if __name__ == "__main__": # camera = PiCamera() print("Testing for camera") if os_status == "bookworm": - system("rpicam-still -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") + system("rpicam-still -n -o /home/pi/CubeSatSim/camera_out.jpg --width 320 --height 256") # > /dev/null 2>&1") else: - system("raspistill -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") + system("raspistill -n -o /home/pi/CubeSatSim/camera_out.jpg -w 320 -h 256") f = open("/home/pi/CubeSatSim/camera_out.jpg") f.close() print("Camera present")