diff --git a/models/cost.cc b/models/cost.cc index 1936900..cc23a61 100644 --- a/models/cost.cc +++ b/models/cost.cc @@ -28,8 +28,8 @@ modes 1 = URBAN, 2 = SUBURBAN, 3 = OPEN http://morse.colorado.edu/~tlen5510/text/classwebch3.html */ if (f < 150 || f > 2000) { - printf - ("Error: COST231 Hata model frequency range 150-2000MHz\n"); + fprintf + (stderr,"Error: COST231 Hata model frequency range 150-2000MHz\n"); exit(EXIT_FAILURE); } diff --git a/models/ecc33.cc b/models/ecc33.cc index 642234f..c08cb0c 100644 --- a/models/ecc33.cc +++ b/models/ecc33.cc @@ -11,7 +11,7 @@ double ECC33pathLoss(float f, float TxH, float RxH, float d, int mode) } if (f < 700 || f > 3500) { - printf("Error: ECC33 model frequency range 700-3500MHz\n"); + fprintf(stderr,"Error: ECC33 model frequency range 700-3500MHz\n"); exit(EXIT_FAILURE); } // MHz to GHz diff --git a/models/ericsson.cc b/models/ericsson.cc index 0082958..66c8d20 100644 --- a/models/ericsson.cc +++ b/models/ericsson.cc @@ -12,8 +12,8 @@ double EricssonpathLoss(float f, float TxH, float RxH, float d, int mode) double a0 = 36.2, a1 = 30.2, a2 = -12, a3 = 0.1; if (f < 150 || f > 3500) { - printf - ("Error: Ericsson9999 model frequency range 150-3500MHz\n"); + fprintf + (stderr,"Error: Ericsson9999 model frequency range 150-3500MHz\n"); exit(EXIT_FAILURE); } diff --git a/models/los.cc b/models/los.cc index d4655f8..778e017 100644 --- a/models/los.cc +++ b/models/los.cc @@ -150,7 +150,7 @@ namespace { int rc = pthread_create(&threads[thread_count], NULL, rangePropagation, arg); if (rc) - printf("ERROR; return code from pthread_create() is %d\n", rc); + fprintf(stderr,"ERROR; return code from pthread_create() is %d\n", rc); else ++thread_count; } @@ -161,7 +161,7 @@ namespace { for(unsigned int i=0; i 11000) { - printf("Error: SUI model frequency range 1.9-11GHz\n"); + fprintf(stderr,"Error: SUI model frequency range 1.9-11GHz\n"); exit(EXIT_FAILURE); } // Terrain mode A is default