Introduction: Raspberry Pi NOAA Weather Satellite Receiver

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

Picture of Some of My Results

Comments

rgrokett made it! (author)2017-12-12

For those wanting a simpler antenna than the usual QFH or crossed-dipole, be sure to check out https://www.rtl-sdr.com/simple-noaameteor-weather-...

This works pretty decent for me, (mounted outside at 15ft, fed by 25ft of standard RG-6 CATV coax.)

ALSO: there is a definite difference in the image quality with different RTL-SDRs. I find the aluminum packaged RTL-SDR.com and NOOELEC SMART SDRs are good.

RubenN27 (author)2017-12-12

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

DamianN10 (author)2017-09-05

does anyone know how to fix this

pi@raspberrypi ~/weather/predict $ /home/pi/weather/predict/schedule_all.sh

date: invalid date ‘TZ="UTC" @’

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

date: invalid date ‘TZ="UTC" @’

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

date: invalid date ‘TZ="UTC" @’

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

Alzibiff (author)DamianN102017-10-31

Did you ever get a fix for this? For some reason, this error appears every time I run the script now but all was OK a couple of days ago. The only change has been moving the clocks back here in the UK ..... sounds silly and must be totally unrelated as I have my RPi set to UTC time anyway. This is a very frustrating error! I get the weather.txt file OK.

Alan

Alzibiff (author)Alzibiff2017-10-31

After a lot of head scratching, googling and trying out changes to different scripts, I discovered that if I type:

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

I get all of the errors described and nothing after issuing an atq command. However, if I leave out the sudo, all appears to work. I can now get a list of at jobs and see a job list with the atq command. Not a clue why this happens as I thought being a superuser gave me powers, not take them away! Ho humm.

Now what I would like to do is see what exactly each job does - the script which will happen at a given time and date. I tried this:

at -c <job number>

after doing some googling but I end up with a lot of unintelligible 'stuff' and not the commands I was expecting. However, this is a Rasbian/Linux thing I guess and I will have to plough on .... unless anybody here can help :-)

Alan

vallip (author)Alzibiff2017-12-11

Alan,

did you figure this one out .... after some days of no problems I am getting this issue.

Kind Regards

Vallip P

Alzibiff (author)vallip2017-12-11

Vallip P,

Yes and no! When I looked at what the "at -c <job number>" actually returned, I saw the lines I was expecting at the end of all what remains to me as unintelligible 'stuff'.

I now have my system running as I originally wanted it but the signals I am getting now are nowhere near as good as those I got in the summer months for some reason. My set up in terms of antenna placement is definitely not the best but as good as I can get it for my specific location. I am collecting data for every satellite pass which reaches a minimum of 35 degrees elevation and automatically uploading them to a webpage which appears here: http://www.thefullpicture.co.uk/index.php/noaa-pr...

As said, results of some of the passes are awful so I delete the ones which I am particularly unhappy with from time to time. I will persist with this for the foreseeable future though and see if things improve on their own - as the seasons progress.

Alan

vallip (author)2017-12-11

Hello All,

Now after a few days of no problem operation I am getting the time zone error.

Did anyone solve this ?

I have tried most of the recommendations here below but no luck so far.

Please shear if you have figured this one out.

Kind regards

Valli P

JenniferL276 (author)2017-05-30

Hello, I have been seeing your work on APT capture. I am trying to receive the signal with a raspberry 3 and I haven't get a good signal yet. I had some problems with rtl_fm command .

I could probe that using a low bandwidth (with -s) and some gain values distort APT signal. It is so weird. Also, if I worked with sox and rtl_fm on the same line, I had problems. Finally, I installed the last version of rtl-sdr (keenerd) and I could use sox and rtl_fm on the same line. I had to update kernel of raspberry too.

This is the line with which I have gotten better results: timeout 900s rtl_fm -f 137.620M -s 40k -g 30 -p 47 -E wav -E deemp -F 9 - | sox -t wav - NOAA15_170530_083246.wav rate 11025.

However, I receive yet a signal with bad signal to noise rate. When I capture a satellite pass with SDR# and my PC on Windows, the results are perfect, so the antenna and connectors are ok. I don't know which is the problem on raspberrypi and rtl_fm of keernerd.

Any idea to try?? I have try a lot of things!

Thank you very much!

MichaelB738 (author)JenniferL2762017-06-15

I had similar challenges the first time I set this up. I was using Rpi2 at the time. I tried a few settings as you have and at one point was successful in adding the -M wbfm setting to the line in the script. At one point, however I started over with a clean image and walked through the setup just as shown in the video. I was able to run the script just as written. I believe the first time I tried this I had made a mistake in a script. My images from the initial setup are in the comments below. Now I'm running this on Rpi3 exactly as the scripts are written. The only change is that I added extra lines to process color images and I wrote in commands to delete map and wav files once processing is complete. Everything works perfectly and I have captured hundreds of images.

vallip (author)MichaelB7382017-12-02

Hello Michael,

can you shear the code you did to delete the two files once used.

Kind Regards

VP

MichaelB738 (author)vallip2017-12-04

I added this to the script titled 'receive_and_process_satellite.sh'. I added it to the very end after the last line of code.

# Delete Map Files, wav files and move images to folder

cd /home/pi/weather

rm *-map.png

rm *.wav

mv *.png /home/pi/weather/images

cd ~

Basically it will first change directory (CD) to the home/pi/weather directory. Next it will remove (rm) all files with -map.png in the file name. next it removes the wav files. Finally I created a separate folder to hold the images within the weather folder. the next line moves(mv) the remaining .png files to that folder. Finally the last line just moves back to the home directory. This step may not be necessary. Basically if you do everything except the last 2 lines it should only leave your processed images in the weather folder. Sometimes if I want to keep the wav files, I place a # in front of the line with 'rm *.wav' and this will leave them for me to download and review as needed.

Hopefully this will help.

MB

vallip (author)MichaelB7382017-12-06

:) super thanks for this ..... makes house keeping much simpler

MichaelB738 (author)vallip2017-12-06

Here is something that might also be of interest to you. https://www.reddit.com/r/RTLSDR/comments/5iuzbl/fully_automated_raspberry_pi_noaa_satellite/ This link has some details about setting up a receiver. The part I used is a setup to automatically upload the images from the rPi to a dropbox location. It takes a bit to get it setup but once it is going it is a nice feature. I have mine running this way and it now sends my files up to the dropbox automatically so they are stored there. I can now see them from any location and I can just delete the images that are not good. It also avoids filling up the space on the rPi when I am not home to clean off the files.

vallip (author)MichaelB7382017-12-09

It looks like the instructions are no longer there, I would really like to know how to move files to dropbox or google drive as I am setting up a dakboard.com to display my received images.

vallip (author)MichaelB7382017-12-07

Super .... thanks for the link, will give this a try.

I am currently playing with an LNA and a band-pass filter ... with no luck what so ever :( ....get absolutely nothing with it hooked up, think it's the cheep LNA.

Kind regards

Valli

vallip (author)MichaelB7382017-12-09

I have been trying this out but with no luck .... nothing is moved or deleted :( any idea what I am doing wrong here, I followed your instructions wxcactly

vallip (author)2017-12-08

Hello guys

I have been playing with this and yesterday I set up the code to get the color images. I am getting some nice once but most of my received images now look like this.

Any idea what is going on here ?

LiborL1 made it! (author)2017-04-30

Hi,

Good work thanks!

dunky77 (author)LiborL12017-06-01

Hello,

How did you do to get this false color images?

Thanks.

Regards,

LiborL1 (author)dunky772017-06-01

Hi,

change in receive_and_process_satellite.sh

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

to

/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

vallip (author)LiborL12017-12-07

Hello LiborL,

How are the color images created, do you have a link to a web page or something that explains this in more detail.

I have inserted the 3 lines but would like to know more about what is going on :)

Kind regards

Valli

dunky77 (author)LiborL12017-06-01

Awesome, thank you LiborL1 (results below)

cbullock29 (author)2017-12-05

I made it an am testing it to see if I giot my gps coordnates right

cbullock29 (author)2017-12-04

by any chance do you have saved the entire image that you used so you could post it here or git hub?

Alzibiff (author)2017-10-26

This is exactly what I have been trying to achieve - thank you. Although everything appears to work as it should, I am getting way too long a record time via the PREDICT program - I don't get a decent signal in my location for quite some time after the recording starts and the recording continues for quite some time after the signal has disappeared. This gives WXTOIMG some problems as the audio file is full of noise at its start and finish. My windows settings for WXTOIMG work well when I have a start and finish recording value of 10 degrees for the satellite elevation. Is there some way of delaying the recording for 5 minutes or so after PREDICT tells it to start and finish recording a similar time before PREDICT tells it to stop? (I tried to work out how to amend the scripts for this but without success). Alternatively, is it possible to run WXTOIMG in its GUI form and have it fed from SOX somehow, using PREDICT simply to change the RTL-SDR frequency?

I have been receiving images up to now using a Windows10 machine but would like to set up an automated stand alone base station in the garden - will avoid having an antenna cable trailing into the house which will keep everybody happy :-)

RubenN27 (author)Alzibiff2017-12-04

i need the same: i want begin to save at 10º and stop at 10º.

Could you modify script to do it?

RubenN27 made it! (author)2017-12-04

A lot of thank's for your GREAT DOC.

Please: How can i begin to save pass when sat is over 10º?

And stop when sat is at 10º?


A lot of thank's

pogges (author)2017-10-03

hallo from germany

only
one problem: i can hear the noaasignal in the wav. upcoming louder and
louder but the signal stops at ~3 min . now its still, nothing. but
receiving going on.

maybe some one can help me

regards pogges

jvmunro (author)pogges2017-11-21

Hi,

Trouble is most likely with the -F 9 option in the receive_and_process_satellite.sh script. Try -F 0. -F 9 is still work in progress. I had this trouble also.

Cheers

jvmunro (author)jvmunro2017-11-22

On further testing, it might be wise to remove the -F option completely. At least for a Pi 2. Excellent instructable/tutorial. Thanks!

mikemontana (author)2017-11-21

I'm also getting the common issue "./schedule_satellite.sh: line 13: [: ==: unary operator expected" -- I've added set -x to the schedule_satellite.sh see the debug output, and get this:
[I have set my tz to UTC and have rebooted - same issue. I have deleted the weather.* files, and regenerated... ] -- What am I missing? This is a Pi3

pi@raspberrypi:~/weather/predict $ ./schedule_satellite.sh "NOAA 19" 137:1000
++ /usr/bin/predict -t /home/pi/weather/predict/weather.tle -p 'NOAA 19'
++ head -1
+ PREDICTION_START=
++ /usr/bin/predict -t /home/pi/weather/predict/weather.tle -p 'NOAA 19'
++ tail -1
+ PREDICTION_END=
++ echo
++ cut -d ' ' -f 1
+ var2=
++ /usr/bin/predict -t /home/pi/weather/predict/weather.tle -p 'NOAA 19'
++ awk -v max=0 '{if($5>max){max=$5}}END{print max}'
+ MAXELEV=file
++ date '--date=TZ="UTC" @' +%D
date: invalid date âTZ="UTC" @â
++ date +%D
+ '[' == 11/22/17 ']'
./schedule_satellite.sh: line 13: [: ==: unary operator expected

ColetonR (author)2017-11-12

I followed everything before this, but ended up getting this error. Why did I get this, and what do I do?

root@DietPi:~# wxtoimg

wxtoimg: error while loading shared libraries: libXft.so.2: cannot open shared object file: No such file or directory

WayneN19 (author)2017-10-20

I think these error as I describe are due to running a GUI version of WXtoimg and the raspbery pi doesn't have virtual audio drives installed when these scripts are actually running via command line they are working on the file being passed to it. So the errors I discribed are irrelevent to this discoussion.

danieladkin (author)2017-10-16

Has this issue been resolved? im getting the same problem but cannot find out how to sort it out,

danieladkin (author)2017-10-16

Has this issue been resolved, any info on how to resolve it?

danieladkin (author)2017-10-16

Im getting the same problem.Rasbian stretch with desktop september 2017. tried twice with a new image, any news on this issue?

RobWilt (author)2017-08-23

I am an absolute beginner in programming, but I have followed the instructions built the aerial and now it appears that I have files as expected in the weather directory. My frustration now is how to view the images? Sorry if this is so basic and I am looking to improve my programming skills but do I have to run some software to view these, or is there a way of copying these files to my pc where I can run the WXTOIMG software? Thanks for any help offered.

WayneN19 (author)RobWilt2017-10-06

I use winSCP to copy the files to my windows desktop.

RobWilt (author)WayneN192017-10-06

Thanks for the reply. Yes I found winSCP and I have been using it. Very straightforward and it does the job.

hihelppls (author)2017-08-04

I got this error when I ran schedule_all.sh

pi@raspberrypi ~/weather/predict $ /home/pi/weather/predict/schedule_all.sh

date: invalid date ‘TZ="UTC" @’

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

date: invalid date ‘TZ="UTC" @’

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

date: invalid date ‘TZ="UTC" @’

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

do you have any suggestions?

WayneN19 (author)hihelppls2017-10-06

Set you time to UTC and reboot.

hihelppls (author)hihelppls2017-08-04

fixed, it was a glitch in wget, i used

curl https://www.celestrak.com/NORAD/elements/weather.... -o /home/pi/weather/predict/weather.txt

in schedule_all.sh instead of the wget line

CarlP56 (author)hihelppls2017-09-02

Made the curl change but still get the invaild time error. and nothing shows the atq. any help?

Jocke Lind (author)CarlP562017-09-10

Same problems. Any solutions?

rgrokett (author)Jocke Lind2017-10-06

I saw same invalid date error. Found that weather.tle file was empty. Reran schedule_all.sh again and saw that weather.txt and weather.tle was now populated. Suspect wget failed first time.

You can add the following to the schedule_satellite.sh: to turn on debug:
#!/bin/bash

set -x

Then run the schedule_all.sh and see if you see PREDICTION_START and PREDICTION_END populated:

+ PREDICTION_START='1507371700 Sat 07Oct17...
+ PREDICTION_END='1507371968 Sat 07Oct17...

marty_oc made it! (author)2017-10-05

Perfect tutorial, thank you. I made it without problems.

The only caveat I did not respect - you really need to build rtl-sdr from scratch from keenerd git repository to support RIFF format.

rhysun (author)2017-09-28

A perfect Instructable! Thank you.

Works perfectly with a Pi Zero W powered by an old phone charger! I've also installed a HTTP server (Apache)...

sudo apt-get install apache2

... so I can access the images from any connected device in the house. The only thing is that the recording sometimes gets corrupted if someone tries to access the image while rtl-fm is working - this probably would not be a problem with a Pi3. I've worked around this by disabling Apache while a satellite pass is in progress. In 'receive_and_process_satellite.sh' I added...

sudo apache2ctl stop

... just before the line that begins like this...

sudo timeout $6 rtl_fm...

... and then...

sudo apache2ctl start

Then, just after the line that begins with...

/usr/local/bin/wxtoimg...

... add this...

LatestImage=`ls -t /home/pi/weather/*.png | head -n1`

sudo cp $LatestImage /var/www/html/

... to copy the latest image to the Apache html directory. Delete 'index.html' from that directory and Apache will automatically make a page with a list of all the image files in that directory - very easy and very convenient :-)

bobby999 (author)2017-09-28

I seem to have it all working except I only get 2 files for each pass.

The Final image file is missing.

I get the Map overlay and the raw audio file but no final image file.

What has gone wrong ?

Lasse-1 (author)2017-06-04

Hi, I made it but a funny thing is that the ###-map.png is upside down..

Any tips ?

About This Instructable

14,121views

50favorites

License:

Bio: I'm a ham, a tinker, a maker. I like interesting things. I'm a technophile, a wood turner, and a pen maker.
More by haslettj:Raspberry Pi NOAA Weather Satellite ReceiverAir Choke (Ugly Balun) for Ham RadioDrill Precise Holes for Mounting Electronics Controls and Boards
Add instructable to: