rf sensor model cleanup
This commit is contained in:
1 parent
8e8bb39cd9
commit
2f9f13fdc8
8 files changed
+43
-45
No files matched your search
@@ -1,7 +1,8 @@
|
||||
function obj = initialize(obj, txPower, bandwidth, centerFreq, rxGain_dBi, beamwidthExponent, tilt, azimuth, lossExponent)
|
||||
function obj = initialize(obj, txPower, temperature, bandwidth, centerFreq, rxGain_dBi, beamwidthExponent, tilt, azimuth, lossExponent)
|
||||
arguments (Input)
|
||||
obj (1, 1) {mustBeA(obj, "rfSensor")}
|
||||
txPower (1, 1) double;
|
||||
temperature (1, 1) double;
|
||||
bandwidth (1, 1) double;
|
||||
centerFreq (1, 1) double;
|
||||
rxGain_dBi (1, 1) double;
|
||||
@@ -16,6 +17,7 @@ function obj = initialize(obj, txPower, bandwidth, centerFreq, rxGain_dBi, beamw
|
||||
|
||||
%% Provided values
|
||||
obj.P_TX = txPower; % Transmit power (W)
|
||||
obj.T_0 = temperature; % Temperature (K)
|
||||
obj.BW = bandwidth; % Bandwidth (Hz)
|
||||
obj.f_c = centerFreq; % Center frequency (Hz)
|
||||
obj.G_RX_dBi = rxGain_dBi; % Receiving Antenna Gain (dBi)
|
||||
@@ -29,4 +31,5 @@ function obj = initialize(obj, txPower, bandwidth, centerFreq, rxGain_dBi, beamw
|
||||
%% Computed values
|
||||
obj.P_TX_dBm = 10*log10(obj.P_TX/1e-3); % Transmit power in dBm
|
||||
obj.N = obj.k_B * obj.T_0 * obj.BW; % Thermal noise
|
||||
obj.constantGainTerm_dB = 10 .* log10(2 * (obj.beamwidthExponent + 1)); % used in RSS calculation, only need to compute once
|
||||
end
|
||||
Reference in new issue
Block a user