/****************************************************************************
* SPLAT: An RF Signal Propagation Loss and Terrain Analysis Tool *
-* Last update: 21-Dec-2006 *
+* Last update: 15-Mar-2007 *
*****************************************************************************
* Project started in 1997 by John A. Magliacane, KD2BD *
*****************************************************************************
#define ARRAYSIZE 30025
#endif
-char string[255], sdf_path[255], opened=0, *splat_version={"1.2.0"};
+char string[255], sdf_path[255], opened=0, *splat_version={"1.2.0b"};
double TWOPI=6.283185307179586, HALFPI=1.570796326794896,
PI=3.141592653589793, deg2rad=1.74532925199e-02,
double loss, azimuth, pattern=0.0,
source_alt, dest_alt, source_alt2, dest_alt2,
cos_xmtr_angle, cos_test_angle=0.0, test_alt,
- elevation, distance=0.0,
- four_thirds_earth;
+ elevation, distance=0.0, four_thirds_earth;
struct site temp;
ReadPath(source,destination);
that determines the elevation angle to the first
obstruction along the path is bypassed. */
- for (x=2, block=0; x<y && block==0; x++)
+ for (x=2, block=0; (x<y && block==0); x++)
{
- distance=5280.0*(path.distance[y]-path.distance[x]);
+ distance=5280.0*path.distance[x];
test_alt=four_thirds_earth+path.elevation[x];
/* Calculate the cosine of the elevation
{
if (metric)
{
- fprintf(fd3,"%f\t%f\n",path.distance[path.length-1],r);
- fprintf(fd4,"%f\t%f\n",path.distance[path.length-1],r);
+ fprintf(fd3,"%f\t%f\n",KM_PER_MILE*path.distance[path.length-1],METERS_PER_FOOT*r);
+ fprintf(fd4,"%f\t%f\n",KM_PER_MILE*path.distance[path.length-1],METERS_PER_FOOT*r);
}
else
{
- fprintf(fd3,"%f\t%f\n",KM_PER_MILE*path.distance[path.length-1],METERS_PER_FOOT*r);
- fprintf(fd4,"%f\t%f\n",KM_PER_MILE*path.distance[path.length-1],METERS_PER_FOOT*r);
+ fprintf(fd3,"%f\t%f\n",path.distance[path.length-1],r);
+ fprintf(fd4,"%f\t%f\n",path.distance[path.length-1],r);
}
}
fflush(stdout);
}
-int main(char argc, char *argv[])
+int main(int argc, char *argv[])
{
int x, y, z=0, min_lat, min_lon, max_lat, max_lon,
rxlat, rxlon, txlat, txlon, west_min, west_max,
if (freq==0.0 && nf==0)
freq=LR.frq_mhz;
- else
+
+ else if (nf==1)
freq=0.0;
if (coverage | LRmap)