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

The drift is now being calculated if measured start and end date and offset are available.

parent d1361f70
No related branches found
No related tags found
No related merge requests found
......@@ -14,10 +14,13 @@ artoaWorkspace.editOffsets.soundsourceOffsets(:, :) = artoaGui.editOffsets.table
toaData = artoaWorkspace.toaData;
toaData.toa = artoaDataInput.toaData.toa;
%% Recalculate drift
artoa.controller.edit.offsets.updateWorkspaceOffsetsTable();
artoa.controller.edit.offsets.updateGui();
%% Select offset and drift from the table
artoa.controller.edit.offsets.selectOffsetsAndDrift();
artoaWorkspace.toaData = artoa.toa.recalculate( ...
artoaWorkspace.float, ...
toaData, ...
......
......@@ -28,6 +28,18 @@ for i = 1:length(fnames)
workspaceOffsets, ...
soundsources.(fnames{i}) ...
);
if ~isnan(workspaceOffsets{fnames{i}, 'DateStart'}) ...
&& ~isnan(workspaceOffsets{fnames{i}, 'OffsetStart'}) ...
&& ~isnan(workspaceOffsets{fnames{i}, 'DateEnd'}) ...
&& ~isnan(workspaceOffsets{fnames{i}, 'OffsetEnd'})
workspaceOffsets{fnames{i}, 'Drift'} = artoa.drift.byStartEndOffset( ...
workspaceOffsets{fnames{i}, 'DateEnd'} - workspaceOffsets{fnames{i}, 'DateStart'}, ...
workspaceOffsets{fnames{i}, 'OffsetStart'}, ...
workspaceOffsets{fnames{i}, 'OffsetEnd'} ...
);
else
workspaceOffsets{fnames{i}, 'Drift'} = NaN;
end
end
%% Check if there are soundsources that should be removed
......
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