Fix height width and makefule issues

This commit is contained in:
Gareth Evans
2017-06-01 22:58:06 +01:00
parent 9fa61bc68d
commit 67c145dd7d
3 changed files with 24 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ LIBS = -lm -lpthread -ldl
VPATH = models VPATH = models
objects = main.o cost.o ecc33.o ericsson.o fspl.o hata.o itwom3.0.o \ objects = main.o cost.o ecc33.o ericsson.o fspl.o hata.o itwom3.0.o \
los.o sui.o pel.o egli.o inputs.o outputs.o image.o image-ppm.o los.o sui.o pel.o egli.o inputs.o outputs.o image.o image-ppm.o tiles.o
GCC_MAJOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d . -f 1) GCC_MAJOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d . -f 1)
GCC_MINOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d . -f 2) GCC_MINOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d . -f 2)
@@ -52,6 +52,8 @@ image-ppm.o: image-ppm.cc
los.o: los.cc common.h main.hh cost.hh ecc33.hh ericsson.hh fspl.hh hata.hh \ los.o: los.cc common.h main.hh cost.hh ecc33.hh ericsson.hh fspl.hh hata.hh \
itwom3.0.hh sui.hh pel.hh egli.hh itwom3.0.hh sui.hh pel.hh egli.hh
tiles.o: tiles.cc tiles.hh common.h
.PHONY: clean .PHONY: clean
clean: clean:
rm -f $(objects) signalserver signalserverHD signalserverLIDAR rm -f $(objects) signalserver signalserverHD signalserverLIDAR

View File

@@ -76,6 +76,8 @@ int resample_data(int scaling_factor){
fprintf(stderr, "Resampling IPPD %d->%d min/max el %d/%d\n", IPPD, new_ippd, min_elevation, max_elevation); fprintf(stderr, "Resampling IPPD %d->%d min/max el %d/%d\n", IPPD, new_ippd, min_elevation, max_elevation);
/* Finally, set the new IPPD value */ /* Finally, set the new IPPD value */
height /= scaling_factor;
width /= scaling_factor;
IPPD = new_ippd; IPPD = new_ippd;
ippd = IPPD; ippd = IPPD;
ARRAYSIZE = (MAXPAGES * IPPD) + 50; ARRAYSIZE = (MAXPAGES * IPPD) + 50;

38
main.cc
View File

@@ -1884,26 +1884,26 @@ int main(int argc, char *argv[])
} }
} }
if(max_range<=100){ // 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
if(cropLon>357 && tx_site[0].lon < 3) // if(cropLon>357 && tx_site[0].lon < 3)
cropLon=tx_site[0].lon+3; // cropLon=tx_site[0].lon+3;
// Edge case #2 - EAST/EAST // // Edge case #2 - EAST/EAST
if(cropLon>359.5 && tx_site[0].lon > 359.5) // if(cropLon>359.5 && tx_site[0].lon > 359.5)
cropLon=362; // cropLon=362;
max_west=cropLon; // MAX(path.lon[y]) // max_west=cropLon; // MAX(path.lon[y])
cropLat-=tx_site[0].lat; // angle from tx to edge // cropLat-=tx_site[0].lat; // angle from tx to edge
cropLon-=tx_site[0].lon; // cropLon-=tx_site[0].lon;
width=(int)((cropLon*ppd)*2); // width=(int)((cropLon*ppd)*2);
height=(int)((cropLat*ppd)*2); // height=(int)((cropLat*ppd)*2);
if(width>3600*10){ // if(width>3600*10){
fprintf(stderr,"FATAL BOUNDS! max_west: %.4f cropLat: %.4f cropLon: %.4f longitude: %.5f\n",max_west,cropLat,cropLon,tx_site[0].lon); // fprintf(stderr,"FATAL BOUNDS! max_west: %.4f cropLat: %.4f cropLon: %.4f longitude: %.5f\n",max_west,cropLat,cropLon,tx_site[0].lon);
return 0; // return 0;
} // }
} // }
// Write bitmap // Write bitmap
if (LR.erp == 0.0) if (LR.erp == 0.0)