Skip to content
Snippets Groups Projects
Commit 22b658b8 authored by leprob001's avatar leprob001
Browse files

Added sound source offset table to tracking parameter window.

parent ce4543ae
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ callbacks.inputOutputInterpolationInterval = @artoa.controller.track.parameter.i
callbacks.inputGapSize = @artoa.controller.track.parameter.inputGapSize;
callbacks.tableSoundSourceCombinationsSelection = '';
callbacks.tableSoundSourceCombinationsEdit = '';
callbacks.tableSoundSourceOffsetsEdit = @artoa.controller.track.parameter.tableSoundsourceOffsetsEdit;
callbacks.buttonTrack = '';
callbacks.buttonQuickTrack = '';
callbacks.buttonAddCombination = '';
......@@ -37,9 +38,33 @@ artoa.gui.track.parameter( ...
artoaWorkspace.defaults.soundspeedMethods ...
);
%% Create workspace variables
if ~isfield(artoaWorkspace, 'trackParameter')
artoaWorkspace.trackParameter = struct();
% initialize sound source offsets
artoaGui.trackParameter.tableSoundSourceOffsets.RowName = fieldnames( ...
artoaWorkspace.filteredSoundsources ...
);
artoaGui.trackParameter.tableSoundSourceOffsets.Data(1:length(artoaGui.trackParameter.tableSoundSourceOffsets.RowName), 1) = {0};
% initialize settings
availableCallbacks = { ...
'comboboxTrackingMethod', ...
'checkboxDopplerCorrection', ...
'comboboxInterpolationMethod', ...
'comboboxSoundspeedMethod', ...
'checkboxPlotResiduals', ...
'inputOutputInterpolationInterval', ...
'inputGapSize', ...
'tableSoundSourceOffsetsEdit' ...
};
for i = 1:length(availableCallbacks)
if isfield(callbacks, availableCallbacks{i})
% execute the callback to save the state
callbacks.(availableCallbacks{i})();
end
end
end
%% Update the values if required
......
function [] = tableSoundsourceOffsetsEdit(~, ~)
%TABLESOUNDSOURCEOFFSETSEDIT Summary of this function goes here
% Detailed explanation goes here
global artoaWorkspace artoaGui;
artoaWorkspace.trackParameter.soundsourceOffsets = artoaGui.trackParameter.tableSoundSourceOffsets.Data;
end
......@@ -28,8 +28,15 @@ for i = 1:length(fieldNames)
artoaGui.trackParameter.inputOutputInterpolationInterval.String = currentValue;
case 'gapSize'
artoaGui.trackParameter.inputGapSize.String = currentValue;
case 'soundsourceOffsets'
artoaGui.trackParameter.tableSoundSourceOffsets.Data = currentValue;
end
end
% update soundsources
artoaGui.trackParameter.tableSoundSourceOffsets.RowName = fieldnames( ...
artoaWorkspace.filteredSoundsources ...
);
end
......@@ -18,6 +18,8 @@ availableCallbacks = { ...
'inputGapSize', ...
'tableSoundSourceCombinationsSelection', ...
'tableSoundSourceCombinationsEdit', ...
'tableSoundSourceOffsetsSelection', ...
'tableSoundSourceOffsetsEdit', ...
'buttonTrack', ...
'buttonQuickTrack', ...
'buttonAddCombination', ...
......@@ -82,6 +84,7 @@ artoaGui.trackParameter.checkboxDopplerCorrection = uicontrol( ...
'FontSize', 8, ...
'Units', 'normalized', ...
'Position', [left .1 .9 .3], ...
'Value', 1, ...
'CallBack', pCallbacks.checkboxDopplerCorrection ...
);
......@@ -186,7 +189,7 @@ columns = { ...
artoaGui.trackParameter.tableSoundSourceCombinations = uitable( ...
artoaGui.figures.trackParameter, ...
'Units', 'normalized', ...
'Position', [left, 0.13, (5*left + 3.25*width), 0.6], ...
'Position', [left, 0.4, (5*left + 3.25*width), 0.3], ...
'Data', cell(1, length(columns)), ...
'ColumnName', columns, ...
'ColumnEditable', true, ...
......@@ -195,6 +198,23 @@ artoaGui.trackParameter.tableSoundSourceCombinations = uitable( ...
);
clear columns;
%% Sound source offset table
columns = { ...
'Offset'
};
artoaGui.trackParameter.tableSoundSourceOffsets = uitable( ...
artoaGui.figures.trackParameter, ...
'Units', 'normalized', ...
'Position', [left, 0.1, 0.75*width, 0.27], ...
'Data', cell(1, length(columns)), ...
'ColumnName', columns, ...
'ColumnEditable', true, ...
'CellSelectionCallback', pCallbacks.tableSoundSourceOffsetsSelection,... %@(app,event) disp(num2str(event.Indices)) ...
'CellEditCallback', pCallbacks.tableSoundSourceOffsetsEdit ...
);
clear columns;
%% Track buttons frame
artoaGui.trackParameter.frameTrackButtons = uipanel( ...
......
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