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