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.

receive.sh 807 B

6 years ago
1234567891011121314151617181920
  1. #!/bin/bash
  2. if pgrep "rtl_fm" > /dev/null
  3. then
  4. exit 1
  5. fi
  6. # $1 = Satellite Name
  7. # $2 = Frequency
  8. # $3 = FileName base
  9. # $4 = TLE File
  10. # $5 = EPOC start time
  11. # $6 = Time to capture
  12. start=`date '+%d-%m-%Y %H:%M'`
  13. timeout $6 rtl_fm -f ${2}M -s 60k -g 50 -p 55 -E wav -E deemp -F 9 - | sox -t raw -e signed -c 1 -b 16 -r 60000 - /home/pi/audio/$3.wav rate 11025
  14. PassStart=`expr $5 + 90`
  15. /usr/local/bin/wxmap -T "${1}" -H $4 -p 0 -l 0 -o $PassStart /home/pi/map/${3}-map.png
  16. for i in ZA MCIR MCIR-precip MSA MSA-precip HVC-precip HVCT-precip HVC HVCT; do
  17. /usr/local/bin/wxtoimg -o -m /home/pi/map/${3}-map.png -e $i /home/pi/audio/$3.wav /home/pi/image/$3-$i.png
  18. /usr/bin/convert /home/pi/image/$3-$i.png -undercolor black -fill yellow -pointsize 18 -annotate +20+20 "$1 $start" /home/pi/image/$3-$i.png
  19. done