a set of script to predict passes and make automated recordings of satellites. Intended to be run headless on an SoC. Original forked from https://github.com/va7eex/Pi_WXRX Improvements made for https://keet.space
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
777 B

7 years ago
#!/bin/bash
7 years ago
#Satellite we want to plan to record. ex: NOAA-19
7 years ago
SAT=$1
7 years ago
#current unix time
7 years ago
TIEMSTAMP=$(date +%s)
7 years ago
#make a file
FILENAME="sat_scheds/schd-${SAT}-${TIEMSTAMP}"
7 years ago
rm reschd-$SAT.txt
7 years ago
#from here out we generate a bash script to be executed at the time of a satellite pass
7 years ago
7 years ago
echo "#!/bin/bash" > $FILENAME
7 years ago
7 years ago
#meat and potatoes of the program
python satpredict.py
7 years ago
python satschedule.py $SAT >> $FILENAME
7 years ago
#regenerate the bash script for the next pass afterwards
7 years ago
echo "sleep 30" >> $FILENAME
echo "echo bash sats.sh ${SAT} > reschd-${SAT}.txt" >> $FILENAME
echo "at now + 30 minutes -q z -M -f reschd-${SAT}.txt" >> $FILENAME
echo "rm ${FILENAME}" >> $FILENAME
TIEM=$(<"${SAT}_sched.txt")
echo $TIEM
7 years ago
#commit to the action
7 years ago
at -M -m $TIEM < $FILENAME
rm "${SAT}_sched.txt"