ECC33 sanity check

This commit is contained in:
alex
2015-11-10 22:41:54 +00:00
parent 7ef7b8eec5
commit f20c7e6997
5 changed files with 14 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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];

View File

@@ -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;
}