Skip to content
Snippets Groups Projects
Commit 4fc5f312 authored by leprob001's avatar leprob001
Browse files

Added function to get involved soundsources. Trimmed soundsource names in combination.

parent 310f90a8
No related branches found
No related tags found
No related merge requests found
function [involvedSoundsources, involvedSoundsourceNames] = getInvolvedSoundsources()
%GETINVOLVEDSOUNDSOURCES Summary of this function goes here
% Detailed explanation goes here
global artoaWorkspace;
involvedSoundsourceNames = fieldnames(artoaWorkspace.filteredSoundsources);
involvedSoundsources = struct();
for i = 1:length(involvedSoundsourceNames)
if artoa.soundsources.hasAppliedToa(involvedSoundsourceNames{i}, artoaWorkspace.toaData.soundSource)
extracted = artoa.data.extractSoundsourcesFromStruct( ...
involvedSoundsourceNames{i}, ...
artoaWorkspace.filteredSoundsources ...
);
involvedSoundsources.(involvedSoundsourceNames{i}) = extracted;
clear extracted;
end
end
end
......@@ -47,7 +47,7 @@ segmentClockError = [];
segmentVelocities = struct();
%% Get sound sources
soundsourceNames = unique(strsplit(pCombinationDetails.soundsources{1}, ' '));
soundsourceNames = unique(strsplit(strtrim(pCombinationDetails.soundsources{1}), ' '));
%% Get tracking method
trackingMethod = lower(pTrackingMethod);
......
......@@ -34,16 +34,8 @@ soundsourceCombinations = pTrackingParameter.soundsourceCombinations;
uniqueToaDates = unique(pToaData.toaDate);
%% Get all sound sources that are involved
involvedSoundsourceNames = ...
unique(flatten( ...
cellfun( ...
@strsplit, soundsourceCombinations.soundsources, 'UniformOutput', false ...
) ...
));
involvedSoundsources = artoa.data.extractSoundsourcesFromStruct( ...
involvedSoundsourceNames, ...
pSoundsources ...
);
[involvedSoundsources, involvedSoundsourceNames] = ...
artoa.controller.track.getInvolvedSoundsources();
%% Add float drift to TOA
pToaData = artoa.data.addFloatDrift( ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment