-An implementation of a point to point Longley-Rice model in matlab based on FORTAN and C implementation from NTIS ITS: flattop.its.bldrdoc.gov
-A Hata model for cellular
-a velocity of propagation algorithm from "Compensating for propagation errors in elecgtromagnetic measuring systems" by Sidney Bertram. Published in Volume 8 issue 3, march 1971 pg 58-63 of IEEE Spectrum.
Grant Lohsen (2020). CL_Propagation_RF_LR (https://www.mathworks.com/matlabcentral/fileexchange/57683-cl_propagation_rf_lr), MATLAB Central File Exchange. Retrieved .
Thanks for sharing this code, it got me started nicely when studying the Longley-Rice model in Area mode. However, I found a few bugs when comparing results to the C++/Fortran implementation as provided by NTIA/ITS. Let me document these bugs for the sake of other people considering using this code. Actually, you may want instead to write a simple mex-file wrapper around the C++ source code of NTIA/ITS.
1) Bug in “fHeightGain” (Line 344):
% output=2.5e-5*x^2/pk+20*log(pk)-15; %Wrong! This deviates from NTIA/ITS
output=2.5e-5*x^2/pk+8.686*log(pk)-15; % Correct. ‘log’ is the natural logarithm, not log10
2) Bug in “fTroposcatterAtt” (Line 430): the variable ‘Tempvars’ is changed, but this is not remembered inbetween calls, as it should be according to the C++ implementation.
There are also a couple of other issues:
Missing classes “Constants_” and "signalType_"
Incorrect implementation of “updateAreaCalcsForNewDistance”: Inconsistent use of substruct ‘struct_Internal’
These problems are easy to identify and solve. The bugs above proved to be nastier to track down.
Minor correction on my bug-report: the second identified bug is in line 430, not line 438.
Great job Grant and wencheng zuo! However owing to the obstacles described earlier of Alejandro , can you elaborate on how to use this code? Or send an email to: firstname.lastname@example.org
Thanks for your code, which has been successfully debugged
Great job! But as with the problem described earlier, can you elaborate on how to use this code? Or send an email to: email@example.com
I seem to also get an error like that described by Sang Woo
Invalid default value for property 'cID' in class 'CL_Propagation_RF_LR':
Undefined variable "signalType_" or class "signalType_.LR".
Not sure why it is not working, could someone help?
Great work Grant. This is just what i need. However, i got problem to activate code. Example
obj = CL_Propagation_RF_LR; => error at "cID = signalType_.LR;" error said signalType_.LR is not defind.
If i remove "cID = signalType_.LR;" and conduct obj.test then Constants_.Z0 parameter is not found.
Also operation of point to point also not working due to some input value problem.
I confuses with elevation data input type. other i just input simple values but does not working.
struct_Input.Frequency = 1000000000;
struct_Input.Elevation = 10; %%.Elevation - terrain elevation profile, (list of points) (m)
struct_Input.Resolution = 1000;
struct_Input.TX_Height = 100;
struct_Input.RX_Height = 1;
struct_Input.eps = 1;
struct_Input.surfref = 1;
struct_Input.Climate = 1;
struct_Input.Confidence = 0.99;
struct_Input.Reliability = 0.99;
Neal: obj is due to this class being object oriented. see this for more info: http://www.mathworks.com/help/matlab/object-oriented-programming.html
as to the rest of the care and feeding of the function please see my comment to Stylianos
Can you please elaborate on how to setup and call point_to_point()? What is the parameter "obj"? Thanks!
Stylianos, for Longley-Rice prop loss use the point_to_point function and feed as detailed in the file
%Point to Point Longley-Rice
function struct_Output = point_to_point(obj,struct_Input)
% struct_Input - Input containing the fields:
% .Frequency - Frequency to calculate loss at (Hz)
% .Elevation - terrain elevation profile, (list of points) (m)
% .Resolution - terrain input resolution (distance b/t points) (m)
% .TX_Height - Transmit antenna height above ground (m)
% .RX_Height - Recieve antenna height above ground (m)
% .eps - Soil dielectric
% .sgm - Surface conductivity
% .surfref - Surface refractivity
% .Climate - Climate, 1-Equitorial, 2-Continental Subtropical, 3-Maritime Tropical, 4-Desert
% 5-Continental Temperate, 6-Maritime Temperate Over Lane 7-Maritime Temperate Over Sea
% .Polarization - 1 is vertical, 0 is horizontal.
% .Confidence - confidence for statistical analysis (.01 to .99)
% .Reliability - Reliability to calculate statistics for (.01 to .99)
% struct_Output - Output containing the fields:
% .dbloss - Final Output loss (dB)
% .error_ID - Error ID, 0 = no error, 1 = may be out of range, 3 = out of range
% .error_msg - Detailed error info (string)
% Calculate path loss using the Longley-Rice Irregular terrain
I don't see how it works
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!