Skip to content

Commit

Permalink
Merge pull request #13 from NTIA/issue_11
Browse files Browse the repository at this point in the history
Issue 11
  • Loading branch information
wkozmaNTIA authored Jan 24, 2021
2 parents b313efb + 19f6771 commit f5c8746
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dotnet/ITS.Propagation.EHata/IntermediateValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static partial class EHata
/// <summary>
/// Intermediate values from EHata
/// </summary>
public class IntermediateValues
public struct IntermediateValues
{
/// <summary>
/// Breakpoint distance, in km
Expand Down
4 changes: 2 additions & 2 deletions dotnet/ITS.Propagation.EHata/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.0.0")]
[assembly: AssemblyFileVersion("3.1.0.0")]
[assembly: AssemblyVersion("3.2.0.0")]
[assembly: AssemblyFileVersion("3.2.0.0")]
2 changes: 1 addition & 1 deletion dotnet/nuget/ExtendedHata.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>ExtendedHata</id>
<version>3.1.0</version>
<version>3.2.0</version>
<authors>The Institute for Telecommunication Sciences</authors>
<owners>The Institute for Telecommunication Sciences</owners>
<license type="file">LICENSE.md</license>
Expand Down
31 changes: 27 additions & 4 deletions src/IsolatedRidgeCorrectionFactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,48 @@ double IsolatedRidgeCorrectionFactor(double d1_hzn__km, double d2_hzn__km, doubl
double d_1__km[3] = { 15.0, 30.0, 60.0 };
double d_2__km[9] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 };

// points from Figure 31, Okumura
// points from Figure 31, Okumura, at corresponding d2 distances
double curve_data[3][9] =
{ { 4.0, -13.0, -17.5, -17.5, -15.0, -12.5, -10.0, -8.0, -6.0 }, // C curve : d1 <= 15 km
{ 12.0, -8.5, -13.0, -12.0, -10.0, -8.0, -6.5, -5.0, -4.0 }, // B curve : d1 <= 30 km
{ 20.0, -4.0, -6.5, -6.0, -4.5, -3.5, -2.5, -2.0, -1.0 } }; // A curve : d1 <= 60 km

// normalized ridge height factor
double alpha = sqrt(h_edge__meter / 200.0); // Eq 1, Okumura, alpha = 0.07 * sqrt(h)
// Eq 1, Okumura, alpha = 0.07 * sqrt(h)
// Note: 0.07 is approx sqrt (1/ 200), with 200 being the normalization height
double alpha = sqrt(h_edge__meter / 200.0);

// identify the d1 curve set to use
int id1 = 0;
if (d1_hzn__km >= d_1__km[1])
id1 = 1;
int id2 = 0;

// select the first d2 curve distance that is <= to actual path d2 distance
int id2 = 0;
while (id2 < 7 && d2_hzn__km > d_2__km[id2 + 1])
id2 = id2 + 1;

// c1 is value on "lower" curve in Figure 31, Okumura, relative to d1 - either curve B or C
// c2 is value on "upper" curve in Figure 31, Okumura, relative to d1 - either curve A or B
double c1 = curve_data[id1][id2] + (curve_data[id1][id2 + 1] - curve_data[id1][id2]) * (d2_hzn__km - d_2__km[id2]) / (d_2__km[id2 + 1] - d_2__km[id2]);
double c2 = curve_data[id1 + 1][id2] + (curve_data[id1 + 1][id2 + 1] - curve_data[id1 + 1][id2]) * (d2_hzn__km - d_2__km[id2]) / (d_2__km[id2 + 1] - d_2__km[id2]);

return alpha * (c1 + (c2 - c1) * (d1_hzn__km - d_1__km[id1]) / (d_1__km[id1 + 1] - d_1__km[id1]));
// compute isolated ridge correction factor, K_im, from Figure 31, Okumura
double K_im;
if (d1_hzn__km <= 15) // clamp to curve C
K_im = c1;
else if (d1_hzn__km >= 60) // clamp to curve A
K_im = c2;
else // interpolate between curves
K_im = (c1 + (c2 - c1) * (d1_hzn__km - d_1__km[id1]) / (d_1__km[id1 + 1] - d_1__km[id1]));

// clamp K_im asymptote value to 0 dB (to avoid causing a non-physical gain from occuring)
// allow the gain to occur for portion of the curve with d2 distances close to or equal to 0 km
if (d2_hzn__km > 2)
K_im = MIN(K_im, 0);

// apply conversion factor to account for ridge height, Figure 32, Okumura
double L_iso__db = alpha * K_im;

return L_iso__db;
}
8 changes: 4 additions & 4 deletions win32/ehata/ehata.rc
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,1,0,0
PRODUCTVERSION 3,1,0,0
FILEVERSION 3,2,0,0
PRODUCTVERSION 3,2,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -69,11 +69,11 @@ BEGIN
BEGIN
VALUE "CompanyName", "The Institute for Telecommunication Sciences"
VALUE "FileDescription", "Extended Hata Urban Propagation Model (EHata)"
VALUE "FileVersion", "3.1.0.0"
VALUE "FileVersion", "3.2.0.0"
VALUE "InternalName", "ehata.dll"
VALUE "OriginalFilename", "ehata.dll"
VALUE "ProductName", "Extended Hata Urban Propagation Model (EHata)"
VALUE "ProductVersion", "3.1.0.0"
VALUE "ProductVersion", "3.2.0.0"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit f5c8746

Please sign in to comment.