Raspberry Pi NOAA Weather Satellite Receiver

Introduction: Raspberry Pi NOAA Weather Satellite Receiver

About: I'm a ham, a tinker, a maker. I like interesting things. I'm a technophile, a wood turner, and a pen maker.

A new pile of parts means a new project is in the works.

I’m building a Raspberry Pi based NOAA weather satellite receiver. I’ve got some experience with receiving signals from NOAA satellites, but will be a little different, as all of the work is going to be done automatically on a Raspberry Pi. This will allow me to place the receiver right at the antenna, which is mounted in my attic. With a very short piece of coax, reducing feed-line loss.

I’ll be using the following list of parts:

  • Raspberry Pi 3 Model B
  • MicroUSB Power Supply
  • Generic Raspberry Pi 3 Case
  • 32 GB Micro SD Card
  • NooElec SDR Dongle
  • QFH Antenna

This project will require some basic Linux skills. If you are not comfortable navigating around the Linux command line, you may need to get some help if you want to follow along.

This instructable is going to focus on getting the Raspberry Pi working to receive images. Details around building a proper antenna can be found from other sources. I even made a video about it: https://youtu.be/KU75FSA6o2M

Step 1: Prepare the Raspberry Pi

The first step is getting the Raspberry Pi up and running. I’m using Raspbian (Jessie 2016-11-25).

There are plenty of tutorials on getting Raspbian set up and booting on the Raspberry Pi. You should have no difficulty in finding one: https://www.raspberrypi.org/documentation/installation/installing-images/README.md

Once you have the Raspbian image copied to your micro SD card, boot the Raspberry Pi. You'll need to get it on the network and enable SSH. You can certainly use either a wired Ethernet connection, or wireless. I'm using wireless, as I don't have a wired connection in my attic.

Enable SSH using the Raspberry Pi Configuration utility in the Preferences menu. You may want to set it to boot to CLI while you are in there. Since this is going to be a headless setup, there is no need to waste resources on a GUI.

Next we want to make sure the Raspberry Pi is fully up-to-date. Issue the following commands:

sudo apt-get update
sudo apt-get upgrade
sudo reboot

Step 2: Install the Necessary Software

The first thing we need is the USB drivers for the RTL dongle:

sudo apt-get install libusb-1.0

Since we need to build the latest version of rtl-sdr to actually make use of the RTL dongle, we'll need to install cmake:

sudo apt-get install cmake

We need to make sure the Raspberry Pi doesn't load any SDR kernel modules that will interfere with the rtl-sdr sofware.

Using your favorite text editor, create a new file named /etc/modprobe.d/no-rtl.conf and put the following text in the file. You need to run that text editor as sudo (i.e. 'sudo vi' or 'sudo nano' etc) to write to the modprobe.d directory:

blacklist dvb_usb_rtl28xxu
blacklist rtl2832
blacklist rtl2830

Install the most recent build of rtl-sdr:

cd ~
git clone https://github.com/keenerd/rtl-sdr.git
cd rtl-sdr/
mkdir build
cd build
cmake ../ -DINSTALL_UDEV_RULES=ON
make
sudo make install
sudo ldconfig
cd ~
sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/
sudo reboot

We'll need the sox audio toolkit in order to manipulate the received audio stream:

sudo apt-get install sox

We need a way to schedule the captures to happen as the satellites pass overhead. Install the at scheduler:

sudo apt-get install at

We need a way to know when the satellites will pass overhead. We'll use an application called predict:

sudo apt-get install predict

Finally, we'll need wxtoimg to convert the captured audio stream to an actual image:

cd ~
wget http://www.wxtoimg.com/beta/wxtoimg-armhf-2.11.2-beta.deb
sudo dpkg -i wxtoimg-armhf-2.11.2-beta.deb

Step 3: Testing Things Out

Once all the software is installed, make sure your USB dongle is connected and run the following command:

sudo rtl_test

You should see the following output:

Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Supported gain values (29): 0.0 0.9 1.4 2.7 3.7 7.7 8.7 12.5 14.4 15.7 16.6 19.7 20.7 22.9 25.4 28.0 29.7 32.8 33.8 36.4 37.2 38.6 40.2 42.1 43.4 43.9 44.5 48.0 49.6 
Sampling at 2048000 S/s.

Info: This tool will continuously read from the device, and report if
samples get lost. If you observe no further output, everything is fine.

Reading samples in async mode...

If you receive any error messages, you'll need to troubleshoot them before continuing. If your RTL Dongle isn't working at this point, it won't do any good to continue.

You need to run predict one time to set your ground station location. To do that you'll need your latitude and longitude. You can get your latitude and longitude from google maps by searching for your address, the right clicking on the pointer and selecting "What's Here". One thing to note is that Google displays North as positive and East as positive numbers. Predict uses North as positive but WEST as positive. Make sure to adjust accordingly, or your predictions will be no good.

Run predict from the command line, and select option 'G'. Enter your ground station information and exit the program.:

predict
                                      
                           --== PREDICT  v2.2.3 ==--         
                     Released by John A. Magliacane, KD2BD   
                                    May 2006                 
                                                             


                            --==[ Main Menu ]==--


 [P]: Predict Satellite Passes          [I]: Program Information
 [V]: Predict Visible Passes            [G]: Edit Ground Station Information
 [S]: Solar Illumination Predictions    [D]: Display Satellite Orbital Data
 [L]: Lunar Predictions                 [U]: Update Sat Elements From File
 [O]: Solar Predictions                 [E]: Manually Edit Orbital Elements
 [T]: Single Satellite Tracking Mode    [B]: Edit Transponder Database
 [M]: Multi-Satellite Tracking Mode     [Q]: Exit PREDICT

                 *  Ground Station Location Editing Utility  *



                        Station Callsign  : W1AW
                        Station Latitude  : 41.7169 [DegN]
                        Station Longitude : 72.7271 [DegW]
                        Station Altitude  : 25 [m]



            Enter the callsign or identifier of your ground station

You need to run wxtoimg once to accept the terms and conditions.

wxtoimg

You need to tell wxtoimg where your base station is at, so it can properly generate an overlay map. You do so by creating a file in your home directory named ~/.wxtoimgrc. In this file, North is positive, as with predict, however EAST is positive, which is the opposite of what predict uses. Make sure to adjust your values appropriately.

Using your favorite text editor, create a new file named ~/.wxtoimgrc and put the following text in the file, substituting your values:

Latitude: 41.7169
Longitude: -72.7271
Altitude: 25

Step 4: The Scripts

Now that you've got a working RTL dongle on your Raspberry Pi, it's time to actually make it receive some weather maps. Make sure your antenna is connected and located as best as possible. I've got mine mounted in my attic and it works fairly well from there. If you can mount it outside, that would be even better. Get it as high as possible.

We are going to need to create a few scripts to automate everything. This is where that Linux familiarity is going to come in.

First we'll create a couple directories to hold our files:

cd ~
mkdir weather
cd weather
mkdir predict
cd predict

Next we'll make the two scripts that kick off the scheduling. The first is 'schedule_all.sh'. This script will be called nightly at midnight. It downloads satellite pass information from celestrak and creates a TLE file for predict to use. Then it removes all AT jobs from the system, so no passes get double scheduled. Finally, it calls the second script 'schedule_satellite.sh' for each satellite we are interested in.

Using your favorite text editor, create a new file in ~/weather/predict named schedule_all.sh and put the following code in the file:

#!/bin/bash

# Update Satellite Information

wget -qr https://www.celestrak.com/NORAD/elements/weather.txt -O /home/pi/weather/predict/weather.txt
grep "NOAA 15" /home/pi/weather/predict/weather.txt -A 2 > /home/pi/weather/predict/weather.tle
grep "NOAA 18" /home/pi/weather/predict/weather.txt -A 2 >> /home/pi/weather/predict/weather.tle
grep "NOAA 19" /home/pi/weather/predict/weather.txt -A 2 >> /home/pi/weather/predict/weather.tle
grep "METEOR-M 2" /home/pi/weather/predict/weather.txt -A 2 >> /home/pi/weather/predict/weather.tle



#Remove all AT jobs

for i in `atq | awk '{print $1}'`;do atrm $i;done


#Schedule Satellite Passes:

/home/pi/weather/predict/schedule_satellite.sh "NOAA 19" 137.1000
/home/pi/weather/predict/schedule_satellite.sh "NOAA 18" 137.9125
/home/pi/weather/predict/schedule_satellite.sh "NOAA 15" 137.6200

The second script, 'schedule_satellite.sh', recurses through each pass of the given satellite for the current day. It determines if the maximum elevation is 20 degrees or greater. If it is, then it calculates the length of the pass, and schedules the recording and processing of the pass. If the maximum elevation is less than 20 degrees, the pass is ignored, as it generally won't produce a decent image.

Using your favorite text editor, create a new file in ~/weather/predict named schedule_satellite.sh and put the following code in the file:

#!/bin/bash
PREDICTION_START=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" | head -1`
PREDICTION_END=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" | tail -1`


var2=`echo $PREDICTION_END | cut -d " " -f 1`

MAXELEV=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" | awk -v max=0 '{if($5>max){max=$5}}END{print max}'`

while [ `date --date="TZ=\"UTC\" @${var2}" +%D` == `date +%D` ]; do

START_TIME=`echo $PREDICTION_START | cut -d " " -f 3-4`
var1=`echo $PREDICTION_START | cut -d " " -f 1`

var3=`echo $START_TIME | cut -d " " -f 2 | cut -d ":" -f 3`

TIMER=`expr $var2 - $var1 + $var3`

OUTDATE=`date --date="TZ=\"UTC\" $START_TIME" +%Y%m%d-%H%M%S`

if [ $MAXELEV -gt 19 ]
  then
    echo ${1//" "}${OUTDATE} $MAXELEV

    echo "/home/pi/weather/predict/receive_and_process_satellite.sh \"${1}\" $2 /home/pi/weather/${1//" "}${OUTDATE} /home/pi/weather/predict/weather.tle $var1 $TIMER" | at `date --date="TZ=\"UTC\" $START_TIME" +"%H:%M %D"`

fi

nextpredict=`expr $var2 + 60`

PREDICTION_START=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" $nextpredict | head -1`
PREDICTION_END=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}"  $nextpredict | tail -1`

MAXELEV=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" $nextpredict | awk -v max=0 '{if($5>max){max=$5}}END{print max}'`

var2=`echo $PREDICTION_END | cut -d " " -f 1`

done

When the time comes for a give pass to be recorded and processed, at kicks off the final script 'receive_and_process_satellite.sh'. When this script is called, it uses rtl_fm to receive the audio from the satellite pass, and sends that audio to sox for processing. Sox saves the audio to a file. Once the pass is complete, wxmap is called to generate an overlay map for the image. Finally, wxtoimg is called to generate the actual image and place the overlay map on it.

Using your favorite text editor, create a new file in ~/weather/predict named receive_and_process_satellite.sh and put the following code in the file:

#!/bin/bash

# $1 = Satellite Name
# $2 = Frequency
# $3 = FileName base
# $4 = TLE File
# $5 = EPOC start time
# $6 = Time to capture

sudo timeout $6 rtl_fm -f ${2}M -s 60k -g 45 -p 55 -E wav -E deemp -F 9 - | sox -t wav - $3.wav rate 11025

PassStart=`expr $5 + 90`

if [ -e $3.wav ]
  then
    /usr/local/bin/wxmap -T "${1}" -H $4 -p 0 -l 0 -o $PassStart ${3}-map.png

    /usr/local/bin/wxtoimg -m ${3}-map.png -e ZA $3.wav $3.png
fi

Once all three scripts have been created, we need to make the executable, by issuing the following commands:

chmod +x schedule_all.sh
chmod +x schedule_satellite.sh
chmod +x receive_and_process_satellite.sh

Now, the last step in automating the reception is to schedule the first script to run just after midnight. Run the following command:

crontab -e

It will open a text editor of your choice to edit the cron file. Simply add the following line to the bottom of this file and save:

1 0 * * * /home/pi/weather/predict/schedule_all.sh

Now, at 00:01 the schedule will start. (if you don't want to wait, simply run the following command once to kick the process off:)

/home/pi/weather/predict/schedule_all.sh

Step 5: Check Things Out

To see upcoming satellite passes that are scheduled to be processed, run the following command:

atq

Check the ~/weather directory for your results. Each pass will generate three files:

NOAA1820170105-181147-map.png  <-- Map overlay file
NOAA1820170105-181147.png      <-- The final image file
NOAA1820170105-181147.wav      <-- The raw audio file

The format of the file name is the satellite name, followed by the date (YYYYMMDD) and time (HHMMSS) of the start of the pass. There are several filters that wxtoimg can use when generating the image file. I've had different luck with different satellites and passes on each filter. Feel free to play around with wxtoimg on the original map and audio files and see what you come up with.

One thing to note, the receiver can only receive one satellite at a time. If two satellites are passing overhead at the same time, the first one to start recording will "win" and be recorded. The second recording will error out and stop.

Step 6: Some of My Results

26 People Made This Project!

Recommendations

  • Water Contest

    Water Contest
  • Creative Misuse Contest

    Creative Misuse Contest
  • Tiny Home Contest

    Tiny Home Contest

155 Discussions

If wxtoimg fails to run with the following error: "wxtoimg: error while loading shared libraries: libXft.so.2: cannot open shared object file: No such file or directory", then you need to run "sudo apt-get install libxft-dev" without quotes.

0
None
MattT140

Question 4 months ago

Hi all,

I'm using a Raspberry Pi 3 B+ with rabbit ear antennas connected with a RTL-SDR V3 dongle. Running the scripts gives me no errors. My problem is that no .wav files are recorded (or at least saved). I can't determine why this is, I've followed each step thoroughly and poured through the code to double check. Running GQRX, I do pick up the appropriate signals for each satellite as they pass, but again, it seems like nothing is happening during a pass. Any help would be appreciated.

3 more answers

Hello, I'm having the exact same problem.

Can you please point out what you did to debug your problems?

Thank you in advance.

The solution is actually simple, or it was in my case. I reinstalled Raspian from a fresh download and followed the instructions exactly as above. It worked perfectly after that. I had used my RPi for another project before this one, and I believe some of the dependencies and libraries were conflicting with one another preventing the capture and processing of the signals. Hope this helps!

Ignore this. I found a few of my issues. Hoping for good results on the next pass!

With a cheap enclosure from Amazon, a fairly inexpensive broadband pre-amp from AMSAT, and a QFH antenna, I'm getting great images at ground level.

IMG_0963.JPGNOAA19_MSA.jpg
2 replies

Looks great. I like the temperature-controlled fan you added. Would you be willing to share your components list?

No problem. Some of the parts I used are no longer available so I have substituted parts that might be of interest. Here's the list:

- National RF QFH antenna: http://www.nationalrf.com/satellite-tenna.htm

Note: Don't buy their pre-amplifier or DC coupler. Mine fried and appeared to be junk.

- BNC cable from antenna to enclosure bulkhead connector: https://amazon.com/gp/product/B00TCR8VUS

- Broadband preamp (or equiv): https://amazon.com/HiLetgo-0-1-2000MHz-WideBand-A...

- Cable from RTL-SDR to preamp: https://amazon.com/DHT-Electronics-coaxial-cable-...

- Connector from preamp to bulkhead: https://amazon.com/DHT-Electronics-2pcs-coaxial-adapter/dp/B00CVQLS98

- Raspberry Pi 3 Modem B+: https://www.amazon.com/gp/product/B07BDR5PDW

- 32 GB micro SD card: https://www.amazon.com/gp/product/B06XWN9Q99

- DIN rail mount for Raspberry Pi 3: https://www.amazon.com/DIN-Rail-Mount-Raspberry-3...

- DIN rail: https://www.amazon.com/20Pcs-Width-Slotted-Design...

- DIN rail clips for thermostat (or equiv): https://www.amazon.com/Penta-Angel-Mounting-Adapte...

- RTL-SDR receiver: https://www.amazon.com/gp/product/B009U7WZCA

- Bud Industries NBF-32016 Plastic ABS NEMA enclosure: https://www.amazon.com/gp/product/B005UPANU2

- Bud Industries NBX-32916-PL Plastic ABS internal panel: https://www.amazon.com/BUD-Industries-NBX-32916-P...

- Bud Industries air vents (qty. 2): https://www.amazon.com/gp/product/B00L3QTZRY

- BNC (Female-Female) bulkhead RF connector: https://www.amazon.com/2pack-Female-Bulkhead-Insul...

- Silicone weatherproofing tape for exterior RF connectors: https://www.amazon.com/F4-Tape-Self-Fusing-Silico...

- PowerPole 12 volt power splitter (or equiv) plus other PowerPole supplies: https://powerwerx.com/4-position-powerpole-distrib...

- 12 volt thermostat: https://www.amazon.com/gp/product/B00GFF5YXM

- 12 volt muffin fan: https://www.amazon.com/gp/product/B00Q7XB5AS

- 12 volt to 5 volt step-down converter: https://www.amazon.com/SMAKN-Converter-Power-Supp...

- Cable gland nuts (for power cable running into enclosure): https://amazon.com/gp/product/B01GJ03AUQ

0
None
Th_ell

4 weeks ago

On your Computer

Download "wxtoimg-armhf-2.11.2-beta.deb" from
https://1drv.ms/u/s!Ao_6JlAxbIUT4Xda2xYInhnuR2kj
Using the password..… "password" Clever yes no? (read that last bit in a Russian accent)

Stick it on a usb drive and move it to the Pi
Place the "wxtoimg-armhf-2.11.2-beta.deb" in "/home/pi/"
Open a terminal window (we are using the built in gui because we are not fascist)
Type the command "cd ~" Note that's ~ with the shift held down not `
Type "sudo dpkg -i wxtoimg-armhf-2.11.2-beta.deb"
Resume the original Instuctions at Step 3

i dont understand copy over .deb file with filezilla ......... newguy

basically use anything to move this file "wxtoimg-armhf-2.11.2-beta.deb" I used a usb drive, I did my setup threw the Pi GUI because. Why would I not? Everyone tells use to SSH, and that cool and all. but completely unnecessary. So just put it on a usb drive and move it onto the Pi.

Download "wxtoimg-armhf-2.11.2-beta.deb" from

https://1drv.ms/u/s!Ao_6JlAxbIUT4Xda2xYInhnuR2kj

Using the password..… "password" Clever yes no? (ready that last bit in a Russian accent)

Place the "wxtoimg-armhf-2.11.2-beta.deb" in "/home/pi/"

Open a terminal window (we are using the built in gui because we are not fascist)

Type the command "cd ~" Note that's ~ with the shift held down not `

Type "sudo dpkg -i wxtoimg-armhf-2.11.2-beta.deb"

Resume the original Instuctions at Step 3

Hi,

Could you please show how you get it from the Google Drive and put it on to the PI. You need to remember that some of us aren't up to speed with thing like this, we need a little more detail on how things are done or how you get to the end point.

If you could just put any code that you use on here so we can then all follow along.

cheers :)

0
None
Th_ell

Question 4 weeks ago

How do I fix, Schedue_Satellite.sh is throwing up this.

date: invalid date 'TZ="utc" @'

/home/pi/weather/predict/schedule_satelllite.sh: line 10: [: ==: unary operator expected

date: invalid date 'TZ="utc" @'

/home/pi/weather/predict/schedule_satelllite.sh: line 10: [: ==: unary operator expected

date: invalid date 'TZ="utc" @'

/home/pi/weather/predict/schedule_satelllite.sh: line 10: [: ==: unary operator expected

I'm tearing out my hair here. I copied and pasted it. I can't have fu**ed it up because I didn't type any of it!

How much diskspace does it need when generating the images?

0
None
n6vmo

2 months ago

This project's instructions worked flawlessly on my two Pi 3's. The first Pi was connected to a discone antenna and the second Pi to my QFH. Both antennas were placed next to each other at ground level, not very optimum, but good enough to run
comparison tests. The results of the QFH are phenomenal. Bulid one if
you have the chance, it's worth the time and effort.

I installed Apache2 and configured it to use port 8080 and added the NOAA directory
to /var/www/html (ex. /var/www/html/NOAA). Then I modified
receive_and_process_satellite.sh script to perform some extra tasks such
as:

1. Removing old satellite images from /var/www/html/NOAA

2. Rename and copy the current satellite images from /home/pi/weather to /var/www/html/NOAA

3. Remove all satellite .png and .wav files from /home/pi/weather

Modified receive_and_process_satellite.sh :

#-------------------------------------------------------------------------

#!/bin/bash

# $1 = Satellite Name
# $2 = Frequency
# $3 = FileName base
# $4 = TLE File
# $5 = EPOC start time
# $6 = Time to capture

sudo timeout $6 rtl_fm -f ${2}M -s 60k -g 45 -p 55 -E wav -E deemp -F 9 - | sox -t wav - $3.wav rate 11025

PassStart=`expr $5 + 90`

if [ -e $3.wav ]
then
/usr/local/bin/wxmap -T "${1}" -H $4 -p 0 -l 0 -o $PassStart ${3}-map.png

/usr/local/bin/wxtoimg -m ${3}-map.png -e ZA $3.wav $3.png
/usr/local/bin/wxtoimg -m ${3}-map.png -e NO $3.wav ${3}.NO.png
/usr/local/bin/wxtoimg -m ${3}-map.png -e MCIR $3.wav ${3}.MCIR.png
/usr/local/bin/wxtoimg -m ${3}-map.png -e MSA $3.wav ${3}.MSA.png

# Delete old satellite image files from www directory
sudo rm /var/www/html/NOAA/*.*

# Copy, rename current files to www directory
sudo cp /home/pi/weather/NOAA*.png /var/www/html/NOAA/current.png
sudo cp /home/pi/weather/NOAA*.NO.png /var/www/html/NOAA/current.NO.png
sudo cp /home/pi/weather/NOAA*.MCIR.png /var/www/html/NOAA/current.MCIR.png
sudo cp /home/pi/weather/NOAA*.MSA.png /var/www/html/NOAA/current.MSA.png

# Delete old .png and .wav files from weather directory
sudo rm /home/pi/weather/*.png
sudo rm /home/pi/weather/*.wav

fi

#------------------------------------------------------------

Browsing locally to 192.168.x.x:8080/NOAA will serve up the images and I can
also view them from anywhere that I have internet access by configuring
my router to port forward requests to the RPi.

I can't wait to move this project to our amateur radio club facility with a 360 deg., horizon to horizon view of the sky.

Here is my little modification to schedule_satellite.sh to begin to record when sat is at 10º:

#!/bin/bash
PREDICTION_START=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" | awk '{ if($5>=10) print $0}' | head -1`
PREDICTION_END=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" | awk '{ if($5>=10) print $0}' | tail -1`

var2=`echo $PREDICTION_END | cut -d " " -f 1`

var4=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" | tail -1 | cut -d " " -f 1`

MAXELEV=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" | awk -v max=0 '{if($5>max){max=$5}}END{print max}'`

while [ `date --date="TZ=\"UTC\" @${var4}" +%D` == `date +%D` ]; do

START_TIME=`echo $PREDICTION_START | cut -d " " -f 3-4`
var1=`echo $PREDICTION_START | cut -d " " -f 1`

var3=`echo $START_TIME | cut -d " " -f 2 | cut -d ":" -f 3`

TIMER=`expr $var2 - $var1 + $var3`

OUTDATE=`date --date="TZ=\"UTC\" $START_TIME" +%Y%m%d-%H%M%S`

if [ $MAXELEV -gt 19 ]
then
echo ${1//" "} `date --date="TZ=\"UTC\" $START_TIME" +%d/%m/%Y" "%H:%M:%S` Max Elev: $MAXELEV >> /home/pi/weather/predict/pases.txt
echo "/home/pi/weather/predict/receive_and_process_satellite.sh \"${1}\" $2 /home/pi/weather/${1//" "}${OUTDATE} /home/pi/weather/predict/weather.tle $var1 $TIMER" | at `date --date="TZ=\"UTC\" $START_TIME" +"%H:%M %D"`

fi

nextpredict=`expr $var4 + 60`

PREDICTION_START=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" $nextpredict | awk '{ if($5>=10) print $0}' | head -1`
PREDICTION_END=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" $nextpredict | awk '{ if($5>=10) print $0}' | tail -1`

MAXELEV=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" $nextpredict | awk -v max=0 '{if($5>max){max=$5}}END{print max}'`

var2=`echo $PREDICTION_END | cut -d " " -f 1`

var4=`/usr/bin/predict -t /home/pi/weather/predict/weather.tle -p "${1}" $nextpredict | tail -1 | cut -d " " -f 1`

done

2 replies

Hello, I have tried your modification of the file -schedule_satellite.sh-, copy the code and replace the original, but when I run the file schedule_all.sh so that all the tasks are executed it jumps an error that says - syntax error

I think problem is with copy and paste.

Send me an email and i will attach it.

runahue at gmail dot com