return 0.0;
}
-#define set_warn(txt, err) printf("%s:%d %s\n", __func__, __LINE__, txt);
-
+//#define set_warn(txt, err) printf("%s:%d %s\n", __func__, __LINE__, txt);
+#define set_warn(txt, err) 1;
// :13: single-knife attenuation, page 6
/*
double rel, // 0.01 .. .99, Fractions of time
double &dbloss,
char *strmode,
+ int &p_mode, // propagation mode selector
+ double (&horizons)[2], // horizon distances
int &errnum)
{
// radio_climate: 1-Equatorial, 2-Continental Subtropical, 3-Maritime Tropical,
fs = 32.45 + 20.0 * log10(frq_mhz) + 20.0 * log10(prop.d / 1000.0);
q = prop.d - prop.d_L;
+ horizons[0] = 0.0;
+ horizons[1] = 0.0;
if (int(q) < 0.0) {
strcpy(strmode, "Line-Of-Sight Mode");
+ p_mode = 0;
} else {
- if (int(q) == 0.0)
+ if (int(q) == 0.0) {
strcpy(strmode, "Single Horizon");
+ horizons[0] = prop.d_Lj[0];
+ p_mode = 1;
+ }
- else
- if (int(q) > 0.0)
+ else {
+ if (int(q) > 0.0) {
strcpy(strmode, "Double Horizon");
+ horizons[0] = prop.d_Lj[0];
+ horizons[1] = prop.d_Lj[1];
+ p_mode = 1;
+ }
+ }
- if (prop.d <= prop.d_Ls || prop.d <= prop.dx)
+ if (prop.d <= prop.d_Ls || prop.d <= prop.dx) {
strcat(strmode, ", Diffraction Dominant");
+ p_mode = 1;
+ }
- else
- if (prop.d > prop.dx)
- strcat(strmode, ", Troposcatter Dominant");
+ else {
+ if (prop.d > prop.dx) {
+ strcat(strmode, ", Troposcatter Dominant");
+ p_mode = 2;
+ }
+ }
}
dbloss = avar(zr, 0.0, zc, prop, propv) + fs;