Sum two different coverage models
12 ビュー (過去 30 日間)
古いコメントを表示
Is there a way to sum two different coverage outputs? I have two different transmitters and have plotted the output of each on the same coverage map. I notice that it appears to do the equivalent of a 'max hold' where the field patterns from the separate transmitters overlap. Is there a way to sum the field patterns from the separate transmitters? I realise that this would effectively assume zero phase diference at all points of interaction, but that suits what I am aiming to do.
So far I have tried converting the output of the coverage .Data to an array. This provides the lat, long, and dB output for each transmitter. What I can't work out is how to sum these arrays when the lat and long values are different (as the transmitters are in different locations). In an ideal world, I would then convert the summed arrays back into a coverage map of the result.
Any help much appreciated.
% horn antenna setup
tx_horn = horn("Height", 0.06, "Width", 0.16, "Length", 0.10, "FeedHeight", ...
0.04, "FeedWidth", 0.002, "FlareHeight", 0.216, "FlareLength", 0.15, ...
"FlareWidth", 0.266);
% transmitter array setup
f = 1.3e9; % Frequency
c = 299792458; % Speed of light
wl = c / f; % Wavelength
M = 2; % Number of elements on each row
N = 2; % Number of elements on each column
dy = 0.5 * wl; % Spacing between row elements (m)
dz = 0.5 * wl; % Spacing between column elements (m)
ura = phased.URA([N M], [dz dy], 'Element', tx_horn);
% transmitter setup
tx1 = txsite('Latitude', 52.36364, ...
'Longitude', -3.77767, ...
'TransmitterFrequency', f, ...
'Antenna', ura, ...
'AntennaHeight', 5, ...
'TransmitterPower', 50, ...
'AntennaAngle', 90);
tx2 = txsite('Latitude', 52.36369, ...
'Longitude', -3.78150, ...
'TransmitterFrequency', f, ...
'Antenna', ura, ...
'AntennaHeight', 5, ...
'TransmitterPower', 50, ...
'AntennaAngle', 90);
% coverage output
e_max = -20;
e_min = -60;
e_step = 1;
cov1 = coverage(tx1, 'close-in', 'SignalStrengths', e_min:e_step:e_max, 'ColorLimits', [e_min e_max]);
cov2 = coverage(tx2, 'close-in', 'SignalStrengths', e_min:e_step:e_max, 'ColorLimits', [e_min e_max]);
% convert to arrays for summing?
tx_array1 = table2array(cov1.Data);
tx_array2 = table2array(cov2.Data);
% What next?
0 件のコメント
採用された回答
Walter Roberson
2025 年 1 月 8 日
移動済み: Walter Roberson
2025 年 1 月 8 日
You could probably extract the lat and long vectors from tx_array1 and tx_array2 and do scatteredInterpolant() to construct interpolating objects with interpolation method set to 'none'. After that would be a matter of inventing common query points. Then query each of the scattered interpolant objects at the common query points.
Now,
result = zeros(size(QUERY_RESULT1));
mask1 = isnan(QUERY_RESULT1);
mask2 = isnan(QUERY_RESULT2);
tmask = ~mask1 & ~mask2;
result(tmask) = QUERY_RESULT1(tmask) + QUERY_RESULT2(tmask);
tmask = ~mask1 & mask2;
result(tmask) = QUERY_RESULT1(tmask);
tmask = mask1 & ~mask2;
result(tmask) = QUERY_RESULT2(tmask);
%mask1 & mask2 is nan in both places. The output result for there should be
%0, which we already got by initializing the result array to 0.
4 件のコメント
Walter Roberson
2025 年 1 月 9 日
I don't know what I was thinking, putting the result before the other information !
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!