task 1 should be completed now

This commit is contained in:
ti_mo
2026-06-07 13:43:03 +02:00
parent ec472a44e8
commit eff95ac6e2
6 changed files with 733 additions and 24 deletions
+8 -2
View File
@@ -1,13 +1,17 @@
function [numPacketErrors, numPacketsSimulated ]= simulateTransmission(cfgEHT, channel, maxChDelay, snr, maxNumPackets, maxNumErrors, simParameters, chanBW, substreamIndex, elevationAngles)
function [numPacketErrors, numPacketsSimulated, cfrMagnitudes]= simulateTransmission(cfgEHT, channel, maxChDelay, snr, maxNumPackets, maxNumErrors, simParameters, chanBW, substreamIndex, elevationAngles)
numPacketErrors = 0;
numPacketsSimulated = 0;
cfrMagnitudes = [];
ofdmInfo = wlanEHTOFDMInfo('EHT-Data', cfgEHT);
ind = wlanFieldIndices(cfgEHT);
if nargin < 8
if nargin < 9
substreamIndex = 1;
end
if nargin < 10
elevationAngles = simParameters.ElevationAngle * ones(1, maxNumPackets);
end
stream = RandStream('combRecursive', Seed=simParameters.Seed);
stream.Substream = substreamIndex;
@@ -57,6 +61,8 @@ function [numPacketErrors, numPacketsSimulated ]= simulateTransmission(cfgEHT, c
heltfDemod = wlanEHTDemodulate(rxHELTF, "EHT-LTF", cfgEHT);
[chanEstimate, pilotEstimate] = wlanEHTLTFChannelEstimate(heltfDemod, cfgEHT);
cfrMagnitudes(:, end + 1) = abs(chanEstimate(:, 1, 1));
rxData = rx(packetOffset + (ind.EHTData(1) : ind.EHTData(2)), :);
demodSym = wlanEHTDemodulate(rxData, "EHT-Data", cfgEHT);