diff --git a/CHANGELOG b/CHANGELOG index da3669e..1a0aad0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ SIGNAL SERVER CHANGELOG +2.63 - 10 Nov 2015 +Added sanity check and handicap to ECC33 model when used with low Tx heights in hilly areas = sea of red + 2.62 - 30 Oct 2015 Fixed near field 'lattice' bug at 30m resolution caused by previous fix to fill in void around antenna. Credit to Nils Lofstad for helping nail this down. diff --git a/main.cc b/main.cc index 2de8ad5..26069e5 100644 --- a/main.cc +++ b/main.cc @@ -1,4 +1,4 @@ -double version = 2.62; +double version = 2.63; /****************************************************************************\ * Signal Server: Server optimised SPLAT! by Alex Farrant * ****************************************************************************** diff --git a/models/ecc33.cc b/models/ecc33.cc index d4c5f23..642234f 100644 --- a/models/ecc33.cc +++ b/models/ecc33.cc @@ -5,6 +5,11 @@ double ECC33pathLoss(float f, float TxH, float RxH, float d, int mode) { + // Sanity check as this model operates within limited Txh/Rxh bounds + if(TxH-RxH<0){ + RxH=RxH/(d*2); + } + if (f < 700 || f > 3500) { printf("Error: ECC33 model frequency range 700-3500MHz\n"); exit(EXIT_FAILURE); @@ -22,5 +27,6 @@ double ECC33pathLoss(float f, float TxH, float RxH, float d, int mode) if (mode > 1) { // Medium city (Europe) Gr = (42.57 + 13.7 * log10(f)) * (log10(RxH) - 0.585); } + return Afs + Abm - Gb - Gr; } diff --git a/models/los.cc b/models/los.cc index 64d9c1b..0264654 100644 --- a/models/los.cc +++ b/models/los.cc @@ -338,7 +338,7 @@ void PlotPropPath(struct site source, struct site destination, char fd_buffer[64]; int buffer_offset = 0; - + distance = 5280.0 * path.distance[y]; xmtr_alt = four_thirds_earth + source.alt + path.elevation[0]; diff --git a/models/sui.cc b/models/sui.cc index 3d2b3c2..db0eaf5 100644 --- a/models/sui.cc +++ b/models/sui.cc @@ -41,9 +41,9 @@ double SUIpathLoss(float f, float TxH, float RxH, float d, int mode) } double d0 = 100; double A = 20 * log10((4 * M_PI * d0) / (300 / f)); - double y = (a - b * TxH) + c / TxH; + double y = a - (b * TxH) + (c / TxH); double Xf = 6 * log10(f / 2000); - double Xh = XhCF * log10(RxH / 2); + double Xh = XhCF * log10(RxH / 20); - return A + (10 * y * log10(d / d0)) + Xf + Xh + s; + return A + (10 * y) * (log10(d / d0)) + Xf + Xh + s; }