forked from ExternalVendorCode/Signal-Server
ITM model reliability re-enabled
This commit is contained in:
10
inputs.cc
10
inputs.cc
@@ -128,7 +128,7 @@ int loadClutter(char *filename, double radius, struct site tx)
|
|||||||
void readLIDAR(FILE *fd, int h, int w, int indx,double n, double e, double s, double west)
|
void readLIDAR(FILE *fd, int h, int w, int indx,double n, double e, double s, double west)
|
||||||
{
|
{
|
||||||
int x = 0, y = 0, reads = 0, a=0, b=0, avg=0, tWidth = 0, tHeight = 0;
|
int x = 0, y = 0, reads = 0, a=0, b=0, avg=0, tWidth = 0, tHeight = 0;
|
||||||
char line[150000];
|
char line[25000];
|
||||||
char *pch;
|
char *pch;
|
||||||
|
|
||||||
dem[indx].max_north=n;
|
dem[indx].max_north=n;
|
||||||
@@ -180,7 +180,7 @@ void readLIDAR(FILE *fd, int h, int w, int indx,double n, double e, double s, do
|
|||||||
for (y = h-1; y > -1; y--) {
|
for (y = h-1; y > -1; y--) {
|
||||||
x = w-1;
|
x = w-1;
|
||||||
|
|
||||||
if (fgets(line, 150000, fd) != NULL) {
|
if (fgets(line, 25000, fd) != NULL) {
|
||||||
pch = strtok(line, " "); // split line into values
|
pch = strtok(line, " "); // split line into values
|
||||||
|
|
||||||
while (pch != NULL && x > -1) {
|
while (pch != NULL && x > -1) {
|
||||||
@@ -220,7 +220,7 @@ int loadLIDAR(char *filenames)
|
|||||||
double xll, yll, xur, yur, cellsize, avgCellsize;
|
double xll, yll, xur, yur, cellsize, avgCellsize;
|
||||||
char found, free_page = 0, jline[20], lid_file[255],
|
char found, free_page = 0, jline[20], lid_file[255],
|
||||||
path_plus_name[255], *junk = NULL;
|
path_plus_name[255], *junk = NULL;
|
||||||
char line[100000];
|
char line[25000];
|
||||||
char * pch;
|
char * pch;
|
||||||
double TO_DEG = (180 / PI);
|
double TO_DEG = (180 / PI);
|
||||||
FILE *fd;
|
FILE *fd;
|
||||||
@@ -259,8 +259,8 @@ int loadLIDAR(char *filenames)
|
|||||||
}else{
|
}else{
|
||||||
IPPD = height;
|
IPPD = height;
|
||||||
}
|
}
|
||||||
// add fudge as reprojected tiles sometimes vary by a pixel or two
|
// add fudge as reprojected tiles sometimes vary by a pixel or ten
|
||||||
IPPD+=5;
|
IPPD+=10;
|
||||||
ARRAYSIZE = (MAXPAGES * IPPD) + 10;
|
ARRAYSIZE = (MAXPAGES * IPPD) + 10;
|
||||||
do_allocs();
|
do_allocs();
|
||||||
dem_alloced = 1;
|
dem_alloced = 1;
|
||||||
|
17
main.cc
17
main.cc
@@ -1,4 +1,4 @@
|
|||||||
double version = 2.94;
|
double version = 2.95;
|
||||||
/****************************************************************************\
|
/****************************************************************************\
|
||||||
* Signal Server: Radio propagation simulator by Alex Farrant QCVS, 2E0TDW *
|
* Signal Server: Radio propagation simulator by Alex Farrant QCVS, 2E0TDW *
|
||||||
******************************************************************************
|
******************************************************************************
|
||||||
@@ -1041,7 +1041,7 @@ int main(int argc, char *argv[])
|
|||||||
if (strstr(argv[0], "signalserverLIDAR")) {
|
if (strstr(argv[0], "signalserverLIDAR")) {
|
||||||
MAXPAGES = 100; // 10x10
|
MAXPAGES = 100; // 10x10
|
||||||
lidar = 1;
|
lidar = 1;
|
||||||
IPPD = 5000; // will be overridden based upon file header...
|
IPPD = 6000; // will be overridden based upon file header...
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(ss_name, "Signal Server\0", 14);
|
strncpy(ss_name, "Signal Server\0", 14);
|
||||||
@@ -1075,6 +1075,7 @@ int main(int argc, char *argv[])
|
|||||||
fprintf(stdout, " -terdic Terrain dielectric value 2-80 (optional)\n");
|
fprintf(stdout, " -terdic Terrain dielectric value 2-80 (optional)\n");
|
||||||
fprintf(stdout, " -tercon Terrain conductivity 0.01-0.0001 (optional)\n");
|
fprintf(stdout, " -tercon Terrain conductivity 0.01-0.0001 (optional)\n");
|
||||||
fprintf(stdout, " -cl Climate code 1-6 (optional)\n");
|
fprintf(stdout, " -cl Climate code 1-6 (optional)\n");
|
||||||
|
fprintf(stdout, " -rel Reliability for ITM model 50 to 99 (optional)\n");
|
||||||
fprintf(stdout, "Output:\n");
|
fprintf(stdout, "Output:\n");
|
||||||
fprintf(stdout, " -dbm Plot Rxd signal power instead of field strength\n");
|
fprintf(stdout, " -dbm Plot Rxd signal power instead of field strength\n");
|
||||||
fprintf(stdout, " -rt Rx Threshold (dB / dBm / dBuV/m)\n");
|
fprintf(stdout, " -rt Rx Threshold (dB / dBm / dBuV/m)\n");
|
||||||
@@ -1480,6 +1481,18 @@ int main(int argc, char *argv[])
|
|||||||
z = x + 1;
|
z = x + 1;
|
||||||
use_threads = false;
|
use_threads = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reliability % for ITM model
|
||||||
|
if (strcmp(argv[x], "-rel") == 0) {
|
||||||
|
z = x + 1;
|
||||||
|
|
||||||
|
if (z <= y && argv[z][0]) {
|
||||||
|
sscanf(argv[z], "%lf", &LR.rel);
|
||||||
|
sscanf(argv[z], "%lf", &LR.conf);
|
||||||
|
LR.rel=LR.rel/100;
|
||||||
|
LR.conf=LR.conf/100;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ERROR DETECTION */
|
/* ERROR DETECTION */
|
||||||
|
Reference in New Issue
Block a user