Last summer, I played a bit with RF propagation modeling, hoping to determine whether low-power VHF radios would work for communications for the annual Gore Fest kayak race through Gore Canyon in Colorado. The local hams typically use something called Radio Mobile Online which seems to work pretty well but isn't open-source and requires an account to use.
Instead, I've been using a tool called “SPLAT!" which is free under the GPLv2 and also seems to work pretty well once you get it setup.
It's possible to get SPLAT! to work on other platforms, but for now, we'll assume Linux. OSX in particular can be problematic for the higher resolution version of SPLAT! because SPLAT! makes large stack allocations which the linker can't handle properly. I'm also assuming you have C and C++ compilers installed (and generally a sane development environment). You'll also need the bzip2 development headers. Debian based distributions usually call this “libbz2-dev”. RPM based distributions often call it “bzip2-devel”
First, let's download and compile SPLAT!:
wget 'https://www.qsl.net/kd2bd/splat-1.4.2.tar.bz2'
tar xvjf splat-1.4.2.tar.bz2
cd splat*
./configure
The configure script will ask you a series of questions about the maximum domain size and resolution that you would like to support. By modern standards, even the largest officially supported configuration isn't a big deal to run, so I chose the largest options:
******************************************************
** SPLAT! Standard Resolution Mode Configuration **
******************************************************
Please select the Maximum Analysis Region capability
you would like SPLAT! to possess when operating in
3 arc-second (standard) resolution mode based on
the amount of free memory available for SPLAT!:
Maximum Analysis Region RAM + Swap Requirement
====================================================
(2) 2 x 2 Degrees --------- 25 Megabytes minimum
(3) 3 x 3 Degrees --------- 52 Megabytes minimum
(4) 4 x 4 Degrees --------- 95 Megabytes minimum
(5) 5 x 5 Degrees --------- 145 Megabytes minimum
(6) 6 x 6 Degrees --------- 210 Megabytes minimum
(7) 7 x 7 Degrees --------- 285 Megabytes minimum
(8) 8 x 8 Degrees --------- 370 Megabytes minimum
Your choice: 8
******************************************************
** SPLAT! HD High Resolution Mode Configuration **
******************************************************
Please select the Maximum Analysis Region capability
you would like SPLAT! to possess when operating in
1 arc-second (HD) resolution mode based on the amount
of free memory available for SPLAT! Selections 6, 7,
and 8 are suitable for 64-BIT SYSTEMS ONLY:
Maximum Analysis Region RAM + Swap Requirement
====================================================
(1) 1 x 1 Degrees --------- 52 Megabytes minimum
(2) 2 x 2 Degrees --------- 225 Megabytes minimum
(3) 3 x 3 Degrees --------- 468 Megabytes minimum
(4) 4 x 4 Degrees --------- 855 Megabytes minimum
(5) 5 x 5 Degrees --------- 1305 Megabytes minimum
(6) 6 x 6 Degrees --------- 1890 Megabytes minimum
(7) 7 x 7 Degrees --------- 2565 Megabytes minimum
(8) 8 x 8 Degrees --------- 3330 Megabytes minimum
(0) None of the above. Do not build SPLAT! HD.
Your choice: 8
With any luck, you'll get a screen like this:
*****************************************************
* Now building SPLAT! and associated utilities... *
*****************************************************
Compiling SPLAT!... Done!
Compiling SPLAT! HD... Done!
Compiling citydecoder... Done!
Compiling usgs2sdf... Done!
Compiling srtm2sdf... Done!
Compiling fontdata... Done!
Compiling bearing... Done!
To install SPLAT! and its associated utilities, please
su to 'root' and execute the install script as follows:
./install all
Don't forget to read the documentation under the docs directory
as well as the various README files in the splat and splat/utils
directories. Enjoy the program! John, KD2BD
Personally, I skipped the install step. If you run it, the SPLAT! will be placed into /usr/local/ (not configurable). Instead, we can just run SPLAT! from the build directory. To make things easier, let's set some environment variables:
export PATH=$PWD:$PATH/utils:$PATH
export MANPATH=$PWD/docs/english:$MANPATH
Before we can run SPLAT! we need some input data. SPLAT! comes with a conversion tool for the SRTM digital elevation model so we'll use that for now. I'm told that the SRTM data isn't so great in some areas, so look forward to a future post about using a newer dataset. For now, let's get both the SRTM-1 and SRTM-3 datasets so that we can use both SPLAT! and SPLAT-HD.
mkdir dem
cd dem
mkdir srtm1
cd srtm1
wget -r -np 'https://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL1.003/2000.02.11/'
cd ../
mkdir srtm3
cd srtm3
wget -r -np 'https://e4ftl01.cr.usgs.gov/MEASURES/SRTMGL3.003/2000.02.11/'
That'll take a while. Once it's done, we can unzip the files and convert them to SPLAT! format. But first, let's create a file so that the conversion tool knows where we want our SPLAT! DEM to reside.
cd
mkdir splat_dem
echo "$HOME/splat_dem" > ~/.splat_path
Change back to your srtm3 directory and do the following:
cd srtm3
mkdir unzip
for i in `find . -name '*.hgt.zip'`;do mv "$i" $PWD/unzip/; done
cd unzip
find . -name '*.zip' | xargs -n 1 unzip
for i in `find . -name '*.hgt'`; do srtm2sdf "$i"; done
We can do the same thing for the SRTM-1 data, but this time, we'll use srtm2sdf-hd
cd srtm1
mkdir unzip
for i in `find . -name '*.hgt.zip'`;do mv "$i" $PWD/unzip/; done
cd unzip
find . -name '*.zip' | xargs -n 1 unzip
for i in `find . -name '*.hgt'`; do srtm2sdf "$i"; done
Once that finishes, you should have a bunch of .sdf files in the directory you put into your .splat_path. These are named by the map grid that they cover and are simply ASCII. The first couple lines designate the map grid and the rest of the file is a list of integer elevations. If you bzip2 these files, SPLAT! will decompress them on the fly. This step takes a long time, but saves quite a lot of disk space. If you have GNU Parallel installed, you can do something somewhat fast like this if you like:
cd `cat ~/.splat_path`
find . -name '*.sdf' | parallel bzip2
If you skip this step, you'll use about 3-4x as much disk space, but everything else will work fine.
You might also want to get some sort of map data to make the output easier to read. The SPLAT! webpage has a couple links to county and designated place boundaries from the US Census folks. I'd classify these as “better than nothing”. It should be possible to get something better from, say, OpenStreetMap, but for now, we'll get counties for the whole country and places in Colorado:
wget 'https://web.archive.org/web/20130523000749if_/http://www.census.gov/geo/cob/bdy/co/co00ascii/co99_d00_ascii.zip'
wget 'https://web.archive.org/web/20130518182710if_/http://www.census.gov/geo/cob/bdy/pl/pl00ascii/pl08_d00_ascii.zip'
unzip co99_d00_ascii.zip
unzip pl08_d00_ascii.zip
Put co99_d00.dat and pl08_d00.dat somewhere they can be referenced in the future (the -b flag to SPLAT!)
We'll also want a “cities” file with any points that we want labeled on the map. This file is just a simple CSV file containing labels and WGS-84 coordinates. You could get a list of cities from any number of sources, but I'm just going to use a list of rapids provided by the Gore Fest organizers for now. Here's my cities.dat file:
Gear Up Eddy, 40.0363536, 106.4396959
Gore Rapid, 40.0258555, 106.4551433
Finish, 40.0093676, 106.486399
Takeout, 39.9894882, 106.5084194
Scissors Rapid, 40.0238861, 106.4576968
Tunnel Rapid, 40.0169954, 106.4744201
Toilet Bowl Rapid, 40.0152056, 106.4786949
For something like repeater coverage testing, we just need to specify the location of the transmitter and can get a field strength or coverage plot. Sites are specified in another text file with a “.qth” extension. The first line is the site name, followed by coordinates and lastly height above terrain. For our example, I'm going to use the top of nearby Santoy peak (roughly, based on Google Maps). Here's my file, santoy.qth:
santoy
40.0024982
106.4600096
10.0
Note that the filename is significant. We'll also create a file with the same name and the “.lrp” extension that contains some model parameters. There are some hints in the SPLAT! manual as to what these values should be. I'm mostly guessing for now ;-)
Here's my santoy.lrp file:
13.000 ; Earth Dielectric Constant (Relative permittivity)
0.002 ; Earth Conductivity (Siemens per meter)
301.000 ; Atmospheric Bending Constant (N-units)
146.000 ; Frequency in MHz (20 MHz to 20 GHz)
5 ; Radio Climate (5 = Continental Temperate)
1 ; Polarization (0 = Horizontal, 1 = Vertical)
0.50 ; Fraction of situations (50% of locations)
0.90 ; Fraction of time (90% of the time)
25.0 ; Effective Radiated Power (ERP) in Watts (optional)
SPLAT! will also read a “lcf” file if it's present to define the color scheme that you want. For now, we'll skip providing that and go with the defaults.
At this point, you have enough to try out SPLAT!. Make sure you're in the same directory as your .qth and .lrp files.
splat-hd -t santoy.qth -L 5 -R 30 -s cities.dat -o santoy_carto_vhf.ppm -d /srv/elevation_data/splat/ -b ~/co08_d00a.dat -b ~/pl08_d00.dat -b ~/tmp/co99_d00.dat
Here we're running the high-resolution model, With a receive antenna height of 5’ (-L), computing receive signal strength for a 30mi radius (-R) around the transmit site. Increasing the radius significantly increases computation time.
The output is a massive .ppm image file. We'll likely want to crop or possibly downsample this.
To give you an idea what the output looks like, I've cropped the interesting section of the output of the above. Here we can see that VHF from Santoy mountain won't work too well inside the canyon.
Splat can also output several other formats, including a KML file that will produce an overlay on Google Earth. I recommend using “splat” instead of “splat-hd” for this as Google Earth struggles to display the really high-resolution results.
Hopefully this is enough to get you started. For more details, the SPLAT! documentation is quite good.
Note: If you'd like to skip the pre-processsing work, You can obtain the full SRTM data-set in SPLAT! format here Or you can pick and choose just the region you need here Note that this data was is based on data obtained from the USGS and is redistributed in-accordance with the LP DAAC policy