% RSS vs distance
% Author: Michel Barbeau
% Version: January 4, 2015
% distance (in meters)
d=10:100:10000;
% 2.4 GHz (in dB)
L24 = 40 + 20*log10(d);
% 5 GHz (in dB);
L5 = 46.4 + 20*log10(d);
% RSS
P=20; % transmission power
R=P-L24;
plot(d,R);
% title('RSS at 2.4 GHz');
xlabel('Distance (in meters)');
ylabel('RSS (in dBm)');
hold on;
plot(d,-96,'-r');