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.
 
 
 
 
 
 

38 lines
1.5 KiB

  1. #!/bin/bash
  2. ### Run as a normal user
  3. if [ $EUID -eq 0 ]; then
  4. echo "This script shouldn't be run as root."
  5. exit 1
  6. fi
  7. ## import common lib
  8. . "$HOME/.noaa.conf"
  9. . "$NOAA_HOME/common.sh"
  10. log "Scheduling new passes" INFO
  11. wget -qr http://www.celestrak.com/NORAD/elements/weather.txt -O "${NOAA_HOME}"/predict/weather.txt
  12. wget -qr http://www.celestrak.com/NORAD/elements/amateur.txt -O "${NOAA_HOME}"/predict/amateur.txt
  13. grep "NOAA 15" "${NOAA_HOME}"/predict/weather.txt -A 2 > "${NOAA_HOME}"/predict/weather.tle
  14. grep "NOAA 18" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
  15. grep "NOAA 19" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
  16. grep "METEOR-M 2" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
  17. grep "METEOR-M2 2" "${NOAA_HOME}"/predict/weather.txt -A 2 >> "${NOAA_HOME}"/predict/weather.tle
  18. if [ "$SCHEDULE_ISS" == "true" ]; then
  19. grep "ZARYA" "${NOAA_HOME}"/predict/amateur.txt -A 2 > "${NOAA_HOME}"/predict/amateur.tle
  20. fi
  21. #Remove all AT jobs
  22. for i in $(atq | awk '{print $1}');do atrm "$i";done
  23. #Schedule Satellite Passes:
  24. if [ "$SCHEDULE_ISS" == "true" ]; then
  25. "${NOAA_HOME}"/schedule_iss.sh "ISS (ZARYA)" 145.8000
  26. fi
  27. "${NOAA_HOME}"/schedule_sat.sh "METEOR-M 2" 137.1000
  28. #"${NOAA_HOME}"/schedule_sat.sh "METEOR-M2 2" 137.9000 #Meteor M2-2 will never send LRPT again :(
  29. "${NOAA_HOME}"/schedule_sat.sh "NOAA 19" 137.1000
  30. "${NOAA_HOME}"/schedule_sat.sh "NOAA 18" 137.9125
  31. "${NOAA_HOME}"/schedule_sat.sh "NOAA 15" 137.6200