--- a/src/buildings/test/reference/buildings_pathloss.m Mon May 07 10:46:47 2012 +0200
+++ b/src/buildings/test/reference/buildings_pathloss.m Mon May 07 11:54:24 2012 +0200
@@ -2,7 +2,11 @@
close all;
%% BuildingsPropagationLossModel pathloss test reference script
-%% ITU1411, ITU1238, COST231, OH, etc.
+
+
+%% ITU1411, COST231, OH, etc. scripts are in the propagation module
+addpath ("../../../propagation/test/reference/");
+
%f = 2114e6; % carrier freq Hz, EARFCN = 500 (downlink)
%f = 1900e6; % carrier freq Hz, EARFCN = 500 (downlink)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/buildings/test/reference/loss_ITU1238.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,30 @@
+function g = loss_ITU1238 (d, f, n_floors, build_t)
+
+ %%
+ %% function g = loss_ITU1411_NLOS_street_canyons(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+ %% build_t = 0:residential; 1:office; 2:commercial
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+
+ lambda = 300000000.0 / f;
+
+
+ if (build_t ==1)
+ N = 28;
+ Lf = 4*n_floors;
+ elseif (build_t==2)
+ N = 30
+ Lf = 15+4*(n_floors-1);
+ else
+ N = 22;
+ Lf = 6 + 3*(n_floors-1);
+ endif
+
+ g(find(d > 0)) = 20*log10(f) + (N*log10(d)) + Lf - 28;
+
+ g(find(d <= 0)) = 1;
\ No newline at end of file
--- a/src/lte/test/reference/loss_COST231_large_cities_urban.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-function g = loss_COST231_large_cities_urban(d, hb, hm, f)
-
- %%
- %% function g = gain_freespace(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
- Fhm = 3.2*(log10(11.75*hm))^2;
- C = 3;
- g = zeros(size(d));
- g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C;
-
- g(find(d <= 0)) = 1;
-
-
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_COST231_small_cities_urban.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-function g = loss_COST231_small_cities_urban(d, hb, hm, f)
-
- %%
- %% function g = gain_freespace(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
- Fhm = (1.1*log10(f)) -(0.7*hm) -(1.56*log10(f) -0.8);
- C = 0;
- g = zeros(size(d));
- g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C;
-
- g(find(d <= 0)) = 1;
-
-
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_ITU1238.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-function g = loss_ITU1238 (d, f, n_floors, build_t)
-
- %%
- %% function g = loss_ITU1411_NLOS_street_canyons(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
- %% build_t = 0:residential; 1:office; 2:commercial
-
- assert(isscalar(f));
- assert(f > 0);
-
-
- lambda = 300000000.0 / f;
-
-
- if (build_t ==1)
- N = 28;
- Lf = 4*n_floors;
- elseif (build_t==2)
- N = 30
- Lf = 15+4*(n_floors-1);
- else
- N = 22;
- Lf = 6 + 3*(n_floors-1);
- endif
-
- g(find(d > 0)) = 20*log10(f) + (N*log10(d)) + Lf - 28;
-
- g(find(d <= 0)) = 1;
\ No newline at end of file
--- a/src/lte/test/reference/loss_ITU1411_LOS.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-function g = loss_ITU1411_LOS (d, hb, hm, hr, f)
-
- %%
- %% function g = loss_ITU1411_LOS(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
-
- lambda = 300000000.0 / f;
- Lbp = abs(20*log10(lambda^2/(8*pi*hb*hm)));
- Rbp = (4*hb*hm) / lambda;
- if (d<=Rbp)
- Ll = Lbp + 20.*log10(d./Rbp);
- Lu = Lbp + 20 + 25.*log10(d./Rbp);
- else
- Ll = Lbp + 40.*log10(d./Rbp);
- Lu = Lbp + 20 + 40.*log10(d./Rbp);
- endif
-
- g = zeros(size(d));
- g(find(d > 0)) = (Ll.+Lu)./2;
-
- g(find(d <= 0)) = 1;
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_ITU1411_NLOS_over_rooftop.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-function g = loss_ITU1411_NLOS_over_rooftop (d, hb, hm, hr, f, l, b, st_w, phi, big)
-
- %%
- %% function g = loss_ITU1411_LOS(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
-
- lambda = 300000000.0 / f;
- fmhz = f/1e6;
- Dhb = hb - hr;
- ds = (lambda*d*d)/(Dhb*Dhb);
- if (l>ds)
- if (fmhz>2000)
- kf = -8;
- else
- if (big==1)
- kf = -4+1.5*((fmhz/925)-1);
- else
- kf = -4+0.7*((fmhz/925)-1);
- endif
- endif
- if (hb>hr)
- kd = 18;
- if (fmhz>2000)
- ka = 71.4;
- else
- ka = 54;
- endif
- Lbsh = -18*log10(1+Dhb);
- else
- kd = 18 - 15*(Dhb/hr);
- Lbsh = 0;
- if (d>=500)
- ka = 54-0.8*Dhb;
- else
- ka = 54-1.6*Dhb;
- endif
- endif
- Lmsd = Lbsh + ka + kd.*log10(d./1000) + kf*log10(fmhz) - 9*log10(b);
- else
- theta = atan (Dhb /b);
- rho = sqrt(Dhb^2 + b^2);
- if (abs(hb-hr)<1)
- Qm = b./d;
- elseif (hb>hr)
- Qm = 2.35*((Dhb./d)*sqrt(b/lambda))^0.9;
- else
- Qm = (b/(2*pi.*d))*sqrt(lambda/rho)*((1/theta)-(1/(2*pi+theta)));
- b
- endif
- Lmsd = -10*log10(Qm*Qm);
- endif
- Dhm = hr-hm;
- if (phi<35)
- Lori = -10+(0.354*phi);
- elseif (phi<55)
- Lori = 2.5+0.075*(phi-35);
- else
- Lori = 4- 0.114*(phi-55);
- endif
- Lrts = -8.2 -10*log10(st_w) + 10*log10(fmhz) + 20*log10(Dhm) + Lori;
-
- Lbf = 32.4 +20*log10(d/1000) + 20*log10(fmhz);
- g = zeros(size(d));
- if (Lrts+Lmsd>0)
- L = Lbf + Lrts + Lmsd;
- else
- L = Lbf
- endif
- g(find(d > 0)) = L;
-
- g(find(d <= 0)) = 1;
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_ITU1411_NLOS_street_canyons.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-function g = loss_ITU1411_NLOS_street_canyons (d, f, w1, w2, x1, x2, alpha)
-
- %%
- %% function g = loss_ITU1411_NLOS_street_canyons(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
-
- lambda = 300000000.0 / f;
-
-
- if (alpha <= 0.33)
- f_alpha = -41+110*alpha;
- elseif (alpha <=0.42)
- f_alpha = -13.94+28*alpha;
- elseif (alpha <=0.71)
- f_alpha = -5.33+7.51*alpha;
- else
- f_alpha = 0;
- endif
-
- Lr = -20*log10(x1+x2) + (x1*x2*(f_alpha/(w1*w2))) - 20*log10((4*pi)/lambda);
-
- Da = -1*(40/(2*pi))*(atan(x2/w2)+atan(x1/w1)-(pi/2));
-
- Ld = -10*log10(x2*x1*(x1+x2))+ 2*Da + 0.1*(90-(alpha*(180/pi))) -20*log10((4*pi)/lambda);
-
-
-
- g(find(d > 0)) = -10*log10(10^(Lr/10)+10^(Ld/10));
-
- g(find(d <= 0)) = 1;
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_OH_2_6GHz.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-function g = loss_OH_2_6GHz (d)
-
- %%
- %% function g = gain_freespace(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- %assert(isscalar(f));
- %assert(f > 0);
-
-
- g = zeros(size(d));
- g(find(d > 0)) = 36 + 26.*log10(d);
-
- g(find(d <= 0)) = 1;
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_OH_large_cities_urban.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-function g = loss_OH_large_cities_urban(d, hb, hm, f)
-
- %%
- %% function g = gain_freespace(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
- if (f<200)
- Ch = 8.29*(log10(1.54*hm))^2-1.1;
- else
- Ch = 3.2*(log10(11.75*hm))^2-4.97;
- endif
-
- g = zeros(size(d));
- g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch;
-
- g(find(d <= 0)) = 1;
-
-
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_OH_openareas.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-function g = loss_OH_openareas (d, hb, hm, f)
-
- %%
- %% function g = gain_freespace(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
- Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
-
- g = zeros(size(d));
- g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch -4.70*(log10(f))^2 + 18.33*log10(f) -40.94;
-
- g(find(d <= 0)) = 1;
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_OH_small_cities_urban.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-function g = loss_OH_small_cities_urban(d, hb, hm, f)
-
- %%
- %% function g = gain_freespace(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
- Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
-
- g = zeros(size(d));
- g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch;
-
- g(find(d <= 0)) = 1;
-
-
-
\ No newline at end of file
--- a/src/lte/test/reference/loss_OH_suburban.m Mon May 07 10:46:47 2012 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-function g = loss_OH_suburban(d, hb, hm, f)
-
- %%
- %% function g = gain_freespace(d, c)
- %%
- %% returns the loss at d meters for f frequency and mobile height m and
- %% base station height of hb
-
- assert(isscalar(f));
- assert(f > 0);
-
- Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
-
- g = zeros(size(d));
- g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch - 2*(log10(f/28))^2 -5.4;
-
- g(find(d <= 0)) = 1;
-
\ No newline at end of file
--- a/src/lte/test/reference/lte_pathloss.m Mon May 07 10:46:47 2012 +0200
+++ b/src/lte/test/reference/lte_pathloss.m Mon May 07 11:54:24 2012 +0200
@@ -2,8 +2,12 @@
close all;
%% LTE pathloss model
-%% ITU1411, ITU1238, COST231, OH, etc.
+%% ITU1411, COST231, OH, etc. scripts are in the propagation module
+addpath ("../../../propagation/test/reference/");
+
+%% ITU1238 script is in the buildings module
+addpath ("../../../buildings/test/reference/");
d = 104.12;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_COST231_large_cities_urban.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,20 @@
+function g = loss_COST231_large_cities_urban(d, hb, hm, f)
+
+ %%
+ %% function g = gain_freespace(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+ Fhm = 3.2*(log10(11.75*hm))^2;
+ C = 3;
+ g = zeros(size(d));
+ g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C;
+
+ g(find(d <= 0)) = 1;
+
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_COST231_small_cities_urban.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,20 @@
+function g = loss_COST231_small_cities_urban(d, hb, hm, f)
+
+ %%
+ %% function g = gain_freespace(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+ Fhm = (1.1*log10(f)) -(0.7*hm) -(1.56*log10(f) -0.8);
+ C = 0;
+ g = zeros(size(d));
+ g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C;
+
+ g(find(d <= 0)) = 1;
+
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_ITU1411_LOS.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,28 @@
+function g = loss_ITU1411_LOS (d, hb, hm, hr, f)
+
+ %%
+ %% function g = loss_ITU1411_LOS(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+
+ lambda = 300000000.0 / f;
+ Lbp = abs(20*log10(lambda^2/(8*pi*hb*hm)));
+ Rbp = (4*hb*hm) / lambda;
+ if (d<=Rbp)
+ Ll = Lbp + 20.*log10(d./Rbp);
+ Lu = Lbp + 20 + 25.*log10(d./Rbp);
+ else
+ Ll = Lbp + 40.*log10(d./Rbp);
+ Lu = Lbp + 20 + 40.*log10(d./Rbp);
+ endif
+
+ g = zeros(size(d));
+ g(find(d > 0)) = (Ll.+Lu)./2;
+
+ g(find(d <= 0)) = 1;
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_ITU1411_NLOS_over_rooftop.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,78 @@
+function g = loss_ITU1411_NLOS_over_rooftop (d, hb, hm, hr, f, l, b, st_w, phi, big)
+
+ %%
+ %% function g = loss_ITU1411_LOS(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+
+ lambda = 300000000.0 / f;
+ fmhz = f/1e6;
+ Dhb = hb - hr;
+ ds = (lambda*d*d)/(Dhb*Dhb);
+ if (l>ds)
+ if (fmhz>2000)
+ kf = -8;
+ else
+ if (big==1)
+ kf = -4+1.5*((fmhz/925)-1);
+ else
+ kf = -4+0.7*((fmhz/925)-1);
+ endif
+ endif
+ if (hb>hr)
+ kd = 18;
+ if (fmhz>2000)
+ ka = 71.4;
+ else
+ ka = 54;
+ endif
+ Lbsh = -18*log10(1+Dhb);
+ else
+ kd = 18 - 15*(Dhb/hr);
+ Lbsh = 0;
+ if (d>=500)
+ ka = 54-0.8*Dhb;
+ else
+ ka = 54-1.6*Dhb;
+ endif
+ endif
+ Lmsd = Lbsh + ka + kd.*log10(d./1000) + kf*log10(fmhz) - 9*log10(b);
+ else
+ theta = atan (Dhb /b);
+ rho = sqrt(Dhb^2 + b^2);
+ if (abs(hb-hr)<1)
+ Qm = b./d;
+ elseif (hb>hr)
+ Qm = 2.35*((Dhb./d)*sqrt(b/lambda))^0.9;
+ else
+ Qm = (b/(2*pi.*d))*sqrt(lambda/rho)*((1/theta)-(1/(2*pi+theta)));
+ b
+ endif
+ Lmsd = -10*log10(Qm*Qm);
+ endif
+ Dhm = hr-hm;
+ if (phi<35)
+ Lori = -10+(0.354*phi);
+ elseif (phi<55)
+ Lori = 2.5+0.075*(phi-35);
+ else
+ Lori = 4- 0.114*(phi-55);
+ endif
+ Lrts = -8.2 -10*log10(st_w) + 10*log10(fmhz) + 20*log10(Dhm) + Lori;
+
+ Lbf = 32.4 +20*log10(d/1000) + 20*log10(fmhz);
+ g = zeros(size(d));
+ if (Lrts+Lmsd>0)
+ L = Lbf + Lrts + Lmsd;
+ else
+ L = Lbf
+ endif
+ g(find(d > 0)) = L;
+
+ g(find(d <= 0)) = 1;
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_OH_2_6GHz.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,17 @@
+function g = loss_OH_2_6GHz (d)
+
+ %%
+ %% function g = gain_freespace(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ %assert(isscalar(f));
+ %assert(f > 0);
+
+
+ g = zeros(size(d));
+ g(find(d > 0)) = 36 + 26.*log10(d);
+
+ g(find(d <= 0)) = 1;
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_OH_large_cities_urban.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,24 @@
+function g = loss_OH_large_cities_urban(d, hb, hm, f)
+
+ %%
+ %% function g = gain_freespace(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+ if (f<200)
+ Ch = 8.29*(log10(1.54*hm))^2-1.1;
+ else
+ Ch = 3.2*(log10(11.75*hm))^2-4.97;
+ endif
+
+ g = zeros(size(d));
+ g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch;
+
+ g(find(d <= 0)) = 1;
+
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_OH_openareas.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,18 @@
+function g = loss_OH_openareas (d, hb, hm, f)
+
+ %%
+ %% function g = gain_freespace(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+ Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
+
+ g = zeros(size(d));
+ g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch -4.70*(log10(f))^2 + 18.33*log10(f) -40.94;
+
+ g(find(d <= 0)) = 1;
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_OH_small_cities_urban.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,20 @@
+function g = loss_OH_small_cities_urban(d, hb, hm, f)
+
+ %%
+ %% function g = gain_freespace(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+ Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
+
+ g = zeros(size(d));
+ g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch;
+
+ g(find(d <= 0)) = 1;
+
+
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/propagation/test/reference/loss_OH_suburban.m Mon May 07 11:54:24 2012 +0200
@@ -0,0 +1,18 @@
+function g = loss_OH_suburban(d, hb, hm, f)
+
+ %%
+ %% function g = gain_freespace(d, c)
+ %%
+ %% returns the loss at d meters for f frequency and mobile height m and
+ %% base station height of hb
+
+ assert(isscalar(f));
+ assert(f > 0);
+
+ Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
+
+ g = zeros(size(d));
+ g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch - 2*(log10(f/28))^2 -5.4;
+
+ g(find(d <= 0)) = 1;
+
\ No newline at end of file