SPLAT! uses data from SRTM elevation files. Although it is cross-platform, up-to-date binaries for Windows are hard to find. On the other hand, for Linux users, it is available in the repositories of the major distributions. This post will show you how to compile SPLAT! on Windows and Linux, how to obtain and convert elevation data and at last how to generate point-to-point and coverage prediction analysis.
There are two variants of SPLAT! based on the type of elevation data they use. SRTM3 files are 90 meters resolution, 3 arc-sec files. These are the "standard definition" files suitable for SPLAT! And there are SRTM1, 30 meters resolution, 1 arc-sec files that are considered "high definition" and are suitable for SPLAT! HD. I recommend SRTM3 (SD) files because the results are very good and processing time is not too high.
|SPLAT! line-of-sight coverage|
Install on WindowsThe source code can be downloaded from author's site: John Magliacane, KD2BD. To compile it you need to get MinGW. I recommend the internet installer. SPLAT! needs MSYS environment to compile, so make sure to select msys-base package in MinGW Installation Manager. When the installation is over, and you installed in the default folder, you can go to C:\MinGW\msys\1.0 and you will find there msys.bat. Launch this script that will open the MSYS console. Now, in the same folder with this script, there is a subfolder home that contains another folder named by your username. In this folder (C:\MinGW\msys\1.0\home\<username>) you will place the folder with extracted SPLAT! source code archive (splat-1.4.2 folder should result).
There is a problem with SPLAT! and Windows. It comes with an utility to convert SRTM HGT file to SDF files. This utility uses by default ":" character in file names (example of a filename: 40:41:336:337.sdf). This is incompatible with Windows. We have to modify the source code. I recommend Notepad++ for this operation, but you can use any editor of your choice. You must replace all occurrences of "%d:%d:%d:%d" with something Windows compatible such as "%d_%d_%d_%d". The files of interest are splat.cpp and srtm2sdf.cpp from utils subfolder. Keep in mind that files passed to srtm2sdf must have the extension hgt (not HGT) - the utility is still case sensitive!
|Replace file name pattern in SPLAT source code|
infile=open(filename, O_RDONLY);and replace it with something like:
infile=open(filename, O_RDONLY | O_BINARY);Save files. Return to the MSYS console and type these commands:
cd splat-1.4.2 configureYou will be asked to select the maximum analysis region. The bigger the better, as long as you have enough RAM. You will have to provide this option twice, for SPLAT! and SPLAT! HD.
|SPLAT! compilation on Windows|
Install on LinuxThings are much easier in this situation. You will find SPLAT! in the repositories and you can install in Linux Ubuntu:
sudo apt install splatThe compilation from source does not need source code editing. Just download the source archive, extract it, open a terminal in that folder and run the commands:
sudo apt install build-essential libbz2-dev ./configure sudo ./install allYou will be prompted to select the maximum analysis region. That's it. You should now be able to run splat and its utilities from terminal in any folder.
Elevation dataThere are multiple sources you can get SRTM data from. It's easy to get data prepared by Jonathan de Ferranti on viewfinderpanoramas.org. Click the regions you want and an archive will be downloaded with SRTM3 files for those regions. Extract these archives on a folder of your choice. It can be on another partition if you want, but it is recommended not to use spaces in the path.
I made this folder structure (on Windows):
C:\SPLAT - splat.exe D:\SPLAT_data - sdf - srtm3In srtm3 folder I placed all HGT files downloaded earlier. In sdf folder will be created SPLAT elevation files after running srtm2sdf on hgt files. Unfortunately, this utility takes on file at a time so we need a batch script. If you're using the SRTM1 files (HD) you need to run the utility srtm2sdf-hd. If you don't know how do differentiate SRTM1 from SRTM3, file size is the most important criteria. SRTM3 are exactly 2884802 bytes in size while SRTM1 have 25934402 bytes. Any file of a different size is not a valid SRTM file!
This is for Windows users:
for /f %%f in ('dir /b D:\SPLAT_data\srtm3') do C:/SPLAT/srtm2sdf "D:/SPLAT_data/srtm3/%%f"Change folder paths as needed. Place this into a text file and save it as script.bat in sdf folder (D:\SPLAT_data\sdf in my case). Double click on it to start batch processing.
Linux users will make a sdf folder wherever they want and save the following snippet as script.sh in the sdf folder.
#!/bin/bash shopt -s nullglob for f in /<path_to_srtm_folder>/*.hgt; do echo "Converting $f" srtm2sdf $f doneAdjust the absolute path to SRTM3 files. After path is the "/*.hgt" file filter. Open a terminal in the same directory and run chmod +x ./script.sh && ./script.sh. The conversion will start.
At this point, you should have a working SPLAT! software. You can run splat in terminal or C:\SPLAT\splat.exe in Command Prompt and you should see program's output (usage instructions). Now that you installed SPLAT!, let's see how to use it.
Radio link analysis using SPLAT!