forked from ExternalVendorCode/Signal-Server
cropping fix
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
SIGNAL SERVER CHANGELOG
|
SIGNAL SERVER CHANGELOG
|
||||||
|
|
||||||
|
3.06 - 23 June 2017
|
||||||
|
Cropping edge cases with > 100km and LOS
|
||||||
|
|
||||||
3.05 - 18 June 2017
|
3.05 - 18 June 2017
|
||||||
LIDAR overhaul for mismatched tiles and different resolutions. No longer expects x/y grid of tiles of equal size.
|
LIDAR overhaul for mismatched tiles and different resolutions. No longer expects x/y grid of tiles of equal size.
|
||||||
Dynamic resampling so user can specify *any* resolution less than maximum resolution of data.
|
Dynamic resampling so user can specify *any* resolution less than maximum resolution of data.
|
||||||
|
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@ SHELL = /bin/sh
|
|||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CXX = g++
|
CXX = g++
|
||||||
CFLAGS = -Wall -O3 -s -ffast-math
|
CFLAGS = -Wall -O3 -s -ffast-math -DCROPPING
|
||||||
CXXFLAGS = -Wall -O3 -s -ffast-math
|
CXXFLAGS = -Wall -O3 -s -ffast-math
|
||||||
LIBS = -lm -lpthread -ldl
|
LIBS = -lm -lpthread -ldl
|
||||||
|
|
||||||
|
10
main.cc
10
main.cc
@@ -57,7 +57,7 @@ int ippd, mpi,
|
|||||||
|
|
||||||
unsigned char got_elevation_pattern, got_azimuth_pattern, metric = 0, dbm = 0;
|
unsigned char got_elevation_pattern, got_azimuth_pattern, metric = 0, dbm = 0;
|
||||||
|
|
||||||
bool to_stdout = false, cropping = false;
|
bool to_stdout = false, cropping = true;
|
||||||
|
|
||||||
__thread double *elev;
|
__thread double *elev;
|
||||||
__thread struct path path;
|
__thread struct path path;
|
||||||
@@ -1853,8 +1853,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(max_range>100){
|
||||||
|
cropping=false;
|
||||||
|
}
|
||||||
if (ppa == 0) {
|
if (ppa == 0) {
|
||||||
if (propmodel == 2) {
|
if (propmodel == 2) {
|
||||||
|
cropping = false;
|
||||||
PlotLOSMap(tx_site[0], altitudeLR, ano_filename, use_threads);
|
PlotLOSMap(tx_site[0], altitudeLR, ano_filename, use_threads);
|
||||||
DoLOS(mapfile, geo, kml, ngs, tx_site, txsites);
|
DoLOS(mapfile, geo, kml, ngs, tx_site, txsites);
|
||||||
} else {
|
} else {
|
||||||
@@ -1881,8 +1885,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CROPPING
|
if(cropping){
|
||||||
if(max_range<=100){
|
|
||||||
// CROPPING. croplat assigned in propPathLoss()
|
// CROPPING. croplat assigned in propPathLoss()
|
||||||
max_north=cropLat; // MAX(path.lat[y])
|
max_north=cropLat; // MAX(path.lat[y])
|
||||||
// Edge case #1 - EAST/WEST
|
// Edge case #1 - EAST/WEST
|
||||||
@@ -1903,7 +1906,6 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// Write bitmap
|
// Write bitmap
|
||||||
if (LR.erp == 0.0)
|
if (LR.erp == 0.0)
|
||||||
|
@@ -242,8 +242,9 @@ void PlotLOSPath(struct site source, struct site destination, char mask_value,
|
|||||||
double distance, rx_alt, tx_alt;
|
double distance, rx_alt, tx_alt;
|
||||||
|
|
||||||
ReadPath(source, destination);
|
ReadPath(source, destination);
|
||||||
|
for (y = 0; (y < (path.length - 1) && path.distance[y] <= max_range);
|
||||||
for (y = 0; y < path.length; y++) {
|
y++) {
|
||||||
|
//for (y = 0; y < path.length; y++) {
|
||||||
/* Test this point only if it hasn't been already
|
/* Test this point only if it hasn't been already
|
||||||
tested and found to be free of obstructions. */
|
tested and found to be free of obstructions. */
|
||||||
|
|
||||||
@@ -338,13 +339,13 @@ void PlotPropPath(struct site source, struct site destination,
|
|||||||
Longley-Rice. This information is required for properly
|
Longley-Rice. This information is required for properly
|
||||||
integrating the antenna's elevation pattern into the
|
integrating the antenna's elevation pattern into the
|
||||||
calculation for overall path loss. */
|
calculation for overall path loss. */
|
||||||
if(debug)
|
//if(debug)
|
||||||
fprintf(stderr,"four_thirds_earth %.1f source.alt %.1f path.elevation[0] %.1f\n",four_thirds_earth,source.alt,path.elevation[0]);
|
// fprintf(stderr,"four_thirds_earth %.1f source.alt %.1f path.elevation[0] %.1f\n",four_thirds_earth,source.alt,path.elevation[0]);
|
||||||
for (y = 2; (y < (path.length - 1) && path.distance[y] <= max_range);
|
for (y = 2; (y < (path.length - 1) && path.distance[y] <= max_range);
|
||||||
y++) {
|
y++) {
|
||||||
/* Process this point only if it
|
/* Process this point only if it
|
||||||
has not already been processed. */
|
has not already been processed. */
|
||||||
|
|
||||||
if ( (GetMask(path.lat[y], path.lon[y]) & 248) !=
|
if ( (GetMask(path.lat[y], path.lon[y]) & 248) !=
|
||||||
(mask_value << 3) && can_process(path.lat[y], path.lon[y])) {
|
(mask_value << 3) && can_process(path.lat[y], path.lon[y])) {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user