A radiosonde is a
small weather sensor package that is typically attached to a
weather balloon.
As it rises into the atmosphere it measures parameters such
as temperature, humidity, pressure, GPS location etc, and
transmits this data back down to a receiver base station
using a radio signal.
Zilog's RS-Decoders
is a free open source radiosonde decoder for
Windows/Linux and it supports a wide range of radiosonde
protocols.
Together with an RTL-SDR it is possible to receive
radiosonde signals, and decode them using RS-Decoders.
This tutorial
covers some tricky points like setting up Virtual audio
piping in Windows, and getting the GPS data to route with
perl to into virtual COM port to use with GPS programs.
In this example Windows 10 1909 in VirtualBox is used with
GPS-Mouse, RTL-SDR V3 / Airspy R2 SDR radio, SDR#,
SDRConsole and APRS-Map Software.
Install x32 Software version´s for 32 Bit Windows (XP/7 ect)
and offcourse x64 for 64 Bit Windows.
A new develop
branch is active 'experimental' demodulation chains, which
use David Rowe's FSK Demodulator to enable better tracking
of drifty sondes.
It is expected that the new experimental demod chain will
have a slightly higher CPU usage than the legacy chains,
though the exact impact is minimal.
These demodulators are intended for use in situations where
radiosonde frequency drift is encountered, E.g. DFM's.
Refer to these tech-note's for details:
https://github.com/projecthorus/radiosonde_auto_rx/blob/master/auto_rx/test/notes/2019-04-26_fsk_demod.md
https://github.com/projecthorus/radiosonde_auto_rx/blob/master/auto_rx/test/notes/2019-04-23_rs41_highpass.md
- Overview
- 1.1 Compile Decoders
- 1.2 Decoder Script's
- 1.3 Setup
Virtual Audio/COM Ports
- 1.4 SDR Radio Programs
- 1.5 GPS Setup
- 1.6 Get it all running
- 1.7 APRS-Map
- 1.8 ADB Android USB GPS
- 1.9 Android
WiFi GPS
- 2.0 WSL and SDR
- 2.1 WSA and SDR
Download Decoders and Script
Updated compiled RS-Decoders are overhere.
Unzip rs.zip and move to C:
Note:
All scripts are having output to com3 (pos2nmea.pl 2>COM3) <<-- change this if you have another port number!
Audio device is named "CABLE Output" in all script's!
When compiling also put pos2nmea.pl (NMEA perl script) in the decoder folder!
The perl script from GIT in folder RS/tools is only for Linux Usage.
Use the one above linked in rs.zip adapted for Windows NMEA!
Or create manually, RS-Decoders can be compiled with cygwin.
Download the decoders source files,
https://github.com/rs1729/RS/archive/master.zip
Unzip:cd build/demod/mod
gcc -c demod_mod.c -w -O3
gcc -DCYGWIN -c bch_ecc_mod.c -w -O3
For RS-41:
gcc -DCYGWIN rs41mod.c demod_mod.o bch_ecc_mod.o -lm -O3 -o rs41mod -w
DFM:
gcc -DCYGWIN dfm09mod.c demod_mod.o -lm -O3 -o dfm09mod -w
M10, 20:
gcc -DCYGWIN m10mod.c demod_mod.o -lm -O3 -o m10mod -w
gcc -DCYGWIN mXXmod.c demod_mod.o -lm -O3 -o mXXmod -w
Example
DFM09 Script:
Create new file dfm09.bat with content:
@echo offSET sox_path="C:\Program Files (x86)\sox-14-4-2\"
SET tail_path="C:\RS\decoders\"
SET perl_path="C:\Strawberry\perl\bin\"
SET dfm_path="C:\RS\decoders\"
%sox_path%sox.exe -q -t waveaudio "CABLE Output" -t wav - 2>nul | %dfm_path%dfm09mod.exe --dist --ptu -vv --auto >> C:\RS\log\dfm09_%date:~-4,4%%date:~-7,2%%date:~-10,2%.txt | %tail_path%tail.exe -f C:\RS\log\dfm09_%date:~-4,4%%date:~-7,2%%date:~-10,2%.txt | %perl_path%perl.exe pos2nmea.pl 2>COM3
Save it.
Example RS-41
Script:
Create new file rs41.bat with content:
@echo offSET sox_path="C:\Program Files (x86)\sox-14-4-2\"
SET tail_path="C:\RS\decoders\"
SET perl_path="C:\Strawberry\perl\bin\"
SET rs41_path="C:\RS\decoders\"
%sox_path%sox.exe -q -t waveaudio "CABLE Output" -t wav - 2>nul | %rs41_path%rs41mod.exe --ecc2 --crc -vx --ptu >> C:\RS\log\rs41_%date:~-4,4%%date:~-7,2%%date:~-10,2%.txt | %tail_path%tail.exe -f C:\RS\log\rs41_%date:~-4,4%%date:~-7,2%%date:~-10,2%.txt | %perl_path%perl.exe pos2nmea.pl 2>COM3
Save it.
What does it all mean.
rs41mod -h
rs41mod [options] audio.wav
options:
-v, -vx, -vv (info, aux, info/conf)
-r, --raw
-i, --invert
--ths <x> (peak threshold; default=0.7)
--iq0,2,3 (IQ data)
dfm09mod -h
dfm09mod [options] audio.wav
options:
-v, -vv
-r, --raw
-i, --invert
--ecc (Hamming ECC)
--ths <x> (peak threshold; default=0.6)
--json (JSON output)
--ecc2 now also gives the output after each block how many bits the error correction has corrected.
--ptu temperature Info
--dist is like ecc, but only blocks that belong to the same frame are taken, i. if errors occur, the frame is discarded / Inversed used for DFM06/90
Download the windows version of sox and install.
Download Virtual Audio Cable and install.
Open VB-Audio Control Panel in options change Internal Sampling rate to 48000 Hz and reboot.
Download Com0Com x64 Program.
Install:
Make sure you have a virtual com port, otherwise change the number.
All scripts are having output to com3 (pos2nmea.pl 2>COM3) <<-- change this if you have another port number!
If everything is okay you have 2 new virtual COM ports in Windows Control Panel.
Download Perl x64 and install:
http://strawberryperl.com/releases.html
Needed for NMEA Perl Script for GPS Output.
SDR#:
https://airspy.com/download/
SDR Console:
https://www.sdr-radio.com/Software
Download SAS-Planet GPS or use any favorite program.
http://www.sasgis.org/download/
SAS-Planet is free software with many Maps.
Minor is the city names from only Google Maps are displayed in Russian text.
We can change that, goto SAS.Planet\Maps\sas.maps\Google folder.
Inside each map folder is a params.txt except for the GoogleSat folder.
Find ru in the url link and change it into en example: DefURLBase=http://mt.google.com/vt/lyrs=m@169000000&hl=en
Remove SAS.Planet\cache and the maps are English.
Start your favorite SDR Software, make sure The [MME]CABLE Input is selected in Audio Options.
Tune into the Radiosonde signal.
Start the shortcut of the Decoder.bat.
Start SAS-Planet, goto GPS Tab and Select the correct serial COM port, Rate is always 4800 Baud.
Change device timeout to 6000 = Max.
Push the sat-icon and GPS should be connected and gives a current position of the radiosonde.
In Offline Maps, without the need to sent data over the APRS Network.
Download APRS-Map for Windows:
http://wiki.oevsv.at/index.php?title=DXL_-_APRSmap_Download
Setup GPS:
Make sure you have the right COM Port number the GPS is connected to.
And replace this by the com1 example.
Make a gps.bat file and insert:
gps2aprs.exe -t com1:4800 -I CAR -i /k -D -0 30 -b 2 -v -r 127.0.0.1:9002
gps2aprs -h
-t <tty>:<baud> (com1:4800)
-I <mycall> Mycall with SSID like NOCALL-15
-D DAO Extension on for 20cm Resolution
-b <s> Driving Beacon Time in Seconds (15)
-r <x.x.x.x:destport> Use AXUDP (to Soundmodem)
-v Verbous-Mode
-i Ballon /O, Car /> -i /k
Start gps.bat and NMEA data from your local GPS-Mouse should roll in:
Start SDR, Decoder on the Radiosonde and APRS-Map.
Goto Config / Rf-Ports Tab:
Check RF-Port 1 and make sure its UDP1(ip:send:listen)|1|127.0.0.1:9001:9002
It is also possible to use the NMEA output of the RS-Decoders and feed data into APRSMap via UDP thru the Perl pos2aprs script.
-U UDP Ip and Port.
-d generates APRS frames with DAO (and thus finer position resolution).
-i Sonde ID E.g. i-Met.
POS2APRS:
Download: https://github.com/dl9rdz/RS/blob/master/tools/pos2aprs.pl
Example scripts RS-41 and DFM:
sox.exe -q -t waveaudio "CABLE Output" -t wav - 2>nul | rs41mod.exe --ecc2 --crc -vx --ptu | perl.exe pos2aprs.pl WIN10 0 _RS41 -d -U 127.0.0.1:9002
sox.exe -q -t waveaudio "CABLE Output" -t wav - 2>nul | dfm09mod.exe --ecc --ptu -v --auto | perl.exe pos2aprs.pl WIN10 0 _DFM09 -d -U 127.0.0.1:9002
The Radiosonde position should be Visible and every 30 Seconds the CAR Position will be updated.
All stuff running SDR#, RS-Decoder, APRS-Map, RadioSonde output and Own GPS Position plotted on the Map:
Note's:
Fill in a callsign with optional SSID and QTH Location from the Online Menu.
Zoom to your QTH as far as you can 100% identify your home (zoom level <16).
Then open ONLINE - MY POSITION and point to your home.
While push and hold the SHIFT key click on your home.
The coordinates will be copied into the MY POSITION field, Just click OK to save them.
Aprsmap has a setting that should not be used. Config, Map Parameter, Trackfilter - please leave out!
Change start view:
Set the target area on the map.
Then click Zoom and with the Shift key pressed, left-click on this button:
The button is then called as the level (here: 11) and is used as a view at program start.
This view can also be called up with the "1" key.
In the same way, the three buttons on the right work next to it.
With Shift and click on the respective button the current view is saved, only the click (or the digit) calls up this view.
In response to these actions, there are brief messages at the top left. "View stored!" after saving and "Show One Symbol Off" after invoking a saved view.
Its possible to use other map sources, open and edit
getosm.ini and change/insert:
1|0|http://tile.memomaps.de/tilegen/*.png|tiles_topo2|
For example OSM Map.
This must be changed in aprsmap.cfg also!
Map Names|1|tiles_topo2 0.25 25
The Map listed above will be the first one to show up.
Maps can be changed in Tools / Change Maps.
All Maps can be saved for Offline usage.
Howto about the regular functions and options from
APRS-Map read the Wiki:
http://wiki.oevsv.at/index.php?title=DXL_-_APRSmap_englisch
Com0com needs to be installed.
Add another pair of com ports, as the other com port is needed for RS-Decoder output.
Download ADB Android SDK.
Ensure the USB drivers for your mobile are installed on the PC.
Ensure that USB debugging is enabled on the mobile device.
Download ShareGPS: Playstore or APK4FUN
In Share GPS, create a new connection for NMEA USB.
With port 7777.
Connect your phone to a computer with the USB data cable.
Download ADB.bat
Move the batchfile into ADB Android SDK Folder.
Double click adb.bat
Ensure ADB detects the mobile.
The mobile may need to authorize access.
Check the phone screen.
You can close the adb screen.
Start the connection in Share GPS.
You should see USB listening in the status.
Download NmeaRouter
Install and select Configure/Profile/New
Name Profile Android USB
Configure/Connection/New
Ok.
Port: 7777 Like in ShareGPS.
Again Configure/Connection/New
Ok.
Select First Virtual Com Port (take care with the ones used for RS-Decoders!), check Windows - Control Panel Devices.
Now we see this, but there is not Route between our local ip and the com port..
Select Configure/Route/New
Enable and Ok.
Click Start, You also see on the phone in ShareGPS, USB Connected.
GPS NMEA Data Rolling in :)
Repeat Steps overhere but make sure to select second virtual com port for GPS Out!
Whenever done sending NMEA data, long press the connection in Share GPS and select Disconnect.
Kill ADB.exe in taskmanager, Stop Nmea-Router and Exit APRS-Map.
Com0com needs to be installed.
Add another pair of com ports, as the other com port is needed for RS-Decoder output.
Download Windows 7 GPS Sharing: Playstore or APKPure
In Windows 7 GPS Sharing, Tap on Listing port change to port 7777.
Download NmeaRouter
Install and select Configure/Profile/New
Name Profile Android WiFi
Configure/Connection/New
Ok.
Port: 7777 and Ip adres of the Phone.
Again Configure/Connection/New
Ok.
Select First Virtual Com Port, check Windows - Control Panel Devices.
We need a route between the ip and com connection.
Select Configure/Route/New
Enable and Ok.
Click Start, You also see on the phone Client Connected.
GPS NMEA Data Rolling in :)
Repeat Steps overhere but make sure to select second virtual com port for GPS Out!
Thanks fly out to Zilog80, Andreas6 and Auto-RX Team.