forked from reynico/raspberry-noaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschedule.sh
executable file
·36 lines (30 loc) · 1.46 KB
/
schedule.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
## debug
#set -x
# Close STDOUT file descriptor
exec 1<&-
# Close STDERR FD
exec 2<&-
LOGFILE=/var/ramfs/schedule.log
# Open STDOUT as $LOG_FILE file for read and write.
exec 1<>${LOGFILE}.log
exec 2<>${LOGFILE}.err
. ${HOME}/.noaa.conf
wget -r http://www.celestrak.com/NORAD/elements/weather.txt -O "${NOAA_HOME}"/predict/weather.txt
wget -r http://www.celestrak.com/NORAD/elements/amateur.txt -O "${NOAA_HOME}"/predict/amateur.txt
grep "NOAA 15" "${NOAA_HOME}"/predict/weather.txt -A 2 > "${NOAA_HOME}"/predict/weather.tle
grep "NOAA 18" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
grep "NOAA 19" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
grep "METEOR-M 2" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
#grep "METEOR-M2 2" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
#grep "ZARYA" "${NOAA_HOME}"/predict/amateur.txt -A 2 > "${NOAA_HOME}"/predict/amateur.tle
#Remove all AT jobs
for i in $(atq | awk '{print $1}');do atrm "$i";done
#Schedule Satellite Passes:
"${NOAA_HOME}"/schedule_sat.sh "NOAA 19" 137.100000
"${NOAA_HOME}"/schedule_sat.sh "NOAA 18" 137.912500
"${NOAA_HOME}"/schedule_sat.sh "NOAA 15" 137.620000
"${NOAA_HOME}"/schedule_meteor.sh "METEOR-M 2" 137.100
#echo "${NOAA_HOME}"/schedule_meteor.sh "METEOR-M2 2" 137.900
#"${NOAA_HOME}"/schedule_meteor.sh "METEOR-M2 2" 137.900
#"${NOAA_HOME}"/schedule_iss.sh "ISS (ZARYA)" 145.8000