├── .gitignore
├── LICENSE.md
├── README.md
├── example-haat.txt
├── example-map-thumb.jpg
├── example-map-trans.png
├── example-map.kml
├── example-map.png
├── example.cfg
├── get-datafiles-northamerica.sh
├── get-datafiles-world.sh
├── get-datafiles.sh
└── splat-radio.sh
/.gitignore:
--------------------------------------------------------------------------------
1 | *.swp
2 | *.swo
3 | .swp
4 | .swo
5 | splat-datafiles
6 | *.lcf
7 | *.lrp
8 | *.qth
9 | *.scf
10 | *.ppm
11 |
12 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | # DEDICATED TO THE PUBLIC DOMAIN
2 |
3 | This program has been dedicated to the public domain. It is protected by the
4 | Creative Commons CC0 Universal Public Domain Dedication license. You can read
5 | the entire license below or at
6 | http://creativecommons.org/publicdomain/zero/1.0/deed.en.
7 |
8 | # CC0 UNIVERSAL PUBLIC DOMAIN DEDICATION LICENSE
9 |
10 | ## Statement of Purpose
11 |
12 | The laws of most jurisdictions throughout the world automatically confer
13 | exclusive Copyright and Related Rights (defined below) upon the creator and
14 | subsequent owner(s) (each and all, an "owner") of an original work of
15 | authorship and/or a database (each, a "Work").
16 |
17 | Certain owners wish to permanently relinquish those rights to a Work for the
18 | purpose of contributing to a commons of creative, cultural and scientific works
19 | ("Commons") that the public can reliably and without fear of later claims of
20 | infringement build upon, modify, incorporate in other works, reuse and
21 | redistribute as freely as possible in any form whatsoever and for any purposes,
22 | including without limitation commercial purposes. These owners may contribute
23 | to the Commons to promote the ideal of a free culture and the further
24 | production of creative, cultural and scientific works, or to gain reputation or
25 | greater distribution for their Work in part through the use and efforts of
26 | others.
27 |
28 | For these and/or other purposes and motivations, and without any expectation of
29 | additional consideration or compensation, the person associating CC0 with a
30 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
31 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
32 | publicly distribute the Work under its terms, with knowledge of his or her
33 | Copyright and Related Rights in the Work and the meaning and intended legal
34 | effect of CC0 on those rights.
35 |
36 | 1. Copyright and Related Rights. A Work made available under CC0 may be
37 | protected by copyright and related or neighboring rights ("Copyright and
38 | Related Rights"). Copyright and Related Rights include, but are not limited
39 | to, the following: a. the right to reproduce, adapt, distribute, perform,
40 | display, communicate, and translate a Work; b. moral rights retained by the
41 | original author(s) and/or performer(s); c. publicity and privacy rights
42 | pertaining to a person's image or likeness depicted in a Work; rights
43 | protecting against unfair competition in regards to a Work, subject to the
44 | limitations in paragraph 4(a), below; d. rights protecting the extraction,
45 | dissemination, use and reuse of data in a Work; e. database rights (such as
46 | those arising under Directive 96/9/EC of the European Parliament and of the
47 | Council of 11 March 1996 on the legal protection of databases, and under any
48 | national implementation thereof, including any amended or successor version
49 | of such directive); and f. other similar, equivalent or corresponding rights
50 | throughout the world based on applicable law or treaty, and any national
51 | implementations thereof.
52 |
53 | 2. Waiver. To the greatest extent permitted by, but not in contravention of,
54 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
55 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
56 | and Related Rights and associated claims and causes of action, whether now
57 | known or unknown (including existing as well as future claims and causes of
58 | action), in the Work (i) in all territories worldwide, (ii) for the maximum
59 | duration provided by applicable law or treaty (including future time
60 | extensions), (iii) in any current or future medium and for any number of
61 | copies, and (iv) for any purpose whatsoever, including without limitation
62 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer
63 | makes the Waiver for the benefit of each member of the public at large and
64 | to the detriment of Affirmer's heirs and successors, fully intending that
65 | such Waiver shall not be subject to revocation, rescission, cancellation,
66 | termination, or any other legal or equitable action to disrupt the quiet
67 | enjoyment of the Work by the public as contemplated by Affirmer's express
68 | Statement of Purpose.
69 |
70 | 3. Public License Fallback. Should any part of the Waiver for any reason be
71 | judged legally invalid or ineffective under applicable law, then the Waiver
72 | shall be preserved to the maximum extent permitted taking into account
73 | Affirmer's express Statement of Purpose. In addition, to the extent the
74 | Waiver is so judged Affirmer hereby grants to each affected person a
75 | royalty-free, non transferable, non sublicensable, non exclusive,
76 | irrevocable and unconditional license to exercise Affirmer's Copyright and
77 | Related Rights in the Work (i) in all territories worldwide, (ii) for the
78 | maximum duration provided by applicable law or treaty (including future time
79 | extensions), (iii) in any current or future medium and for any number of
80 | copies, and (iv) for any purpose whatsoever, including without limitation
81 | commercial, advertising or promotional purposes (the "License"). The License
82 | shall be deemed effective as of the date CC0 was applied by Affirmer to the
83 | Work. Should any part of the License for any reason be judged legally
84 | invalid or ineffective under applicable law, such partial invalidity or
85 | ineffectiveness shall not invalidate the remainder of the License, and in
86 | such case Affirmer hereby affirms that he or she will not (i) exercise any
87 | of his or her remaining Copyright and Related Rights in the Work or (ii)
88 | assert any associated claims and causes of action with respect to the Work,
89 | in either case contrary to Affirmer's express Statement of Purpose.
90 |
91 | 4. Limitations and Disclaimers.
92 |
93 | a. No trademark or patent rights held by Affirmer are waived, abandoned,
94 | surrendered, licensed or otherwise affected by this document.
95 |
96 | b. Affirmer offers the Work as-is and makes no representations or warranties
97 | of any kind concerning the Work, express, implied, statutory or otherwise,
98 | including without limitation warranties of title, merchantability, fitness
99 | for a particular purpose, non infringement, or the absence of latent or
100 | other defects, accuracy, or the present or absence of errors, whether or
101 | not discoverable, all to the greatest extent permissible under applicable
102 | law.
103 |
104 | c. Affirmer disclaims responsibility for clearing rights of other persons
105 | that may apply to the Work or any use thereof, including without
106 | limitation any person's Copyright and Related Rights in the Work. Further,
107 | Affirmer disclaims responsibility for obtaining any necessary consents,
108 | permissions or other rights required for any use of the Work.
109 |
110 | d. Affirmer understands and acknowledges that Creative Commons is not a party
111 | to this document and has no duty or obligation with respect to this CC0 or
112 | use of the Work.
113 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # splat-scripts
2 |
3 | Scripts to run the [Splat!](http://www.qsl.net/kd2bd/splat.html) radio terrain
4 | mapping tool.
5 |
6 | ## Dependencies
7 |
8 | This was built and tested on Debian Jessie (8.0) with the following versions:
9 |
10 | ```
11 | ii splat 1.4.0-2 amd64 analyze point-to-point terrestria
12 | ii bc 1.06.95-9 amd64 GNU bc arbitrary precision calcul
13 | ii coreutils 8.23-4 amd64 GNU core utilities
14 | ii imagemagick 8:6.8.9.9-5 amd64 image manipulation programs -- bi
15 | ii optipng 0.7.5-1 amd64 advanced PNG (Portable Network Gr
16 | ii sed 4.2.2-4+b1 amd64 The GNU sed stream editor
17 | ii wget 1.16-1 amd64 retrieves files from the web
18 | ii unzip 6.0-16+deb8u2 amd64 De-archiver for .zip files
19 | ii time 1.7-25 amd64 The GNU time program for measuring cpu resource usage
20 | ```
21 |
22 | Success was also reported on Ubuntu, FreeBSD, and OpenBSD.
23 |
24 | ## Configuration
25 |
26 | Edit the shell scripts to set the paths for the SDF elevation files and the
27 | political borders file.
28 |
29 | To download and convert the SRTM data use the `get-datafiles*.sh` scripts. Go
30 | get some coffee while this runs, it will take a while. After it is completed,
31 | you should be able to run the example profile as below.
32 |
33 | If interrupted, the retrieval of the SRTM `*hgt.zip` files over the network can
34 | be restarted and will resume where it left off.
35 |
36 | Note the following disk space requirements to complete the data conversion:
37 |
38 | * Africa: 5.4 GB
39 | * Australia: 1.2 GB
40 | * Eurasia: 9.0 GB
41 | * Islands: 92 MB
42 | * North America: 3.6 GB
43 | * South America: 3.3 GB
44 | * All: 23 GB
45 |
46 | The `*hgt.zip` files are not required after conversion, but they are not
47 | removed by the script. They are retained so that a new run may commence
48 | without downloading all the files again from the server. This happens via the
49 | `wget` `-N` option.
50 |
51 | After removing the `*hgt.zip` files, disk space required for operations comes
52 | down to:
53 |
54 | * Africa: 2.1 GB
55 | * Australia: 434 MB
56 | * Eurasia 3.4 GB
57 | * Islands: 36 MB
58 | * North America: 1.4 GB
59 | * South America: 1.3 GB
60 | * All: 8.5 GB
61 |
62 | ## Usage
63 |
64 | ```
65 | $ ./splat-radio.sh example.cfg
66 | ```
67 |
68 | ```
69 | $ cat example.cfg
70 | NAME="example"
71 | CALL="KQ2H"
72 | LAT="40.7484931946"
73 | LON="-73.9856567383"
74 | HTAGL="373m"
75 | ERP="250"
76 | FREQMHZ="449.2250"
77 | ```
78 |
79 | Parameters are as follows:
80 |
81 | * `NAME`: used to uniquely name files
82 | * `CALL`: will be labeled onto the map
83 | * `LAT`: latitude, decimal degrees
84 | * `LON`: longitude, decimal degrees (East is positive)
85 | * `HTAGL`: height above ground level -- without units the default is in feet;
86 | use a "m" suffix for meters (e.g. "30" means 30 feet; "10m" means 10 meters)
87 | * `ERP`: effective radiated power in Watts -- be sure you take feedline loss
88 | and antenna gain into account; enter ERP="0" to produce path loss plots
89 | * `FREQMHZ`: frequency in MHz
90 |
91 | ## Output
92 |
93 | 
94 |
95 | [Full resolution here](example-map.png)
96 |
97 | [Height above average terrain, in feet](example-haat.txt)
98 |
99 | ## Prediction and propagation notes
100 |
101 | These predictions are configured to estimate a *simplex* contact, with a
102 | **receiver station at 2 meters (6 feet)**, similar to a mobile station. This
103 | is not a valid prediction for access to repeater stations on towers. This of
104 | course can be changed by editing the `splat-radio.sh` script.
105 |
106 | The model does not take reflections and multipath into account.
107 |
108 | Defaults were chosen for things like ground permeativity and other parameters.
109 | Adjust as needed if your situation warrants it.
110 |
111 | ## To do
112 |
113 | * More error checking.
114 |
115 |
--------------------------------------------------------------------------------
/example-haat.txt:
--------------------------------------------------------------------------------
1 | 1364.49
2 |
--------------------------------------------------------------------------------
/example-map-thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/molo1134/splat-scripts/56ed61be4c9332d755b367f074e27c2ce590daac/example-map-thumb.jpg
--------------------------------------------------------------------------------
/example-map-trans.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/molo1134/splat-scripts/56ed61be4c9332d755b367f074e27c2ce590daac/example-map-trans.png
--------------------------------------------------------------------------------
/example-map.kml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SPLAT!
6 | KQ2H Transmitter Contours
7 |
8 | SPLAT! Signal Strength Contours
9 | SPLAT! Coverage
10 |
11 |
12 | example-map-trans.png
13 |
14 |
15 | 42.99917
16 | 38.00000
17 | -71.00083
18 | -77.00000
19 | 0.0
20 |
21 |
22 |
23 | Color Key
24 | Contour Color Key
25 |
26 | example-map-ck.ppm
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | KQ2H
35 | 1
36 |
47 |
48 | 1
49 | relativeToGround
50 |
51 | -73.985657,40.748493,373
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/example-map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/molo1134/splat-scripts/56ed61be4c9332d755b367f074e27c2ce590daac/example-map.png
--------------------------------------------------------------------------------
/example.cfg:
--------------------------------------------------------------------------------
1 | NAME="example"
2 | CALL="KQ2H"
3 | LAT="40.7484931946"
4 | LON="-73.9856567383"
5 | HTAGL="373m"
6 | ERP="250"
7 | FREQMHZ="449.2250"
8 |
9 |
--------------------------------------------------------------------------------
/get-datafiles-northamerica.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # get the SRTM data files and convert them for splat use
4 | # results in ~3.6 GB disk space consumed
5 |
6 | # License: Public domain / CC-0
7 |
8 | # for state/county borders -- US only.
9 | BORDERDIR=splat-datafiles/borders/
10 |
11 | BORDERURL="https://web.archive.org/web/20130331144934/http://www.census.gov/geo/cob/bdy/co/co00ascii/co99_d00_ascii.zip"
12 |
13 | mkdir -p $BORDERDIR
14 | cd $BORDERDIR
15 | echo "retrieving state/county borders.."
16 | wget -N -nv $BORDERURL
17 | echo "unpacking state/county borders.."
18 | unzip -o *.zip
19 | cd -
20 |
21 | ./get-datafiles.sh "North_America"
22 |
23 |
--------------------------------------------------------------------------------
/get-datafiles-world.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # License: Public domain / CC-0
4 |
5 | ./get-datafiles-northamerica.sh
6 | ./get-datafiles.sh "South_America"
7 | ./get-datafiles.sh "Africa"
8 | ./get-datafiles.sh "Eurasia"
9 | ./get-datafiles.sh "Australia"
10 | ./get-datafiles.sh "Islands"
11 |
12 |
13 |
--------------------------------------------------------------------------------
/get-datafiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # get the SRTM data files and convert them for splat use
4 |
5 | # License: Public domain / CC-0
6 |
7 | # Takes one parameter: the continent to retrieve. Valid values:
8 | #
9 | # Africa
10 | # Australia
11 | # Eurasia
12 | # Islands
13 | # North_America
14 | # South_America
15 |
16 | # path to topgraphy datafiles
17 | TOPOFILEDIR=splat-datafiles/sdf/
18 | # local hgt file archive
19 | HGTFILEDIR=splat-datafiles/hgtzip/
20 |
21 | CONTINENT=$1
22 | case $CONTINENT in
23 | North_America|South_America|Africa|Eurasia|Australia|Islands)
24 | echo $CONTINENT
25 | ;;
26 | *)
27 | echo "Invalid continent: $CONTINENT"
28 | exit 1
29 | ;;
30 | esac
31 |
32 |
33 | INDEXURL="http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/${CONTINENT}/"
34 |
35 | INDEXFILE=`mktemp`
36 |
37 | if [ ! -x `which srtm2sdf` ]; then
38 | echo "error: not found in path: srtm2sdf splat conversion utility"
39 | exit 1
40 | fi
41 |
42 | if [ ! -x `which readlink` ]; then
43 | echo "error: not found in path: readlink"
44 | exit 1
45 | fi
46 |
47 | if [ ! -x `which wget` ]; then
48 | echo "error: not found in path: wget"
49 | exit 1
50 | fi
51 |
52 | if [ ! -x `which unzip` ]; then
53 | echo "error: not found in path: unzip"
54 | exit 1
55 | fi
56 |
57 | if [ ! -x `which bzip2` ]; then
58 | echo "error: not found in path: bzip2"
59 | exit 1
60 | fi
61 |
62 | echo "getting index.."
63 | wget -q -O - $INDEXURL | \
64 | sed -r -e '/hgt.zip/!d; s/.* ([NSWE0-9]+\.?hgt\.zip).*$/\1/;' \
65 | > $INDEXFILE
66 |
67 | mkdir -p $HGTFILEDIR
68 | mkdir -p $TOPOFILEDIR
69 |
70 | echo "retrieving files.."
71 | cd $HGTFILEDIR
72 | wget -nv -N -B $INDEXURL -i $INDEXFILE
73 | cd -
74 |
75 | rm $INDEXFILE
76 |
77 | # to minimize disk space required, run srtm2sdf on each file as it is unzipped.
78 |
79 | HGTREALPATH=`readlink -f $HGTFILEDIR`
80 | TOPOREALPATH=`readlink -f $TOPOFILEDIR`
81 | PWD=`pwd`
82 |
83 | echo "unpacking hgt files.."
84 | cd $HGTFILEDIR
85 | for e in *.zip ; do
86 | echo $e
87 | nice unzip -o $e
88 | HGTFILE=`echo $e | sed -r -e 's/\.?hgt.zip/.hgt/'`
89 | if [ -r $HGTFILE ]; then
90 | cd $TOPOREALPATH
91 | nice srtm2sdf -d /dev/null $HGTREALPATH/$HGTFILE
92 | echo "compressing.."
93 | nice bzip2 -f -- *.sdf
94 | echo "deleting hgt file.."
95 | cd $HGTREALPATH
96 | rm $HGTFILE
97 | fi
98 | done
99 |
100 | cd $PWD
101 |
102 | echo "Complete. The files in $HGTFILEDIR may be removed."
103 |
104 |
105 |
--------------------------------------------------------------------------------
/splat-radio.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | #
3 | # Generate Splat map and HAAT calculation
4 |
5 | # License: Public domain / CC-0
6 |
7 | # dependencies:
8 | # - splat 1.4.0
9 | # - ImageMagick "convert"
10 | # - OptiPNG
11 |
12 | # Configuration:
13 |
14 | # path to topgraphy datafiles
15 | TOPOFILEDIR=splat-datafiles/sdf/
16 | # file for state/county borders
17 | BORDERFILE=splat-datafiles/borders/co99_d00.dat
18 |
19 | # Usage: ./splat-radio.sh example.cfg
20 |
21 | CONFIG="$1"
22 |
23 | if [ "x$CONFIG" = "x" ]; then
24 | echo "usage: $0 "
25 | exit 1
26 | fi
27 |
28 | if [ ! -r "$CONFIG" ]; then
29 | echo "unable to read \"$CONFIG\""
30 | exit 1
31 | fi
32 | CONFIGREALPATH=`readlink -f "$CONFIG"`
33 |
34 | # load config
35 | . $CONFIGREALPATH
36 |
37 | if [ ! -x `which splat` ]; then
38 | echo "error: not found in path: splat"
39 | exit 1
40 | fi
41 |
42 | if [ ! -x `which convert` ]; then
43 | echo "error: not found in path: convert"
44 | exit 1
45 | fi
46 |
47 | if [ ! -x `which optipng` ]; then
48 | echo "error: not found in path: optipng"
49 | exit 1
50 | fi
51 |
52 | if [ ! -e "$BORDERFILE" ]; then
53 | echo "warning: no border file found: \"$BORDERFILE\""
54 | fi
55 |
56 | if [ ! -e "$TOPOFILEDIR" ]; then
57 | echo "error: topo dir not found: \"$TOPOFILEDIR\""
58 | exit 1
59 | fi
60 |
61 | if [ ! -e "$( ls -1 $TOPOFILEDIR/*.sdf.bz2 | head -1 )" ]; then
62 | echo "error: no topography files found"
63 | exit 1
64 | fi
65 |
66 |
67 | # no more variables to edit below here
68 |
69 | CLEANCALL=`echo $CALL | sed -e 's|/|-|g;'`
70 | QTHFILE=$NAME.qth
71 | LRPFILE=$NAME.lrp
72 | LCFFILE=$NAME.lcf
73 | SCFFILE=$NAME.scf
74 | MAPPPMFILE=$NAME-map.ppm
75 | MAPPNGFILE=$NAME-map.png
76 | MAPJPGTHMBFILE=$NAME-map-thumb.jpg
77 | REPFILE=$CLEANCALL-site_report.txt
78 | HAATFILE=$NAME-haat.txt
79 |
80 | # invert the longitude, because splat is backwards
81 | REVLON=`echo "$LON * -1" | bc`
82 |
83 | NICE="nice -20"
84 |
85 | rm -f $QTHFILE $LRPFILE $LCFFILE $SCFFILE $MAPPPMFILE
86 |
87 | echo $CLEANCALL > $QTHFILE
88 | echo $LAT >> $QTHFILE
89 | echo $REVLON >> $QTHFILE
90 | echo $HTAGL >> $QTHFILE
91 |
92 | # assume default propogation characteristics
93 | echo "15.000 ; Earth Dielectric Constant (Relative permittivity)" > $LRPFILE
94 | echo "0.005 ; Earth Conductivity (Siemens per meter)" >> $LRPFILE
95 | echo "301.000 ; Atmospheric Bending Constant (N-units)" >> $LRPFILE
96 | echo "$FREQMHZ ; Frequency in MHz (20 MHz to 20 GHz)" >> $LRPFILE
97 | echo "5 ; Radio Climate (5 = Continental Temperate)" >> $LRPFILE
98 | echo "1 ; Polarization (0 = Horizontal, 1 = Vertical)" >> $LRPFILE
99 | echo "0.50 ; Fraction of situations (50% of locations)" >> $LRPFILE
100 | echo "0.90 ; Fraction of time (90% of the time)" >> $LRPFILE
101 | echo "$ERP ; ERP in Watts (optional)" >> $LRPFILE
102 |
103 | # coloration for path-loss
104 | cat > $LCFFILE << EOF
105 | ; SPLAT! Auto-generated Path-Loss Color Definition ("wnjt-dt.lcf") File
106 | ;
107 | ; Format for the parameters held in this file is as follows:
108 | ;
109 | ; dB: red, green, blue
110 | ;
111 | ; ...where "dB" is the path loss (in dB) and
112 | ; "red", "green", and "blue" are the corresponding RGB color
113 | ; definitions ranging from 0 to 255 for the region specified.
114 | ;
115 | ; The following parameters may be edited and/or expanded
116 | ; for future runs of SPLAT! A total of 32 contour regions
117 | ; may be defined in this file.
118 | ;
119 | ;
120 | 80: 255, 0, 0
121 | 90: 255, 128, 0
122 | 100: 255, 165, 0
123 | 110: 255, 206, 0
124 | 120: 255, 255, 0
125 | 130: 184, 255, 0
126 | 140: 0, 255, 0
127 | 150: 0, 208, 0
128 | 160: 0, 196, 196
129 | 170: 0, 148, 255
130 | 180: 80, 80, 255
131 | 190: 0, 38, 255
132 | 200: 142, 63, 255
133 | 210: 196, 54, 255
134 | 220: 255, 0, 255
135 | 230: 255, 194, 204
136 | EOF
137 |
138 | # coloration for signal level color
139 | cat > $SCFFILE << EOF
140 | ; SPLAT! Auto-generated Signal Color Definition ("wnjt-dt.scf") File
141 | ;
142 | ; Format for the parameters held in this file is as follows:
143 | ;
144 | ; dBuV/m: red, green, blue
145 | ;
146 | ; ...where "dBuV/m" is the signal strength (in dBuV/m) and
147 | ; "red", "green", and "blue" are the corresponding RGB color
148 | ; definitions ranging from 0 to 255 for the region specified.
149 | ;
150 | ; The following parameters may be edited and/or expanded
151 | ; for future runs of SPLAT! A total of 32 contour regions
152 | ; may be defined in this file.
153 | ;
154 | ;
155 | 128: 255, 0, 0
156 | 118: 255, 165, 0
157 | 108: 255, 206, 0
158 | 98: 255, 255, 0
159 | 88: 184, 255, 0
160 | 78: 0, 255, 0
161 | 68: 0, 208, 0
162 | 58: 0, 196, 196
163 | 48: 0, 148, 255
164 | 38: 80, 80, 255
165 | 28: 0, 38, 255
166 | 18: 142, 63, 255
167 | EOF
168 |
169 | if [ $ERP -eq 0 ] ; then
170 | MAXDB="-db 160"
171 | else
172 | MAXDB=""
173 | fi
174 |
175 | # -R 100 = 100 miles max
176 | # -L 6 = 6 ft AGL for RX
177 | # -m 1.333 = earth radius multiplier
178 | # -db 160 = max attenuation contour
179 | # -erp = ERP override
180 | # -d = path to elevation data files
181 | # -o = output file
182 | # -olditm = old ITM analysis, seems more accurate
183 | time $NICE splat -t $QTHFILE -R 100 -L 6 -m 1.333 $MAXDB -erp $ERP \
184 | -d $TOPOFILEDIR -b $BORDERFILE -olditm -o $MAPPPMFILE
185 |
186 | rm -f $MAPPNGFILE $MAPJPGTHMBFILE
187 |
188 | echo "converting PPM to PNG"
189 | $NICE convert $MAPPPMFILE $MAPPNGFILE
190 | echo "converting PNG to JPG"
191 | $NICE convert $MAPPNGFILE -scale 800x810 $MAPJPGTHMBFILE
192 | echo "optipng"
193 | $NICE optipng -q $MAPPNGFILE
194 |
195 | # in feet
196 | HAATFT=`grep "Antenna height above average terrain" $REPFILE | \
197 | sed -r -e "s/^.*: ([-0-9.]+) .*$/\1/;"`
198 |
199 | rm -f $QTHFILE $LRPFILE $LCFFILE $SCFFILE $MAPPPMFILE $REPFILE $HAATFILE
200 |
201 | echo $HAATFT > $HAATFILE
202 |
203 | ls -l $HAATFILE $MAPPNGFILE $MAPJPGTHMBFILE
204 |
205 |
--------------------------------------------------------------------------------