In the past, I've talked about the RS92-SGP radiosonde launched from Madrid-Barajas. Recently, Barajas has replaced the RS92-SGP with the newer Vaisala RS41-SGP (except for ozone sounding, which is is still done with the RS92). The new radiosondes transmit at 401MHz and are released daily at 11:15 and 23:15 UTC.
In that post, I described about how to receive the position data from the RS92 and plot it in Viking in real time. Since then, a few features such as FEC decoding have been added to the RS decoder software, so I have decided to give this a go again with the newer RS41. This will be a complete walk through, since some people are interested in setting up unattended decoders, perhaps running on a Raspberry Pi.
First we download and compile the decoder as follows.
git clone https://github.com/rs1729/RS cd RS/rs41/ ln -s ../ecc/bch_ecc.c bch_ecc.c gcc rs41ptu.c -O2 -lm -o rs41ptu
Now we set up GPSd to read NMEA data from a pipe, as we did for the RS92:
mkfifo /tmp/gps sudo chmod 666 /tmp/gps sudo gpsd /tmp/gps
Finally, we use SoX to record and filter the FM-demodulated audio and pipe it into the decoder. A Perl script is used to convert the output of the decoder to NMEA, which is piped into GPSd. This Perl script had a bug (it converted incorrectly positions west of Greenwhich and south of the equator), but my bugfix has been already merged into upstream.
rec -t wav -r 48000 - 2>/dev/null | \ sox - -t wav - lowpass 2800 | \ ./rs41ptu --ecc --crc -i | \ ../rs92/pos2nmea.pl > /tmp/gps
You may or may not need to use the
-i option with
rs41ecc depending on whether your receiver is frequency inverting.
The line above assumes that you use an FM receiver with its audio output connected to the computer's sound card. It can also be used with any SDR software if you use snd-aloop or pulseaudio to send the audio from the SDR software to
rec. A popular alternative is to use an RTL-SDR. In this case, one can use rtl_fm as follows:
rtl_fm -f 401e6 -g 20 -s 48e3 - | \ sox -t s16 -r 48000 -c 1 - -t wav - lowpass 2800 | \ ./rs41ptu --ecc --crc -i | \ ../rs92/pos2nmea.pl > /tmp/gps
Then any program that supports GPSd can be used to plot the position of the radiosonde in real time. For instance, we can use Viking. To start the tracking in Viking, we right click in the list of layers, select New Layer > GPS, then go to the Realtime Tracking Mode tab and click OK.
The tracking I have done today is shown below.
Another common activity when tracking radiosondes is to feed the position into the APRS-IS network. To do this, I have made a Perl script that makes APRS packets with the output of the decoder. The packets are then sent to the APRS-IS network using netcat.
The position is reported as an APRS object using the radiosonde callsign as the object's callsign. This is much better than using APRS position packets, which is what sm2aprs does. For instance, you only get one object in the map even if several people are tracking and reporting the radiosonde at the same time.
The APRS reporter can be run as follows:
rec -t wav -r 48000 - 2>/dev/null | \ sox - -t wav - lowpass 2800 | \ ./rs41ptu --ecc --crc --ptu -i | \ ../rs92/pos2aprs.pl CALLSIGN passcode "Radiosonda AEMET LEMD" | \ nc rotate.aprs2.net 14580 > /dev/null
(You can also use
rtl_fm instead of
rec). Please replace in the command line above
CALLSIGN with your own Amateur radio callsign and
passcode with your APRS-IS passcode. You can find your passcode here. Also substitute the comment "Radiosonda AEMET LEMD" by a suitable one if you are tracking a radiosonde other than the ones released from Barajas.
This also reports the temperature of the radiosonde in the APRS comment. The rest of the meteorological variables are not supported by the decoder.
You can view the results of my tests of sending the data to the APRS-IS network here.